From patchwork Wed Sep 13 03:21:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Harton X-Patchwork-Id: 28641 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 503C5325A; Wed, 13 Sep 2017 05:21:16 +0200 (CEST) Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id 21FD71041 for ; Wed, 13 Sep 2017 05:21:14 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.42,385,1500940800"; d="scan'208";a="297671798" Received: from alln-core-6.cisco.com ([173.36.13.139]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Sep 2017 03:21:13 +0000 Received: from cpp-rtpbld-31.cisco.com (cpp-rtpbld-31.cisco.com [172.18.5.114]) by alln-core-6.cisco.com (8.14.5/8.14.5) with ESMTP id v8D3LCj4025652; Wed, 13 Sep 2017 03:21:13 GMT Received: by cpp-rtpbld-31.cisco.com (Postfix, from userid 140087) id B83153D6; Tue, 12 Sep 2017 23:21:12 -0400 (EDT) From: David Harton To: beilei.xing@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, David Harton Date: Tue, 12 Sep 2017 23:21:10 -0400 Message-Id: <20170913032110.39994-1-dharton@cpp-rtpbld-31.cpprtplab> X-Mailer: git-send-email 2.10.3.dirty In-Reply-To: <20170912130210.18288-1-dharton@cpp-rtpbld-31.cpprtplab> References: <20170912130210.18288-1-dharton@cpp-rtpbld-31.cpprtplab> Subject: [dpdk-dev] [PATCH v3] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: David Harton The i40e maintains a single MAC filter table for both unicast and multicast 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. Fixes: 4861cde46116 ("i40e: new poll mode driver") Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address") Signed-off-by: David Harton Acked-by: Beilei Xing --- v3 * Modified diff to use more conventional logic. v2 * Removed multicast check in i40evf_add_mac_addr. v1 * Removed multicast check in i40e_validate_mac_addr. drivers/net/i40e/i40e_ethdev_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index f6d8293..08afd9e 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; - if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) { + if (is_zero_ether_addr(addr)) { 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],