stmmac: intel: set TSO/TBS TX Queues default settings
authorOng Boon Leong <boon.leong.ong@intel.com>
Wed, 21 Apr 2021 08:46:06 +0000 (16:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Apr 2021 17:49:02 +0000 (10:49 -0700)
TSO and TBS cannot coexist, for now we set Intel mGbE controller to use
below TX Queue mapping: TxQ0 uses TSO and the rest of TXQs supports TBS.

Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

index bd662aaf664a065766d22a9d0794dc1f7e190c65..4bd038acb1b910acba8c6ef1102390e2ec3c761c 100644 (file)
@@ -447,6 +447,9 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
 
                /* Disable Priority config by default */
                plat->tx_queues_cfg[i].use_prio = false;
+               /* Default TX Q0 to use TSO and rest TXQ for TBS */
+               if (i > 0)
+                       plat->tx_queues_cfg[i].tbs_en = 1;
        }
 
        /* FIFO size is 4096 bytes for 1 tx/rx queue */