From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A34315587 for ; Fri, 25 Mar 2016 16:26:56 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 25 Mar 2016 08:26:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,391,1455004800"; d="scan'208";a="675560558" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.58]) by FMSMGA003.fm.intel.com with SMTP; 25 Mar 2016 08:26:19 -0700 Received: by (sSMTP sendmail emulation); Fri, 25 Mar 2016 15:26:19 +0025 Date: Fri, 25 Mar 2016 15:26:19 +0000 From: Bruce Richardson To: "Ananyev, Konstantin" Cc: Olivier Matz , "dev@dpdk.org" , "Lu, Wenzhuo" Message-ID: <20160325152618.GE7916@bricha3-MOBL3> References: <1458901920-21677-1-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB97725836B21152@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2601191342CEEE43887BDE71AB97725836B21152@irsmsx105.ger.corp.intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] igb: fix crash with offload on 82575 chipset 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, 25 Mar 2016 15:26:57 -0000 On Fri, Mar 25, 2016 at 02:06:51PM +0000, Ananyev, Konstantin wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz > > Sent: Friday, March 25, 2016 10:32 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo > > Subject: [dpdk-dev] [PATCH] igb: fix crash with offload on 82575 chipset > > > > On the 82575 chipset, there is a pool of global TX contexts instead of 2 > > per queues on 82576. See Table A-1 "Changes in Programming Interface > > Relative to 82575" of Intel® 82576EB GbE Controller datasheet (*). > > > > In the driver, the contexts are attributed to a TX queue: 0-1 for txq0, > > 2-3 for txq1, and so on. > > > > In igbe_set_xmit_ctx(), the variable ctx_curr contains the index of the > > per-queue context (0 or 1), and ctx_idx contains the index to be given > > to the hardware (0 to 7). The size of txq->ctx_cache[] is 2, and must > > be indexed with ctx_curr to avoid an out-of-bound access. > > > > Also, the index returned by what_advctx_update() is the per-queue > > index (0 or 1), so we need to add txq->ctx_start before sending it > > to the hardware. > > > > (*) The datasheets says 16 global contexts, however the IDX fields in TX > > descriptors are 3 bits, which gives a total of 8 contexts. The > > driver assumes there are 8 contexts on 82575: 2 per queues, 4 txqs. > > > > Fixes: 4c8db5f09a ("igb: enable TSO support") > > Fixes: af75078fec ("first public release") > > Signed-off-by: Olivier Matz > > Acked-by: Konstantin Ananyev Applied to dpdk-next-net/rel_16_04 /Bruce