net/bnxt: limit Rx representor packets per poll
authorLance Richardson <lance.richardson@broadcom.com>
Mon, 14 Dec 2020 18:53:52 +0000 (13:53 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:06 +0000 (16:03 +0100)
commitf0beaf802145e21e1ce60d4ca2724436b70c316e
tree0803a5e17f8b8ad8c10a98f466a9933068457cc2
parent47193beea5035ac27665efe9ba96b64b19ac220f
net/bnxt: limit Rx representor packets per poll

Without some limit on the number of packets transferred from the
HW ring to the representor ring per burst receive call, an entire ring's
worth of packets can be transferred. This can break assumptions
about ring indices (index on return could be identical to the index
on entry, which is assumed to mean that no packets were processed),
and can result in representor packets being dropped unnecessarily
due to representor ring overflow.

Fix by limiting the number of representor packets transferred per
poll to requested burst size.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_rxr.c