> On Sep 14, 2017, at 3:50 AM, Shahaf Shuler <shah...@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: sta...@dpdk.org > > Signed-off-by: Shahaf Shuler <shah...@mellanox.com> > --- Acked-by: Yongseok Koh <ys...@mellanox.com>
-- Thanks, Yongseok