OSDN Git Service

bnxt_en: Add TC to hardware QoS queue mapping logic.
authorMichael Chan <michael.chan@broadcom.com>
Thu, 26 Apr 2018 21:44:31 +0000 (17:44 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 18:47:28 +0000 (14:47 -0400)
commit2e8ef77ee0ff1117251a48f79d2d57d65afd0495
tree8e4fcf949481c091fb40099ae8712b70c8c1be28
parentc347b9273c26453fa8c9e1acb92f45546d888745
bnxt_en: Add TC to hardware QoS queue mapping logic.

The current driver maps MQPRIO traffic classes directly 1:1 to the
internal hardware queues (TC0 maps to hardware queue 0, etc).  This
direct mapping requires the internal hardware queues to be reconfigured
from lossless to lossy and vice versa when necessary.  This
involves reconfiguring internal buffer thresholds which is
disruptive and not always reliable.

Implement a new scheme to map TCs to internal hardware queues by
matching up their PFC requirements.  This will eliminate the need
to reconfigure a hardware queue internal buffers at run time.  After
remapping, the NIC is closed and opened for the new TC to hardware
queues to take effect.

This patch only adds the basic mapping logic.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c