From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 337808E7E for ; Mon, 23 Nov 2015 06:53:46 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 22 Nov 2015 21:53:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,335,1444719600"; d="scan'208";a="817028" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 22 Nov 2015 21:53:44 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 22 Nov 2015 21:53:44 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 22 Nov 2015 21:53:43 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.223]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.193]) with mapi id 14.03.0248.002; Mon, 23 Nov 2015 13:53:42 +0800 From: "Wu, Jingjing" To: "Zhang, Helin" , "dev@dpdk.org" Thread-Topic: [PATCH] i40e: fix issue of reconfigure hash enable flags Thread-Index: AQHRJbDt9sjgFaE6R02QaSuaxiDTIJ6pGUhg Date: Mon, 23 Nov 2015 05:53:41 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8D3E2EB@SHSMSX104.ccr.corp.intel.com> References: <1448256970-2722-1-git-send-email-helin.zhang@intel.com> In-Reply-To: <1448256970-2722-1-git-send-email-helin.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] i40e: fix issue of reconfigure hash enable flags 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, 23 Nov 2015 05:53:46 -0000 >=20 > - if (!key || key_len !=3D ((I40E_PFQF_HKEY_MAX_INDEX + 1) * > - sizeof(uint32_t))) > + if (!key || key_len =3D=3D 0) { > + PMD_DRV_LOG(DEBUG, "No key to be configured"); > + return 0; > + } else if (key && (key_len !=3D (I40E_PFQF_HKEY_MAX_INDEX + 1) * > + sizeof(uint32_t))) { No need to check key in else if, it shouldn't be NULL here. > + PMD_DRV_LOG(ERR, "Invalid key length %u", key_len); > return -EINVAL; > + } Thanks Jingjing