From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 5FA561B471; Fri, 4 Jan 2019 09:59:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jan 2019 00:59:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,437,1539673200"; d="scan'208";a="115400557" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by orsmga003.jf.intel.com with ESMTP; 04 Jan 2019 00:59:54 -0800 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, qi.z.zhang@intel.com, jingjing.wu@intel.com, Wei Zhao Date: Fri, 4 Jan 2019 16:34:27 +0800 Message-Id: <1546590867-7390-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1546410760-24879-1-git-send-email-wei.zhao1@intel.com> References: <1546410760-24879-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix multicast table enable error for VF 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: Fri, 04 Jan 2019 08:59:57 -0000 In ixgbe PMD code, all vf ars set with bit IXGBE_VMOLR_ROMPE, which make vf accept packets that match the MTA table, if some vf update IXGBE_MTA in function ixgbe_vf_set_multicast, then all vf will receive packets from these address. So thhere is need to set VMOLR register bit ROPE only after this vf has been set multicast address. If this bit is set when pf host doing initialization, this vf will receive multicast packets with address written in MTA table. Align to ixgbe pf kernel 5.3.7 code to fix this bug. Fixes: 00e30184daa0 ("ixgbe: add PF support") Signed-off-by: Wei Zhao --- v2: change patch name and fix typo in log. --- drivers/net/ixgbe/ixgbe_pf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 4b833ff..0f4b96b 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -351,7 +351,7 @@ ixgbe_vf_reset_event(struct rte_eth_dev *dev, uint16_t vf) int rar_entry = hw->mac.num_rar_entries - (vf + 1); uint32_t vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf)); - vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_ROMPE | + vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE); IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr); @@ -503,6 +503,7 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) const uint32_t IXGBE_MTA_BIT_MASK = (0x1 << IXGBE_MTA_BIT_SHIFT) - 1; uint32_t reg_val; int i; + u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf)); /* Disable multicast promiscuous first */ ixgbe_disable_vf_mc_promisc(dev, vf); @@ -525,6 +526,9 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) IXGBE_WRITE_REG(hw, IXGBE_MTA(mta_idx), reg_val); } + vmolr |= IXGBE_VMOLR_ROMPE; + IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr); + return 0; } -- 2.7.5