1
0
Fork 0
alistair23-linux/drivers/net/ethernet/broadcom
Florian Fainelli d156576362 net: systemport: Establish lower/upper queue mapping
Establish a queue mapping between the DSA slave network device queues
created that correspond to switch port queues, and the transmit queue
that SYSTEMPORT manages.

We need to configure the SYSTEMPORT transmit queue with the switch port number
and switch port queue number in order for the switch and SYSTEMPORT hardware to
utilize the out of band congestion notification. This hardware mechanism works
by looking at the switch port egress queue and determines whether there is
enough buffers for this queue, with that class of service for a successful
transmission and if not, backpressures the SYSTEMPORT queue that is being used.

For this to work, we implement a notifier which looks at the
DSA_PORT_REGISTER event.  When DSA network devices are registered, the
framework calls the DSA notifiers when that happens, extracts the number
of queues for these devices and their associated port number, remembers
that in the driver private structure and linearly maps those queues to
TX rings/queues that we manage.

This scheme works because DSA slave network deviecs always transmit
through SYSTEMPORT so when DSA slave network devices are
destroyed/brought down, the corresponding SYSTEMPORT queues are no
longer used. Also, by design of the DSA framework, the master network
device (SYSTEMPORT) is registered first.

For faster lookups we use an array of up to DSA_MAX_PORTS * number of
queues per port, and then map pointers to bcm_sysport_tx_ring such that
our ndo_select_queue() implementation can just index into that array to
locate the corresponding ring index.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-12 12:10:02 -07:00
..
bnx2x bnx2x: Use pci_ari_enabled() instead of local copy 2017-10-06 10:06:06 -07:00
bnxt bnxt_en: don't consider building bnxt_tc.o if option not enabled 2017-10-07 03:00:26 +01:00
genet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
Kconfig bnxt_en: bnxt: add TC flower filter offload support 2017-08-28 16:57:10 -07:00
Makefile net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
b44.c drivers: net: b44: use setup_timer() helper. 2017-09-21 11:44:39 -07:00
b44.h net: ethernet: broadcom: b44: use phydev from struct net_device 2016-09-19 21:39:11 -04:00
bcm63xx_enet.c bcm63xx_enet: drop unneeded NULL phy_clk check 2017-10-01 23:05:11 -07:00
bcm63xx_enet.h bcm63xx_enet: remove unneeded include 2017-10-01 23:05:11 -07:00
bcmsysport.c net: systemport: Establish lower/upper queue mapping 2017-10-12 12:10:02 -07:00
bcmsysport.h net: systemport: Establish lower/upper queue mapping 2017-10-12 12:10:02 -07:00
bgmac-bcma-mdio.c net: bgmac: use PHY subsystem for initializing PHY 2017-01-31 13:44:49 -05:00
bgmac-bcma.c net: ethernet: bgmac: Allow MAC address to be specified in DTB 2017-03-16 11:57:26 -07:00
bgmac-platform.c net: ethernet: bgmac: Make IDM register space optional 2017-07-15 14:28:27 -07:00
bgmac.c net: ethernet: bgmac: Make IDM register space optional 2017-07-15 14:28:27 -07:00
bgmac.h net: ethernet: bgmac: Make IDM register space optional 2017-07-15 14:28:27 -07:00
bnx2.c drivers: net: bnx2: use setup_timer() helper. 2017-09-21 11:44:41 -07:00
bnx2.h ethernet/broadcom: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
bnx2_fw.h bnx2-cnic: Driver Rebranding Changes 2015-02-20 15:46:49 -05:00
cnic.c cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()' 2017-09-23 17:04:27 -07:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
sb1250-mac.c net: ethernet: broadcom: Remove null check before kfree 2017-08-28 15:53:23 -07:00
tg3.c drivers: net: tg3: use setup_timer() helper. 2017-09-21 11:44:40 -07:00
tg3.h mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00