• Edward Cree's avatar
    sfc: assign TXQs without gaps · a81dcd85
    Edward Cree authored
    Since we only allocate VIs for the number of TXQs we actually need, we
     cannot naively use "channel * TXQ_TYPES + txq" for the TXQ number, as
     this has gaps (when efx->tx_queues_per_channel < EFX_TXQ_TYPES) and
     thus overruns the driver's VI allocations, causing the firmware to
     reject the MC_CMD_INIT_TXQ based on INSTANCE.
    Thus, we distinguish INSTANCE (stored in tx_queue->queue) from LABEL
     (tx_queue->label); the former is allocated starting from 0 in
     efx_set_channels(), while the latter is simply the txq type (index in
     channel->tx_queue array).
    To simplify things, rather than changing tx_queues_per_channel after
     setting up TXQs, make Siena always probe its HIGHPRI queues at start
     of day, rather than deferring it until tc mqprio enables them.
    Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a81dcd85
net_driver.h 63.4 KB