net/qede: fix to prevent overwriting packet type
authorHarish Patil <harish.patil@cavium.com>
Wed, 28 Mar 2018 00:15:55 +0000 (17:15 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:44 +0000 (14:08 +0200)
Fixes: 3f72dd780e10 ("net/qede: check tunnel L3 header")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
drivers/net/qede/qede_rxtx.c

index 20c10be..2b9db32 100644 (file)
@@ -1466,6 +1466,8 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
                         */
                        rx_mb->data_off = offset + RTE_PKTMBUF_HEADROOM;
                        packet_type |= qede_rx_cqe_to_pkt_type_outer(rx_mb);
+               } else {
+                       packet_type |= qede_rx_cqe_to_pkt_type(parse_flag);
                }
 
                /* Common handling for non-tunnel packets and for inner
@@ -1487,7 +1489,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
                        ol_flags |= PKT_RX_IP_CKSUM_BAD;
                } else {
                        ol_flags |= PKT_RX_IP_CKSUM_GOOD;
-                       packet_type |= qede_rx_cqe_to_pkt_type(parse_flag);
                }
 
                if (CQE_HAS_VLAN(parse_flag) ||