net/sfc: make TSO a datapath-dependent feature
authorAndrew Rybchenko <arybchenko@solarflare.com>
Mon, 20 Mar 2017 10:15:16 +0000 (10:15 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 16:59:43 +0000 (18:59 +0200)
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc_dp_tx.h
drivers/net/sfc/sfc_tx.c

index 1a6d6c1..c93932e 100644 (file)
@@ -118,6 +118,7 @@ struct sfc_dp_tx {
 
        unsigned int                    features;
 #define SFC_DP_TX_FEAT_VLAN_INSERT     0x1
+#define SFC_DP_TX_FEAT_TSO             0x2
        sfc_dp_tx_qcreate_t             *qcreate;
        sfc_dp_tx_qdestroy_t            *qdestroy;
        sfc_dp_tx_qstart_t              *qstart;
index 9beb6f3..1979e1f 100644 (file)
@@ -293,6 +293,9 @@ sfc_tx_init(struct sfc_adapter *sa)
                goto fail_tx_dma_desc_boundary;
        }
 
+       if (~sa->dp_tx->features & SFC_DP_TX_FEAT_TSO)
+               sa->tso = B_FALSE;
+
        rc = sfc_tx_check_mode(sa, &dev_conf->txmode);
        if (rc != 0)
                goto fail_check_mode;
@@ -929,7 +932,8 @@ struct sfc_dp_tx sfc_efx_tx = {
                .type           = SFC_DP_TX,
                .hw_fw_caps     = 0,
        },
-       .features               = SFC_DP_TX_FEAT_VLAN_INSERT,
+       .features               = SFC_DP_TX_FEAT_VLAN_INSERT |
+                                 SFC_DP_TX_FEAT_TSO,
        .qcreate                = sfc_efx_tx_qcreate,
        .qdestroy               = sfc_efx_tx_qdestroy,
        .qstart                 = sfc_efx_tx_qstart,