net/sfc/base: add outer IP ID parameter to TSOv2 descriptor
authorVijay Srivastava <vijays@solarflare.com>
Tue, 20 Feb 2018 07:34:35 +0000 (07:34 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:43 +0000 (14:08 +0200)
Set outer_ip_id in the TX option descriptor for encapsulated packets.

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/ef10_impl.h
drivers/net/sfc/base/ef10_tx.c
drivers/net/sfc/base/efx.h
drivers/net/sfc/base/efx_impl.h
drivers/net/sfc/base/efx_tx.c
drivers/net/sfc/sfc_tso.c

index 20155f8..7089a60 100644 (file)
@@ -756,6 +756,7 @@ extern      void
 ef10_tx_qdesc_tso2_create(
        __in                    efx_txq_t *etp,
        __in                    uint16_t ipv4_id,
+       __in                    uint16_t outer_ipv4_id,
        __in                    uint32_t tcp_seq,
        __in                    uint16_t tcp_mss,
        __out_ecount(count)     efx_desc_t *edp,
index 8ca0b55..7d27f71 100644 (file)
@@ -623,6 +623,7 @@ ef10_tx_qdesc_tso_create(
 ef10_tx_qdesc_tso2_create(
        __in                    efx_txq_t *etp,
        __in                    uint16_t ipv4_id,
+       __in                    uint16_t outer_ipv4_id,
        __in                    uint32_t tcp_seq,
        __in                    uint16_t tcp_mss,
        __out_ecount(count)     efx_desc_t *edp,
@@ -636,13 +637,14 @@ ef10_tx_qdesc_tso2_create(
 
        EFSYS_ASSERT(count >= EFX_TX_FATSOV2_OPT_NDESCS);
 
-       EFX_POPULATE_QWORD_5(edp[0].ed_eq,
+       EFX_POPULATE_QWORD_6(edp[0].ed_eq,
                            ESF_DZ_TX_DESC_IS_OPT, 1,
                            ESF_DZ_TX_OPTION_TYPE,
                            ESE_DZ_TX_OPTION_DESC_TSO,
                            ESF_DZ_TX_TSO_OPTION_TYPE,
                            ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A,
                            ESF_DZ_TX_TSO_IP_ID, ipv4_id,
+                           ESF_DZ_TX_TSO_OUTER_IPID, outer_ipv4_id,
                            ESF_DZ_TX_TSO_TCP_SEQNO, tcp_seq);
        EFX_POPULATE_QWORD_4(edp[1].ed_eq,
                            ESF_DZ_TX_DESC_IS_OPT, 1,
index 4af1591..0d84108 100644 (file)
@@ -2295,6 +2295,7 @@ extern    void
 efx_tx_qdesc_tso2_create(
        __in                    efx_txq_t *etp,
        __in                    uint16_t ipv4_id,
+       __in                    uint16_t outer_ipv4_id,
        __in                    uint32_t tcp_seq,
        __in                    uint16_t tcp_mss,
        __out_ecount(count)     efx_desc_t *edp,
index ca22e0b..a1bd03d 100644 (file)
@@ -117,7 +117,7 @@ typedef struct efx_tx_ops_s {
                                                uint32_t, uint8_t,
                                                efx_desc_t *);
        void            (*etxo_qdesc_tso2_create)(efx_txq_t *, uint16_t,
-                                               uint32_t, uint16_t,
+                                               uint16_t, uint32_t, uint16_t,
                                                efx_desc_t *, int);
        void            (*etxo_qdesc_vlantci_create)(efx_txq_t *, uint16_t,
                                                efx_desc_t *);
index f8b9801..da37580 100644 (file)
@@ -625,6 +625,7 @@ efx_tx_qdesc_tso_create(
 efx_tx_qdesc_tso2_create(
        __in                    efx_txq_t *etp,
        __in                    uint16_t ipv4_id,
+       __in                    uint16_t outer_ipv4_id,
        __in                    uint32_t tcp_seq,
        __in                    uint16_t mss,
        __out_ecount(count)     efx_desc_t *edp,
@@ -636,7 +637,8 @@ efx_tx_qdesc_tso2_create(
        EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
        EFSYS_ASSERT(etxop->etxo_qdesc_tso2_create != NULL);
 
-       etxop->etxo_qdesc_tso2_create(etp, ipv4_id, tcp_seq, mss, edp, count);
+       etxop->etxo_qdesc_tso2_create(etp, ipv4_id, outer_ipv4_id,
+           tcp_seq, mss, edp, count);
 }
 
        void
index ba8496d..effe985 100644 (file)
@@ -164,7 +164,8 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
        rte_memcpy(&sent_seq, &th->sent_seq, sizeof(uint32_t));
        sent_seq = rte_be_to_cpu_32(sent_seq);
 
-       efx_tx_qdesc_tso2_create(txq->common, packet_id, sent_seq, m->tso_segsz,
+       efx_tx_qdesc_tso2_create(txq->common, packet_id, 0, sent_seq,
+                                m->tso_segsz,
                                 *pend, EFX_TX_FATSOV2_OPT_NDESCS);
 
        *pend += EFX_TX_FATSOV2_OPT_NDESCS;