DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Helin" <helin.zhang@intel.com>
To: henry <caihe@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"wangyunjian@huawei.com" <wangyunjian@huawei.com>,
	"zhoujingbin@huawei.com" <zhoujingbin@huawei.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix a bug in function i40evf_add_del_all_mac_addr
Date: Tue, 28 Mar 2017 08:44:42 +0000	[thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E71AA2BEF5@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1490689167-8660-1-git-send-email-caihe@huawei.com>



> -----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"
> 
> check return value of rte_zmalloc

Please add one more fix line here, as community required.
Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address ")

> 
> Signed-off-by: henry <caihe@huawei.com>
If possible, please use your full name here. E.g. 'Henry He' or else. Thanks!

> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 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_dev
> *dev,
>  		}
> 
>  		list = 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");
> 
>  		for (i = begin; i < next_begin; i++) {
>  			addr = &dev->data->mac_addrs[i];
> --
> 1.8.3.1
> 

      reply	other threads:[~2017-03-28  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  8:19 henry
2017-03-28  8:44 ` Zhang, Helin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F35DEAC7BCE34641BA9FAC6BCA4A12E71AA2BEF5@SHSMSX103.ccr.corp.intel.com \
    --to=helin.zhang@intel.com \
    --cc=caihe@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=wangyunjian@huawei.com \
    --cc=zhoujingbin@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).