net/bnxt: avoid unnecessary work in AVX2 Rx
authorLance Richardson <lance.richardson@broadcom.com>
Mon, 15 Nov 2021 18:24:09 +0000 (13:24 -0500)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 16 Nov 2021 22:56:37 +0000 (23:56 +0100)
commite5f2b3ebcbc89cf8e0e58c6eccf450e8e7e2f779
treedd4a45847fd23937dec010508571b83834d7ff9d
parent2490bb897182f57de80fd924dd3ae48dda819b8c
net/bnxt: avoid unnecessary work in AVX2 Rx

Each call to the AVX2 vector burst receive function makes at
least one pass through the function's inner loop, loading
256 bytes of completion descriptors and copying 8 rte_mbuf
pointers regardless of whether there are any packets to be
received.

Unidirectional forwarding performance is improved by about
3-4% if we ensure that at least one packet can be received
before entering the inner loop.

Fixes: c4e4c18963b0 ("net/bnxt: add AVX2 RX/Tx")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxtx_vec_avx2.c