From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4B96ED0B8 for ; Tue, 28 Mar 2017 10:44:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490690688; x=1522226688; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mzjPwEsJAM10eGaMNtx/vxBhDs6cyq7xS6uhVBrsVr4=; b=o9yxDO6Al8OhigcPUk0QP+xJH5a5KugsCPadqk2UQJxlueNjBwkagJX+ 4CWKzeJQMVHrhmUkYlg/PxAaRjVytw==; Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2017 01:44:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,236,1486454400"; d="scan'208";a="839213774" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 28 Mar 2017 01:44:46 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 28 Mar 2017 01:44:46 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 28 Mar 2017 01:44:45 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.253]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.82]) with mapi id 14.03.0248.002; Tue, 28 Mar 2017 16:44:43 +0800 From: "Zhang, Helin" To: henry CC: "dev@dpdk.org" , "Wu, Jingjing" , "wangyunjian@huawei.com" , "zhoujingbin@huawei.com" Thread-Topic: [dpdk-dev] [PATCH v2] net/i40e: fix a bug in function i40evf_add_del_all_mac_addr Thread-Index: AQHSp5xJ1xVDQpKOxE+sRY601gJ8O6Gp7Isg Date: Tue, 28 Mar 2017 08:44:42 +0000 Message-ID: References: <1490689167-8660-1-git-send-email-caihe@huawei.com> In-Reply-To: <1490689167-8660-1-git-send-email-caihe@huawei.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 v2] net/i40e: fix a bug in function i40evf_add_del_all_mac_addr 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: , X-List-Received-Date: Tue, 28 Mar 2017 08:44:48 -0000 > -----Original Message----- > From: henry [mailto:caihe@huawei.com] > Sent: Tuesday, March 28, 2017 4:19 PM > To: Zhang, Helin > Cc: dev@dpdk.org; Wu, Jingjing; wangyunjian@huawei.com; > zhoujingbin@huawei.com; henry > Subject: [dpdk-dev] [PATCH v2] net/i40e: fix a bug in function > i40evf_add_del_all_mac_addr Suggested with new title as below. "net/i40e: fix return value check issue" >=20 > check return value of rte_zmalloc Please add one more fix line here, as community required. Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address ") >=20 > Signed-off-by: henry If possible, please use your full name here. E.g. 'Henry He' or else. Thank= s! > --- > drivers/net/i40e/i40e_ethdev_vf.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > b/drivers/net/i40e/i40e_ethdev_vf.c > index 55fd344..fdb5be6 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -2014,6 +2014,12 @@ static int i40evf_dev_xstats_get(struct rte_eth_de= v > *dev, > } >=20 > list =3D rte_zmalloc("i40evf_del_mac_buffer", len, 0); > + if (!list) { > + PMD_DRV_LOG(ERR, "abort execute command %s", > + add ? "OP_ADD_ETHER_ADDRESS" : > + "OP_DEL_ETHER_ADDRESS"); > + return; > + } Suggest to describe what fails directly, as below. PMD_DRV_LOG(ERR, "Fail to allocate memory"); >=20 > for (i =3D begin; i < next_begin; i++) { > addr =3D &dev->data->mac_addrs[i]; > -- > 1.8.3.1 >=20