From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E149B1396 for ; Wed, 13 Sep 2017 04:20:29 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2017 19:20:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,385,1500966000"; d="scan'208";a="128192450" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 12 Sep 2017 19:20:28 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Sep 2017 19:20:27 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Sep 2017 19:20:28 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.168]) by shsmsx102.ccr.corp.intel.com ([169.254.2.39]) with mapi id 14.03.0319.002; Wed, 13 Sep 2017 10:20:23 +0800 From: "Xing, Beilei" To: David Harton , "Wu, Jingjing" CC: "dev@dpdk.org" , David Harton Thread-Topic: [PATCH v2] i40e: fix i40evf_add_mac_addr to permit multicast addresses Thread-Index: AQHTK8dlHP9STQS7aUq2YCwwejJ4faKyFNZA Date: Wed, 13 Sep 2017 02:20:23 +0000 Message-ID: <94479800C636CB44BD422CB454846E013201BD5A@SHSMSX101.ccr.corp.intel.com> References: <20170822222146.36912-1-dharton@cisco.com> <20170912130210.18288-1-dharton@cpp-rtpbld-31.cpprtplab> In-Reply-To: <20170912130210.18288-1-dharton@cpp-rtpbld-31.cpprtplab> 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] i40e: fix i40evf_add_mac_addr to permit multicast addresses 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: Wed, 13 Sep 2017 02:20:30 -0000 Hi Harton, > -----Original Message----- > From: David Harton [mailto:dharton@cpp-rtpbld-31.cpprtplab] > Sent: Tuesday, September 12, 2017 9:02 PM > To: Xing, Beilei ; Wu, Jingjing > Cc: dev@dpdk.org; David Harton > Subject: [PATCH v2] i40e: fix i40evf_add_mac_addr to permit multicast > addresses >=20 > From: David Harton >=20 > The i40e maintains a single MAC filter table for both unicast and multica= st > addresses. The i40e_validate_mac_addr function was preventing multicast > addresses from being added to the table via i40evf_add_mac_addr. Fixed > the issue by adjusting the check in i40evf_add_mac_addr. >=20 > Fixes: 4861cde46116 ("i40e: new poll mode driver") > Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address") >=20 > Signed-off-by: David Harton > --- >=20 > v2 > * Removed multicast check in i40evf_add_mac_addr. >=20 > v1 > * Removed multicast check in i40e_validate_mac_addr. >=20 > drivers/net/i40e/i40e_ethdev_vf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > b/drivers/net/i40e/i40e_ethdev_vf.c > index f6d8293..5916d11 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -888,7 +888,7 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev, > int err; > struct vf_cmd_info args; >=20 > - if (i40e_validate_mac_addr(addr->addr_bytes) !=3D I40E_SUCCESS) { > + if (is_zero_ether_addr(addr) !=3D I40E_SUCCESS) { Thanks for the patch, there's some mistake with my last comment. * @return * True (1) if the given ethernet address is filled with zeros; * false (0) otherwise. */ According to the comment of is_zero_ether_addr function, return value shoul= d be 0 or 1. So you should use if (!is_zero_ether_addr(addr)) here. > PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x", > addr->addr_bytes[0], addr->addr_bytes[1], > addr->addr_bytes[2], addr->addr_bytes[3], > -- > 2.10.3.dirty