net/sfc: do not drop TSO on device configure
[dpdk.git] / drivers / net / sfc / sfc_tx.c
index 9beb6f3..3c4717f 100644 (file)
@@ -84,6 +84,13 @@ sfc_tx_qcheck_conf(struct sfc_adapter *sa, uint16_t nb_tx_desc,
                rc = EINVAL;
        }
 
+       if (((flags & ETH_TXQ_FLAGS_NOMULTSEGS) == 0) &&
+           (~sa->dp_tx->features & SFC_DP_TX_FEAT_MULTI_SEG)) {
+               sfc_err(sa, "Multi-segment is not supported by %s datapath",
+                       sa->dp_tx->dp.name);
+               rc = EINVAL;
+       }
+
        if ((flags & ETH_TXQ_FLAGS_NOVLANOFFL) == 0) {
                if (!encp->enc_hw_tx_insert_vlan_enabled) {
                        sfc_err(sa, "VLAN offload is not supported");
@@ -173,6 +180,11 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
        info.flags = tx_conf->txq_flags;
        info.txq_entries = txq_info->entries;
        info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
+       info.txq_hw_ring = txq->mem.esm_base;
+       info.evq_entries = txq_info->entries;
+       info.evq_hw_ring = evq->mem.esm_base;
+       info.hw_index = txq->hw_index;
+       info.mem_bar = sa->mem_bar.esb_base;
 
        rc = sa->dp_tx->qcreate(sa->eth_dev->data->port_id, sw_index,
                                &SFC_DEV_TO_PCI(sa->eth_dev)->addr,
@@ -229,6 +241,8 @@ sfc_tx_qfini(struct sfc_adapter *sa, unsigned int sw_index)
 
        sfc_dma_free(sa, &txq->mem);
        rte_free(txq);
+
+       sfc_ev_qfini(sa, sfc_evq_index_by_txq_sw_index(sa, sw_index));
 }
 
 static int
@@ -929,7 +943,9 @@ 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 |
+                                 SFC_DP_TX_FEAT_MULTI_SEG,
        .qcreate                = sfc_efx_tx_qcreate,
        .qdestroy               = sfc_efx_tx_qdestroy,
        .qstart                 = sfc_efx_tx_qstart,