From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jingjing Wu Subject: [PATCH 1/2] net/i40e: fix MAC check when delete MAC Date: Mon, 23 Jan 2017 17:42:44 +0800 Message-ID: <1485164565-1867-1-git-send-email-jingjing.wu@intel.com> Cc: jingjing.wu@intel.com, henlin.zhang@intel.com To: dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DF390108F for ; Mon, 23 Jan 2017 10:44:36 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When VF sends request to remove MAC address, PF host will check if it is a non-zero or unicast address. When VF remove a multicast address, it will report error. This patch fixes this issue. Fixes: ec852c94af39 ("net/i40e: enhance sanity check of MAC") Signed-off-by: Jingjing Wu --- drivers/net/i40e/i40e_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index dbea5d0..0af0573 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -929,7 +929,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf, for (i = 0; i < addr_list->num_elements; i++) { mac = (struct ether_addr *)(addr_list->list[i].addr); - if(!is_valid_assigned_ether_addr(mac) || + if(is_zero_ether_addr(mac) || i40e_vsi_delete_mac(vf->vsi, mac)) { ret = I40E_ERR_INVALID_MAC_ADDR; goto send_msg; -- 2.4.11