From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CAA589955 for ; Thu, 25 May 2017 11:50:40 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 May 2017 02:50:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,390,1491289200"; d="scan'208";a="91624159" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 25 May 2017 02:50:39 -0700 From: Yuanhan Liu To: Wenzhuo Lu Cc: Yuanhan Liu , dpdk stable Date: Thu, 25 May 2017 17:48:06 +0800 Message-Id: <1495705809-21416-34-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1495705809-21416-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1495705809-21416-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/i40e: fix broadcast promiscuous mode setting' has been queued to stable release 17.02.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:50:41 -0000 Hi, FYI, your patch has been queued to stable release 17.02.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/28/17. So please shout if anyone has objections. Thanks. --yliu --- >>From b77a87767dc9b1aa2a5f0c6c1c14f21e71bccd0a Mon Sep 17 00:00:00 2001 From: Wenzhuo Lu Date: Thu, 16 Mar 2017 11:09:45 +0800 Subject: [PATCH] net/i40e: fix broadcast promiscuous mode setting [ upstream commit 92717a8e9b02124e3ca982400bbe97bd4cb73979 ] When setting up the VSIs, MAC filter is used for receiving MAC broadcast packets. We should follow it to implement the broadcast promiscuous mode setting. Fixes: 61fff9b4c68b ("net/i40e: set VF broadcast mode from PF") Signed-off-by: Wenzhuo Lu --- drivers/net/i40e/i40e_ethdev.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 508fcc8..047855c 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -10961,6 +10961,9 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id, struct i40e_pf *pf; struct i40e_vsi *vsi; struct i40e_hw *hw; + struct i40e_mac_filter_info filter; + struct ether_addr broadcast = { + .addr_bytes = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff} }; int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); @@ -10999,12 +11002,19 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id, return -EINVAL; } - hw = I40E_VSI_TO_HW(vsi); + if (on) { + (void)rte_memcpy(&filter.mac_addr, &broadcast, ETHER_ADDR_LEN); + filter.filter_type = RTE_MACVLAN_PERFECT_MATCH; + ret = i40e_vsi_add_mac(vsi, &filter); + } else { + ret = i40e_vsi_delete_mac(vsi, &broadcast); + } - ret = i40e_aq_set_vsi_broadcast(hw, vsi->seid, on, NULL); - if (ret != I40E_SUCCESS) { + if (ret != I40E_SUCCESS && ret != I40E_ERR_PARAM) { ret = -ENOTSUP; PMD_DRV_LOG(ERR, "Failed to set VSI broadcast"); + } else { + ret = 0; } return ret; -- 1.9.0