linux/drivers/net/ethernet
Brett Creeley 209f2f9c71 iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 negotiation
In order to support the new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability the
VF driver needs to rework it's initialization state machine and reset
flow. This has to be done because successful negotiation of
VIRTCHNL_VF_OFFLOAD_VLAN_V2 requires the VF driver to perform a second
capability request via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS before
configuring the adapter and its netdev.

Add the VIRTCHNL_VF_OFFLOAD_VLAN_V2 bit when sending the
VIRTHCNL_OP_GET_VF_RESOURECES message. The underlying PF will either
support VIRTCHNL_VF_OFFLOAD_VLAN or VIRTCHNL_VF_OFFLOAD_VLAN_V2 or
neither. Both of these offloads should never be supported together.

Based on this, add 2 new states to the initialization state machine:

__IAVF_INIT_GET_OFFLOAD_VLAN_V2_CAPS
__IAVF_INIT_CONFIG_ADAPTER

The __IAVF_INIT_GET_OFFLOAD_VLAN_V2_CAPS state is used to request/store
the new VLAN capabilities if and only if VIRTCHNL_VLAN_OFFLOAD_VLAN_V2
was successfully negotiated in the __IAVF_INIT_GET_RESOURCES state.

The __IAVF_INIT_CONFIG_ADAPTER state is used to configure the
adapter/netdev after the resource requests have finished. The VF will
move into this state regardless of whether it successfully negotiated
VIRTCHNL_VF_OFFLOAD_VLAN or VIRTCHNL_VF_OFFLOAD_VLAN_V2.

Also, add a the new flag IAVF_FLAG_AQ_GET_OFFLOAD_VLAN_V2_CAPS and set
it during VF reset. If VIRTCHNL_VF_OFFLOAD_VLAN_V2 was successfully
negotiated then the VF will request its VLAN capabilities via
VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS during the reset. This is needed
because the PF may change/modify the VF's configuration during VF reset
(i.e. modifying the VF's port VLAN configuration).

This also, required the VF to call netdev_update_features() since its
VLAN features may change during VF reset. Make sure to call this under
rtnl_lock().

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2021-12-17 12:37:18 -08:00
..
3com ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
8390 8390: wd: use eth_hw_addr_set() 2021-11-19 11:05:21 +00:00
actions
adaptec
aeroflex
agere
alacritech
allwinner sun4i-emac.c: remove unnecessary branch 2021-12-15 10:29:03 +00:00
alteon
altera net: altera: set a couple error code in probe() 2021-12-03 14:23:11 +00:00
amazon ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
amd net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
apm
apple apple: macmace: use eth_hw_addr_set() 2021-11-19 11:05:21 +00:00
aquantia net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
arc
asix Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-26 13:45:19 -08:00
atheros net: ag71xx: remove unnecessary legacy methods 2021-12-09 11:21:04 -08:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
brocade net: bna: Update supported link modes 2021-12-10 19:50:40 -08:00
cadence net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
calxeda
cavium net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
chelsio net: cxgb: fix a typo in kernel doc 2021-11-30 12:18:08 +00:00
cirrus cirrus: mac89x0: use eth_hw_addr_set() 2021-11-19 11:05:21 +00:00
cisco ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
cortina ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
davicom
dec net: ethernet: dec: tulip: de4x5: fix possible array overflows in type3_infoblock() 2021-11-18 12:03:17 +00:00
dlink
emulex ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
engleder net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
ezchip
faraday ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
fujitsu
google gve: Add tx|rx-coalesce-usec for DQO 2021-12-16 10:41:54 +00:00
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
huawei Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-09 13:23:02 -08:00
i825xx 82596: use eth_hw_addr_set() 2021-11-20 12:25:56 +00:00
ibm ibmvnic: remove unused defines 2021-12-14 12:58:02 +00:00
intel iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 negotiation 2021-12-17 12:37:18 -08:00
litex
marvell net: prestera: flower template support 2021-12-16 10:52:53 +00:00
mediatek net: mtk_eth: add COMPILE_TEST support 2021-12-13 15:07:40 +00:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
micrel ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
microchip net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
microsoft net: mana: Add RX fencing 2021-12-16 20:27:32 -08:00
moxa
mscc net: ocelot: add support to get port mac from device-tree 2021-12-15 10:29:41 +00:00
myricom ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-02 11:44:56 -08:00
neterion net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
netronome nfp: flower: refine the use of circular buffer 2021-12-16 20:25:56 -08:00
ni nixge: fix mac address error handling again 2021-11-22 15:05:48 +00:00
nvidia ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
nxp
oki-semi net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
packetengines
pasemi ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
pensando ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
qlogic net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
qualcomm ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
rdc
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-26 13:45:19 -08:00
renesas net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
rocker net: remove .ndo_change_proto_down 2021-11-23 12:18:48 +00:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
sgi
silan
sis
smsc smc9194: use eth_hw_addr_set() 2021-11-19 11:05:21 +00:00
socionext
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
sun
synopsys
tehuti ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
toshiba net: spider_net: Use non-atomic bitmap API when applicable 2021-12-01 18:45:46 -08:00
tundra
vertexcom net: vertexcom: remove unneeded semicolon 2021-12-16 20:26:25 -08:00
via
wiznet
xilinx net: axienet: mark as a legacy_pre_march2020 driver 2021-12-13 14:07:09 +00:00
xircom
xscale net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
fealnx.c
jme.c
jme.h
Kconfig net: vertexcom: Add MSE102x SPI support 2021-12-13 14:15:41 +00:00
korina.c
lantiq_etop.c net: lantiq: fix missing free_netdev() on error in ltq_etop_probe() 2021-11-30 12:11:27 +00:00
lantiq_xrx200.c
Makefile net: vertexcom: Add MSE102x SPI support 2021-12-13 14:15:41 +00:00