cxgb4: add mirror action to TC-MATCHALL offload
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Tue, 30 Jun 2020 13:11:28 +0000 (18:41 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Jul 2020 01:34:34 +0000 (18:34 -0700)
commitfd2261d8ed6f1375f18341e959d4bbcd94d748a3
tree35e1845ff9bb91335fe7236ae194f7978ec7f7b6
parent75603a3112664cb1f6b1508e2b489f16863bf153
cxgb4: add mirror action to TC-MATCHALL offload

Add mirror Virtual Interface (VI) support to receive all ingress
mirror traffic from the underlying device. The mirror VI is
created dynamically, if the TC-MATCHALL rule has a corresponding
mirror action. Also request MSI-X vectors needed for the mirror VI
Rxqs. If no vectors are available, then disable mirror VI support.

v3:
- Replace mirror VI refcount_t with normal u32 variable.

v2:
- Add mutex to protect all mirror VI data, instead of just
  mirror Rxqs.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.h
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c