From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Frasca Subject: [PATCH v2] fm10k: set packet type for multi-segment packets Date: Mon, 18 Apr 2016 08:51:52 -0400 Message-ID: <1460983912-14287-1-git-send-email-michael.frasca@oracle.com> Cc: dev@dpdk.org, Michael Frasca To: jing.d.chen@intel.com Return-path: Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by dpdk.org (Postfix) with ESMTP id 2F1D037B2 for ; Mon, 18 Apr 2016 14:52:04 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- v2: - Only copy hash, ol_flags, and packet_type to 'start' when RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE is defined. drivers/net/fm10k/fm10k_rxtx_vec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index f8efe8f..03e4a5c 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -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; } -- 2.5.0