DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: Yong Wang <wang.yong19@zte.com.cn>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] e1000/base: fix the wrong assignment to msgbuf[0]
Date: Tue, 14 Feb 2017 08:24:49 +0000	[thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B564E55@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1487063647-16263-1-git-send-email-wang.yong19@zte.com.cn>

Hi Yong,

> -----Original Message-----
> From: Yong Wang [mailto:wang.yong19@zte.com.cn]
> Sent: Tuesday, February 14, 2017 5:14 PM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; Yong Wang
> Subject: [PATCH] e1000/base: fix the wrong assignment to msgbuf[0]
> 
> In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior to
> initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
> And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".
> Fix it by moving the second line prior to the first one that mentioned above.
> 
> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
> ---
>  drivers/net/e1000/base/e1000_vf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/e1000/base/e1000_vf.c
> b/drivers/net/e1000/base/e1000_vf.c
> index 7845b48..44ab018 100644
> --- a/drivers/net/e1000/base/e1000_vf.c
> +++ b/drivers/net/e1000/base/e1000_vf.c
> @@ -421,12 +421,13 @@ void e1000_update_mc_addr_list_vf(struct
> e1000_hw *hw,
> 
>  	DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count);
> 
> +	msgbuf[0] = E1000_VF_SET_MULTICAST;
> +
>  	if (mc_addr_count > 30) {
>  		msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW;
>  		mc_addr_count = 30;
>  	}
> 
> -	msgbuf[0] = E1000_VF_SET_MULTICAST;
>  	msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT;
> 
>  	for (i = 0; i < mc_addr_count; i++) {
> --
> 1.8.3.1
Thanks for the patch. I believe it's a good fix.
As normally we don't change the base code. I'll double confirm it with my colleague.

  reply	other threads:[~2017-02-14  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  9:14 Yong Wang
2017-02-14  8:24 ` Lu, Wenzhuo [this message]
2017-02-14  8:50 ` Thomas Monjalon

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=6A0DE07E22DDAD4C9103DF62FEBC09093B564E55@shsmsx102.ccr.corp.intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    --cc=wang.yong19@zte.com.cn \
    /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).