fm10k: fix packet type for multi-segment packets
authorMichael Frasca <michael.frasca@oracle.com>
Mon, 18 Apr 2016 12:51:52 +0000 (08:51 -0400)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 6 May 2016 13:51:22 +0000 (15:51 +0200)
When building a chain of mbufs for a multi-segment packet, the
packet_type field resides at the end of the chain. It should be
copied forward to the head of the list.

Also, uses RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE to guard packet-type
computation. The mbuf fields are not copied when this define is not set.

Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")

Signed-off-by: Michael Frasca <michael.frasca@oracle.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
drivers/net/fm10k/fm10k_rxtx_vec.c

index f8efe8f..03e4a5c 100644 (file)
@@ -606,8 +606,11 @@ fm10k_reassemble_packets(struct fm10k_rx_queue *rxq,
 
                        if (!split_flags[buf_idx]) {
                                /* it's the last packet of the set */
+#ifdef RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE
                                start->hash = end->hash;
                                start->ol_flags = end->ol_flags;
+                               start->packet_type = end->packet_type;
+#endif
                                pkts[pkt_idx++] = start;
                                start = end = NULL;
                        }