]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Synchronize tx when xdp redirects happen on same ring
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Sat, 2 Apr 2022 00:21:10 +0000 (20:21 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Apr 2022 11:44:50 +0000 (12:44 +0100)
commit6d55e76e146019d008640789e5fe36800fa1c91b
tree0c65c2d7d7bc7e2d37b9eee8649b0b0e895566da
parent6482410a737bf517450b2078c1b26aff22dd309d
bnxt_en: Synchronize tx when xdp redirects happen on same ring

If there are more CPUs than the number of TX XDP rings, multiple XDP
redirects can select the same TX ring based on the CPU on which
XDP redirect is called.  Add locking when needed and use static
key to decide whether to take the lock.

Fixes: 0323aa29d818 ("bnxt_en: optimized XDP_REDIRECT support")
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h