diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-10-11 19:57:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-12 21:10:02 +0200 |
commit | d156576362c07e954dc36e07b0d7b0733a010f7d (patch) | |
tree | d644ce444097ff6fa08225b479050e0cc4e16ed3 /fs | |
parent | net: dsa: tag_brcm: Indicate to master netdevice port + queue (diff) | |
download | linux-d156576362c07e954dc36e07b0d7b0733a010f7d.tar.xz linux-d156576362c07e954dc36e07b0d7b0733a010f7d.zip |
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>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions