From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id ACBE21DB1 for ; Mon, 13 Jun 2016 12:09:59 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 13 Jun 2016 03:09:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,466,1459839600"; d="scan'208";a="826910913" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.58]) by orsmga003.jf.intel.com with SMTP; 13 Jun 2016 03:09:57 -0700 Received: by (sSMTP sendmail emulation); Mon, 13 Jun 2016 11:09:56 +0025 Date: Mon, 13 Jun 2016 11:09:56 +0100 From: Bruce Richardson To: Daniel Mrzyglod Cc: helin.zhang@intel.com, jingjing.wu@intel.com, dev@dpdk.org Message-ID: <20160613100955.GB13464@bricha3-MOBL3> References: <1464074734-199475-1-git-send-email-danielx.t.mrzyglod@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464074734-199475-1-git-send-email-danielx.t.mrzyglod@intel.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] i40e: fix unchecked return value 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, 13 Jun 2016 10:10:00 -0000 On Tue, May 24, 2016 at 09:25:34AM +0200, Daniel Mrzyglod wrote: > Calling i40e_switch_rx_queue without checking return value. > Fixed by add warning log information if return failed. > > Fixes: 71d35259ff67 ("i40e: tear down flow director") > Coverity ID 13198 > > Signed-off-by: Daniel Mrzyglod > --- > drivers/net/i40e/i40e_fdir.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c > index 8aa41e5..ce6d916 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -288,12 +288,15 @@ i40e_fdir_teardown(struct i40e_pf *pf) > { > struct i40e_hw *hw = I40E_PF_TO_HW(pf); > struct i40e_vsi *vsi; > + int err = I40E_SUCCESS; > > vsi = pf->fdir.fdir_vsi; > if (!vsi) > return; > i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); > - i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); > + err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); > + if (err) > + PMD_DRV_LOG(WARNING, "Failed to do FDIR RX switch off."); > i40e_dev_rx_queue_release(pf->fdir.rxq); Please see my comments to the equivalent fix on the TX side, as I believe they apply here too. Ref: http://dpdk.org/dev/patchwork/patch/12940/ /Bruce