[dpdk-dev] [PATCH v5 4/4] net/mlx5: enforce Tx num of segments limitation
Yongseok Koh
yskoh at mellanox.com
Thu Sep 14 21:21:57 CEST 2017
> On Sep 14, 2017, at 3:50 AM, Shahaf Shuler <shahafs at mellanox.com> wrote:
>
> Mellanox NICs has a limitation on the number of mbuf segments a multi
> segment mbuf can have. The max number depends on the Tx offloads requested.
>
> The current code not enforce such limitation, which might cause
> malformed work requests to be written to the device.
>
> This commit adds verification for the number of mbuf segments posted
> to the device. In case of overflow the packet will not be sent.
>
> In addition update the nic documentation with the limitation.
> Considering device limitation is 63 data segments in a work request, the
> maximum number of segment in mbuf was calculated taking TSO as the worst
> case:
>
> max_nb_segs = 63 - (control_segment + ethernet segment +
> TSO headers inline + inline segment +
> extra inline to align to cacheline)
>
> Cc: stable at dpdk.org
>
> Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
> ---
Acked-by: Yongseok Koh <yskoh at mellanox.com>
--
Thanks,
Yongseok
More information about the dev
mailing list