OSDN Git Service

cxgb4: add main VI to mirror VI config replication
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Tue, 30 Jun 2020 13:11:30 +0000 (18:41 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Jul 2020 01:34:34 +0000 (18:34 -0700)
commit696c278fdfd8dd852af286fcebaacc11adbf20f0
treec8203985b1b346954e2bd482e450283814834004
parent2b465ed00f7db9c5b2aca95a91671f86282b1822
cxgb4: add main VI to mirror VI config replication

When mirror VI is enabled, replicate various VI config params
enabled on main VI to mirror VI. These include replicating MTU,
promiscuous mode, all-multicast mode, and enabled netdev Rx
feature offloads.

v3:
- Replace mirror VI refcount_t with normal u32 variable.
- Add back calling cxgb4_port_mirror_start() in cxgb_open(), which
  was there in v1, but got missed in v2 during refactoring.

v2:
- Simplify the replication code by refactoring t4_set_rxmode()
  to handle mirror VI, instead of duplicating the t4_set_rxmode()
  calls in multiple places.

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/t4_hw.c