nfp: fix issue of skb segments exceeds descriptor limitation
authorBaowen Zheng <baowen.zheng@corigine.com>
Fri, 8 Jul 2022 10:07:18 +0000 (11:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Jul 2022 11:25:02 +0000 (12:25 +0100)
commit9c840d5f9aaef87e65db900bae21c70b059aba5f
tree685fc8037426f8871843d7b959ce53577cc49163
parent6676d7270ce254596ab1d4ae0de27b8e19705d44
nfp: fix issue of skb segments exceeds descriptor limitation

TCP packets will be dropped if the segments number in the tx skb
exceeds limitation when sending iperf3 traffic with --zerocopy option.

we make the following changes:

Get nr_frags in nfp_nfdk_tx_maybe_close_block instead of passing from
outside because it will be changed after skb_linearize operation.

Fill maximum dma_len in first tx descriptor to make sure the whole
head is included in the first descriptor.

Fixes: c10d12e3dce8 ("nfp: add support for NFDK data path")
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfdk/dp.c