From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3ICq25Y007405 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Apr 2016 12:52:03 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u3ICq25a001219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Apr 2016 12:52:02 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u3ICpxxp030995; Mon, 18 Apr 2016 12:52:01 GMT Received: from mfrasca-ubuntu.us.oracle.com (/10.154.106.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Apr 2016 05:51:59 -0700 From: Michael Frasca To: jing.d.chen@intel.com Cc: dev@dpdk.org, Michael Frasca Date: Mon, 18 Apr 2016 08:51:52 -0400 Message-Id: <1460983912-14287-1-git-send-email-michael.frasca@oracle.com> X-Mailer: git-send-email 2.5.0 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Subject: [dpdk-dev] [PATCH v2] fm10k: set packet type for multi-segment packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2016 12:52:04 -0000 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