]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/sfc/sfc_tso.c
event/octeontx2: relax memory requirement for timers
[dpdk.git] / drivers / net / sfc / sfc_tso.c
index a882e64dd2b2b74385ce5e24493422b6c1cc8210..2e34fc04504ba2b412ba6b5a257c9f06c79cb371 100644 (file)
@@ -95,7 +95,7 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
               unsigned int *pkt_descs, size_t *pkt_len)
 {
        uint8_t *tsoh;
-       const struct tcp_hdr *th;
+       const struct rte_tcp_hdr *th;
        efsys_dma_addr_t header_paddr;
        uint16_t packet_id = 0;
        uint32_t sent_seq;
@@ -146,16 +146,11 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
         * IPv4 flag. If the packet is still IPv4, HW will simply start from
         * zero IPID.
         */
-       if (m->ol_flags & PKT_TX_IPV4) {
-               const struct ipv4_hdr *iphe4;
-
-               iphe4 = (const struct ipv4_hdr *)(tsoh + nh_off);
-               rte_memcpy(&packet_id, &iphe4->packet_id, sizeof(uint16_t));
-               packet_id = rte_be_to_cpu_16(packet_id);
-       }
+       if (m->ol_flags & PKT_TX_IPV4)
+               packet_id = sfc_tso_ip4_get_ipid(tsoh, nh_off);
 
        /* Handle TCP header */
-       th = (const struct tcp_hdr *)(tsoh + tcph_off);
+       th = (const struct rte_tcp_hdr *)(tsoh + tcph_off);
 
        rte_memcpy(&sent_seq, &th->sent_seq, sizeof(uint32_t));
        sent_seq = rte_be_to_cpu_32(sent_seq);