From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id D42AE2E8D for ; Thu, 19 Nov 2015 18:25:38 +0100 (CET) Received: by pabfh17 with SMTP id fh17so89937499pab.0 for ; Thu, 19 Nov 2015 09:25:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=T1XdcHEGMgmKlVsU0RHO3TXxluI0rQMTLbXRz22kp1s=; b=QsAJdJk6+MSdo+i+QfB+XziaDLrpdCBocZbsY107qvOvwCI6hU0pZvq3KvTTcisx8r loFigGZaRzCJCeWN6jNrBK4tyt7nHwiABQAPr9/CMzZiBspV5ODECxWNiy7B+XVreeMz yFSriI+DxgoyhiZRCLYPNbhyRTWCDIvenYqMUAyG/Ek6K9u1QsAr5OF/xXsemNxSJmHx wyGRW6XYB8P18OA2Gg7FEwEoDz4HLaGFENbZH8yvSc7FhxnCRKboefuqW18s2m4yKbTG E0dxV0zTYBEIwSJunsaTPxtgWzCdGIuUZKqBwEA0ekfnOlQ1/Vsu54951cggeeKtjJuc /4HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=T1XdcHEGMgmKlVsU0RHO3TXxluI0rQMTLbXRz22kp1s=; b=OBwRdm7/N/QLFvKceqZdYUPsIBvoa7uHRAOVj0uE4xSz70z32i2kj1cnXw0x+CnGdc GDeg0ltBMeqDu+4bbzMwLEy28GcTV15RN7BDirSPzpBzIhvsUHxTxAgQZPk9tiW8Oq8m A4vnPF1peVM2QIQa3Sj8DYiLz5LAvsoVXqj5WnqwXxd1e2Cgeud/iUKOMAdOw3sqPegb M+3tWjF6HZ7W7/72gOHMS5fTsdzQqhfYf+oqRDunhDlyx2RoRDODb38YI/77CIIxwoGV Hr6VgB+voXaFf+3SO/wCLhjJbdbsEUDTwH5m1jnyaRW21eGnoIX0flcuFGaxkBn0/bIF x9Zw== X-Gm-Message-State: ALoCoQnwGhcKWQIvDWRO+LzlCWP5Smtud65LVmVQS2pJiR7TreQl4yG1q409kk2XnjSGz+Am1wwp X-Received: by 10.68.241.41 with SMTP id wf9mr12318374pbc.145.1447953938088; Thu, 19 Nov 2015 09:25:38 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id xs2sm11840427pbb.75.2015.11.19.09.25.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Nov 2015 09:25:37 -0800 (PST) Date: Thu, 19 Nov 2015 09:25:47 -0800 From: Stephen Hemminger To: Shaopeng He Message-ID: <20151119092547.2ffb056c@xeon-e3> In-Reply-To: <1447836609-23944-1-git-send-email-shaopeng.he@intel.com> References: <1447836609-23944-1-git-send-email-shaopeng.he@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] fm10k: fix wrong VLAN value in RX mbuf 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: Thu, 19 Nov 2015 17:25:39 -0000 On Wed, 18 Nov 2015 16:50:09 +0800 Shaopeng He wrote: > VLAN value should be copied from RX descriptor to mbuf, > this patch fixes this issue. > > Signed-off-by: Shaopeng He > --- > drivers/net/fm10k/fm10k_rxtx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c > index 1bac28d..eeb635e 100644 > --- a/drivers/net/fm10k/fm10k_rxtx.c > +++ b/drivers/net/fm10k/fm10k_rxtx.c > @@ -146,6 +146,7 @@ fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, > #endif > > mbuf->hash.rss = desc.d.rss; > + mbuf->vlan_tci = desc.w.vlan & FM10K_RXD_VLAN_ID_MASK; > > rx_pkts[count] = mbuf; > if (++next_dd == q->nb_desc) { > @@ -292,6 +293,7 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, > rx_desc_to_ol_flags(first_seg, &desc); > #endif > first_seg->hash.rss = desc.d.rss; > + first_seg->vlan_tci = desc.w.vlan & FM10K_RXD_VLAN_ID_MASK; > > /* Prefetch data of first segment, if configured to do so. */ > rte_packet_prefetch((char *)first_seg->buf_addr + Good catch, this bug means VLAN's would not work right now. But I think it isn't quite right. By masking the VLAN you are losing the received priority bits. Other drivers like ixgbe preserve the priority bits.