linux_dsm_epyc7002/drivers/net/ethernet
Anirudh Venkataramanan 9daf8208dd ice: Add support for switch filter programming
A VSI needs traffic directed towards it. This is done by programming
filter rules on the switch (embedded vSwitch) element in the hardware,
which connects the VSI to the ingress/egress port.

This patch introduces data structures and functions necessary to add
remove or update switch rules on the switch element. This is a pretty low
level function that is generic enough to add a whole range of filters.

This patch also introduces two top level functions ice_add_mac and
ice_remove mac which through a series of intermediate helper functions
eventually call ice_aq_sw_rules to add/delete simple MAC based filters.
It's worth noting that one invocation of ice_add_mac/ice_remove_mac
is capable of adding/deleting multiple MAC filters.

Also worth noting is the fact that the driver maintains a list of currently
active filters, so every filter addition/removal causes an update to this
list. This is done for a couple of reasons:

1) If two VSIs try to add the same filters, we need to detect it and do
   things a little differently (i.e. use VSI lists, described below) as
   the same filter can't be added more than once.

2) In the event of a hardware reset we can simply walk through this list
   and restore the filters.

VSI Lists:
In a multi-VSI situation, it's possible that multiple VSIs want to add the
same filter rule. For example, two VSIs that want to receive broadcast
traffic would both add a filter for destination MAC ff:ff:ff:ff:ff:ff.
This can become cumbersome to maintain and so this is handled using a
VSI list.

A VSI list is resource that can be allocated in the hardware using the
ice_aq_alloc_free_res admin queue command. Simply put, a VSI list can
be thought of as a subscription list containing a set of VSIs to which
the packet should be forwarded, should the filter match.

For example, if VSI-0 has already added a broadcast filter, and VSI-1
wants to do the same thing, the filter creation flow will detect this,
allocate a VSI list and update the switch rule so that broadcast traffic
will now be forwarded to the VSI list which contains VSI-0 and VSI-1.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-03-26 11:00:08 -07:00
..
3com
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon
amd net: amd8111e: remove redundant assignment to 'tx_index' 2018-03-04 18:17:27 -05:00
apm
apple net/macmace: Drop redundant MACH_IS_MAC test 2018-02-28 12:00:27 -05:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
arc net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred 2018-03-20 12:06:23 -04:00
atheros
aurora
broadcom net: bcmgenet: Add support for adaptive RX coalescing 2018-03-25 20:48:25 -04:00
brocade
cadence net: macb: Add phy-handle DT support 2018-03-16 11:14:33 -04:00
calxeda
cavium liquidio: Renamed txqs_start to start_txqs 2018-03-25 16:18:55 -04:00
chelsio cxgb4: support new ISSI flash parts 2018-03-25 21:08:32 -04:00
cirrus net/mac89x0: Replace custom debug logging with netif_* calls 2018-03-01 21:21:36 -05:00
cisco enic: drop IP proto check for vxlan tunnel delete 2018-03-16 09:50:40 -04:00
cortina net: gemini: fix memory leak 2018-03-20 12:08:45 -04:00
davicom
dec
dlink
emulex emulex/benet: Constify *be_misconfig_evt_port_state[] 2018-02-28 11:39:40 -05:00
ezchip
faraday
freescale dpaa_eth: use true and false for boolean values 2018-03-23 13:17:11 -04:00
fujitsu
hisilicon net: hns3: hclge_inform_reset_assert_to_vf() can be static 2018-03-23 13:17:46 -04:00
hp
huawei
i825xx
ibm ibmvnic: Potential NULL dereference in clean_one_tx_pool() 2018-03-25 21:14:03 -04:00
intel ice: Add support for switch filter programming 2018-03-26 11:00:08 -07:00
marvell net: mvpp2: use correct index on array mvpp2_pools 2018-03-22 14:48:25 -04:00
mediatek net: mediatek: Explicitly include pinctrl headers 2018-02-05 09:41:54 -08:00
mellanox mlxsw: spectrum_span: Prevent duplicate mirrors 2018-03-23 21:50:28 -04:00
micrel
microchip lan743x: make functions lan743x_csr_read and lan743x_csr_read static 2018-03-12 11:12:38 -04:00
moxa
myricom
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
neterion
netronome nfp: advertise firmware for mixed 10G/25G mode 2018-02-22 15:22:50 -05:00
nuvoton
nvidia forcedeth: remove duplicate structure member in rx 2018-01-23 11:11:41 -05:00
nxp
oki-semi
packetengines
pasemi
qlogic qed: Use true and false for boolean values 2018-03-23 13:17:11 -04:00
qualcomm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
rdc
realtek r8169: add helper tp_to_dev 2018-03-22 11:47:52 -04:00
renesas ravb: remove erroneous comment 2018-03-07 10:40:14 -05:00
rocker rocker: fix possible null pointer dereference in rocker_router_fib_event_work 2018-02-01 09:50:52 -05:00
samsung
seeq
sfc sfc: support FEC configuration through ethtool 2018-03-14 13:12:15 -04:00
sgi
silan
sis
smsc net: smsc911x: Fix unload crash when link is up 2018-03-07 13:22:09 -05:00
socionext net: ethernet: ave: enable Rx drop interrupt 2018-03-09 12:00:13 -05:00
stmicro net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields 2018-02-27 14:28:10 -05:00
sun sunvnet: does not support GSO for sctp 2018-03-14 14:01:33 -04:00
synopsys
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
tile
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: remove unused initialization of 'rxdesc' 2018-02-01 14:54:28 -05:00
jme.h
Kconfig
korina.c
lantiq_etop.c
Makefile
netx-eth.c