From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id D0D978E5D for ; Fri, 8 Jul 2016 22:49:31 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 08 Jul 2016 13:49:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,332,1464678000"; d="scan'208";a="1013393365" Received: from ahaldar-mobl.ger.corp.intel.com ([10.252.24.62]) by orsmga002.jf.intel.com with SMTP; 08 Jul 2016 13:49:11 -0700 Received: by (sSMTP sendmail emulation); Fri, 08 Jul 2016 21:49:10 +0025 Date: Fri, 8 Jul 2016 21:49:10 +0100 From: Bruce Richardson To: Maxime Leroy , dev@dpdk.org Message-ID: <20160708204910.GB34980@bricha3-MOBL3> References: <1467909285-896-1-git-send-email-maxime.leroy@6wind.com> <20160708070932.GY7621@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160708070932.GY7621@6wind.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix packet type and offload flags in Rx 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: Fri, 08 Jul 2016 20:49:32 -0000 On Fri, Jul 08, 2016 at 09:09:32AM +0200, Adrien Mazarguil wrote: > On Thu, Jul 07, 2016 at 06:34:45PM +0200, Maxime Leroy wrote: > > In mlx5 rx function, the packet_type and ol_flags mbuf fields are not > > properly initialized when no rx offload feature is enabled (checksum, l2 > > tun checksum, vlan_strip, crc). Thus, these fields can have a value > > different of 0 depending on their value when the mbuf was freed. > > > > This can result in an incorrect application behavior if invalid > > ol_flags/ptype are set, or memory corruptions if IND_ATTACHED_MBUF is > > set in ol_flags. > > > > Fixes: 081f7eae242e ("mlx5: process offload flags only when requested") > > > > Signed-off-by: Maxime Leroy > > --- > > drivers/net/mlx5/mlx5_rxtx.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c > > index 0c352f3f..4132fd74 100644 > > --- a/drivers/net/mlx5/mlx5_rxtx.c > > +++ b/drivers/net/mlx5/mlx5_rxtx.c > > @@ -1599,6 +1599,8 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) > > pkt = seg; > > assert(len >= (rxq->crc_present << 2)); > > /* Update packet information. */ > > + pkt->packet_type = 0; > > + pkt->ol_flags = 0; > > if (rxq->csum | rxq->csum_l2tun | rxq->vlan_strip | > > rxq->crc_present) { > > if (rxq->csum) { > > -- > > 2.1.4 > > > > Acked-by: Adrien Mazarguil > Applied to dpdk-next-net/rel_16_07 /Bruce