From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EAFADA05D3 for ; Mon, 25 Mar 2019 22:34:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13D6A4C9D; Mon, 25 Mar 2019 22:34:44 +0100 (CET) Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by dpdk.org (Postfix) with ESMTP id B7C3F3772 for ; Mon, 25 Mar 2019 22:34:42 +0100 (CET) Received: by mail-oi1-f193.google.com with SMTP id x188so8236273oia.13 for ; Mon, 25 Mar 2019 14:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9Mj3iL5v/6SFQc4NPxiwU7F5uzQndyPkbTrqp6JKzU8=; b=UUVCtCTdTq+BhWgJuxeUedXWM1OYYo+lRyWhR1zpKDOBa5YZRMzTonnY6YVn2+rwxw /PbHFUXKf/irlrwXHQ7swTzXrBYPqCnor7DmutK23JHoWqNLe+IAHVC6/+QVvLXeeU6o xwji/14BxCkOJZhvu8koMYntyTl+G/zmC2KJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9Mj3iL5v/6SFQc4NPxiwU7F5uzQndyPkbTrqp6JKzU8=; b=Ij13TlOssPWaED8/gliqAsDzujulkTJMheB3XecRPLDbX9kc/jvxI0UddY1ijzyWjH 2NBKgmtyBTxUSnJk5/uNcgb85GaRJftj58c/IkPioNdseV4KgEbGoB9fNg9SZObko8XC otTPvY3hvFVG+0FTBIpMjMA7c4mzCIuF8YIkEmxNHY4hQ0Nh6YmPtBIvDwaz0ibrNPJQ afRXGGkMtekqkBeyUVI7oZYd2DLRjIGbhmvOU3yPSH+pSscJb1l4V4O1f1b1G7Y9vzSW ODzsEj8/ePCi8yyact0f14/Dmx0mJmet/G3lQ96bKkyRdiCHc+l8blzghavfVnINtP5r KJ/Q== X-Gm-Message-State: APjAAAWU8RnCkPEjGGlj3EQdvwy6IhVTJJlAn2hRgWQkovKrI8LGwOFG XESOCwFbeaok9dHmc1xrpn7vtlmToR45GkOtowzSrA== X-Google-Smtp-Source: APXvYqxUGWjGToUv7QAwIwPmymuZqqUIr6yKQeHA6uya1/QMVxq8lDxuo8YiC4R+GHRW5tj5eifJW36UC9UZj8KApBQ= X-Received: by 2002:aca:c085:: with SMTP id q127mr13634922oif.27.1553549682010; Mon, 25 Mar 2019 14:34:42 -0700 (PDT) MIME-Version: 1.0 References: <20190325212754.13786-1-stephen@networkplumber.org> In-Reply-To: <20190325212754.13786-1-stephen@networkplumber.org> From: Ajit Khaparde Date: Mon, 25 Mar 2019 14:34:26 -0700 Message-ID: To: Stephen Hemminger Cc: Somnath Kotur , dev@dpdk.org, Stephen Hemminger Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] bnxt: fix receive VLAN offload flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190325213426.bEZOi1ZhLngOICcpfpeGUeWXUk4jfBZpSW37FfJD1aY@z> On Mon, Mar 25, 2019 at 2:28 PM Stephen Hemminger < stephen@networkplumber.org> wrote: > From: Stephen Hemminger > > The bnxt driver is not correctly setting the receive VLAN offload > flags. When VLAN is offloaded the driver must set the PKT_RX_VLAN_STRIPPED > flag. > > Actually, several drivers have the same bug, only most of the > Intel drivers look right. Any driver that sets vlan_tci is probably > stripping the tag, and should be setting RX_VLAN_STRIPPED. > > To quote rte_mbuf.h: > > /** > * The RX packet is a 802.1q VLAN packet, and the tci has been > * saved in in mbuf->vlan_tci. > * If the flag PKT_RX_VLAN_STRIPPED is also present, the VLAN > * header has been stripped from mbuf data, else it is still > * present. > */ > > Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") > Signed-off-by: Stephen Hemminger > Acked-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_rxr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > index 1bfc63d9304c..dc695e17771b 100644 > --- a/drivers/net/bnxt/bnxt_rxr.c > +++ b/drivers/net/bnxt/bnxt_rxr.c > @@ -154,7 +154,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq, > if (tpa_start1->flags2 & > rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN)) { > mbuf->vlan_tci = rte_le_to_cpu_32(tpa_start1->metadata); > - mbuf->ol_flags |= PKT_RX_VLAN; > + mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; > } > if (likely(tpa_start1->flags2 & > rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC))) > @@ -437,7 +437,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, > (RX_PKT_CMPL_METADATA_VID_MASK | > RX_PKT_CMPL_METADATA_DE | > RX_PKT_CMPL_METADATA_PRI_MASK); > - mbuf->ol_flags |= PKT_RX_VLAN; > + mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; > } > > if (likely(RX_CMP_IP_CS_OK(rxcmp1))) > -- > 2.17.1 > >