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 CA1962C74 for ; Tue, 14 Feb 2017 09:25:09 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2017 00:24:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,160,1484035200"; d="scan'208";a="1126347438" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 14 Feb 2017 00:24:53 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 14 Feb 2017 00:24:51 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 14 Feb 2017 00:24:51 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Tue, 14 Feb 2017 16:24:49 +0800 From: "Lu, Wenzhuo" To: Yong Wang CC: "dev@dpdk.org" Thread-Topic: [PATCH] e1000/base: fix the wrong assignment to msgbuf[0] Thread-Index: AQHShpkWTuuUelphk0yC9F38y82J5KFoKcXQ Date: Tue, 14 Feb 2017 08:24:49 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B564E55@shsmsx102.ccr.corp.intel.com> References: <1487063647-16263-1-git-send-email-wang.yong19@zte.com.cn> In-Reply-To: <1487063647-16263-1-git-send-email-wang.yong19@zte.com.cn> 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] e1000/base: fix the wrong assignment to msgbuf[0] 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, 14 Feb 2017 08:25:10 -0000 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] >=20 > In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior to > initialization at "msgbuf[0] |=3D E1000_VF_SET_MULTICAST_OVERFLOW". > And "msgbuf[0]" is overwritten at "msgbuf[0] =3D E1000_VF_SET_MULTICAST". > Fix it by moving the second line prior to the first one that mentioned ab= ove. >=20 > Signed-off-by: Yong Wang > --- > drivers/net/e1000/base/e1000_vf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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, >=20 > DEBUGOUT1("MC Addr Count =3D %d\n", mc_addr_count); >=20 > + msgbuf[0] =3D E1000_VF_SET_MULTICAST; > + > if (mc_addr_count > 30) { > msgbuf[0] |=3D E1000_VF_SET_MULTICAST_OVERFLOW; > mc_addr_count =3D 30; > } >=20 > - msgbuf[0] =3D E1000_VF_SET_MULTICAST; > msgbuf[0] |=3D mc_addr_count << E1000_VT_MSGINFO_SHIFT; >=20 > for (i =3D 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 c= olleague.