Thread (29 messages) flat view 29 messages, 4 authors, 2017-09-15

Re: [PATCH v5 4/4] net/mlx5: enforce Tx num of segments limitation

From: Nélio Laranjeiro <hidden>
Date: 2017-09-15 08:11:39

On Thu, Sep 14, 2017 at 01:50:39PM +0300, Shahaf Shuler 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@dpdk.org

Signed-off-by: Shahaf Shuler <redacted>
Acked-by: Nelio Laranjeiro <redacted>

-- 
Nélio Laranjeiro
6WIND
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help