linux/drivers/net
Brett Creeley 48ccc43ecf iavf: Add support VIRTCHNL_VF_OFFLOAD_VLAN_V2 during netdev config
Based on VIRTCHNL_VF_OFFLOAD_VLAN_V2, the VF can now support more VLAN
capabilities (i.e. 802.1AD offloads and filtering). In order to
communicate these capabilities to the netdev layer, the VF needs to
parse its VLAN capabilities based on whether it was able to negotiation
VIRTCHNL_VF_OFFLOAD_VLAN or VIRTCHNL_VF_OFFLOAD_VLAN_V2 or neither of
these.

In order to support this, add the following functionality:

iavf_get_netdev_vlan_hw_features() - This is used to determine the VLAN
features that the underlying hardware supports and that can be toggled
off/on based on the negotiated capabiltiies. For example, if
VIRTCHNL_VF_OFFLOAD_VLAN_V2 was negotiated, then any capability marked
with VIRTCHNL_VLAN_TOGGLE can be toggled on/off by the VF. If
VIRTCHNL_VF_OFFLOAD_VLAN was negotiated, then only VLAN insertion and/or
stripping can be toggled on/off.

iavf_get_netdev_vlan_features() - This is used to determine the VLAN
features that the underlying hardware supports and that should be
enabled by default. For example, if VIRTHCNL_VF_OFFLOAD_VLAN_V2 was
negotiated, then any supported capability that has its ethertype_init
filed set should be enabled by default. If VIRTCHNL_VF_OFFLOAD_VLAN was
negotiated, then filtering, stripping, and insertion should be enabled
by default.

Also, refactor iavf_fix_features() to take into account the new
capabilities. To do this, query all the supported features (enabled by
default and toggleable) and make sure the requested change is supported.
If VIRTCHNL_VF_OFFLOAD_VLAN_V2 is successfully negotiated, there is no
need to check VIRTCHNL_VLAN_TOGGLE here because the driver already told
the netdev layer which features can be toggled via netdev->hw_features
during iavf_process_config(), so only those features will be requested
to change.

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:19 -08:00
..
appletalk
arcnet
bonding Bonding: force user to add HWTSTAMP_FLAG_BONDED_PHC_INDEX when get/set HWTSTAMP 2021-12-14 12:28:24 +00:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-09 13:23:02 -08:00
dsa net: dsa: microchip: remove unneeded variable 2021-12-17 10:20:06 +00:00
ethernet iavf: Add support VIRTCHNL_VF_OFFLOAD_VLAN_V2 during netdev config 2021-12-17 12:37:19 -08:00
fddi net: fddi: use swap() to make code cleaner 2021-11-15 14:19:17 +00:00
fjes
hamradio hamradio: fix macro redefine warning 2021-11-23 11:38:13 +00:00
hippi
hyperv hv_netvsc: Use bitmap_zalloc() when applicable 2021-11-22 14:32:54 +00:00
ieee802154
ipa net: ipa: fix IPA v4.5 interconnect data 2021-12-13 12:49:26 +00:00
ipvlan ipvlan: Remove redundant if statements 2021-12-02 13:07:38 +00:00
mctp mctp: serial: remove unnecessary ldisc data check 2021-11-25 19:40:39 -08:00
mdio net: mdio: mscc-miim: Add depend of REGMAP_MMIO on MDIO_MSCC_MIIM 2021-12-01 18:46:54 -08:00
netdevsim Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
pcs
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
plip
ppp ppp: add netns refcount tracker 2021-12-10 06:38:27 -08:00
slip slip: fix macro redefine warning 2021-11-23 11:38:13 +00:00
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-09 13:23:02 -08:00
wan net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc 2021-11-30 12:40:22 +00:00
wireguard Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-02 11:44:56 -08:00
wireless wireless-drivers-next patches for v5.17 2021-12-17 07:30:07 -08:00
wwan net: wwan: iosm: correct open parenthesis alignment 2021-12-10 20:53:56 -08:00
xen-netback
amt.c amt: cancel delayed_work synchronously in amt_fini() 2021-11-16 19:14:12 -08:00
bareudp.c bareudp: Add extack support to bareudp_configure() 2021-12-14 12:39:17 +00:00
dummy.c
eql.c net: eql: add net device refcount tracker 2021-12-07 20:44:58 -08:00
geneve.c gro: remove rcu_read_lock/rcu_read_unlock from gro_complete handlers 2021-11-24 17:21:42 -08:00
gtp.c
ifb.c net: ifb: support ethtools stats 2021-11-29 20:15:03 -08:00
Kconfig vmxnet3: Use generic Kconfig option for page size limit 2021-11-27 14:34:41 -08:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c net: remove .ndo_change_proto_down 2021-11-23 12:18:48 +00:00
macvtap.c
Makefile amt: add control plane of amt interface 2021-11-01 13:36:08 +00:00
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c netpoll: add net device refcount tracker to struct netpoll 2021-12-06 16:06:02 -08:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c net: sungem_phy: fix code indentation 2021-11-09 11:45:54 +00:00
tap.c
thunderbolt.c
tun.c tun: fix bonding active backup with arp monitoring 2021-11-15 13:00:26 +00:00
veth.c veth: use ethtool_sprintf instead of snprintf 2021-11-25 19:15:12 -08:00
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-09 13:23:02 -08:00
vsockmon.c
vxlan.c net: vxlan: add macro definition for number of IANA VXLAN-GPE port 2021-11-29 12:19:53 +00:00
xen-netfront.c