From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id BA9471B3E8; Fri, 4 Jan 2019 09:34:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jan 2019 00:34:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,437,1539673200"; d="scan'208";a="112053937" Received: from pgsmsx111.gar.corp.intel.com ([10.108.55.200]) by fmsmga007.fm.intel.com with ESMTP; 04 Jan 2019 00:34:47 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.6]) by PGSMSX111.gar.corp.intel.com ([169.254.2.23]) with mapi id 14.03.0415.000; Fri, 4 Jan 2019 16:34:46 +0800 From: "Zhao1, Wei" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in multicast Thread-Index: AQHUomiNpKTrPsTFekeJeYBVlGwbDqWdCsWAgAG/9VA= Date: Fri, 4 Jan 2019 08:34:46 +0000 Message-ID: References: <1546410760-24879-1-git-send-email-wei.zhao1@intel.com> <039ED4275CED7440929022BC67E706115331422E@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E706115331422E@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in multicast 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:34:50 -0000 > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, January 3, 2019 9:47 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org; Wu, Jingjing ; Zhao1, Wei > > Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in > multicast >=20 > Hi Wei >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao > > Sent: Wednesday, January 2, 2019 2:33 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Wu, Jingjing ; Zhao1, Wei > > > > Subject: [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in > > multicast >=20 > What is MAT means ? > > > > 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 onlty after this vf > > has been set multicast address. If this bit is 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 b= ug. >=20 > There are some typo in you commit log. Sorry, v2 will commit. >=20 > > > > Fixes: 00e30184daa0 ("ixgbe: add PF support") > > > > Signed-off-by: Wei Zhao > > --- > > 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 =3D hw->mac.num_rar_entries - (vf + 1); > > uint32_t vmolr =3D IXGBE_READ_REG(hw, IXGBE_VMOLR(vf)); > > > > - vmolr |=3D (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_ROMPE | > > + vmolr |=3D (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 =3D (0x1 << > IXGBE_MTA_BIT_SHIFT) - > > 1; > > uint32_t reg_val; > > int i; > > + u32 vmolr =3D 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 |=3D IXGBE_VMOLR_ROMPE; > > + IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr); >=20 >=20 > Please correct me if I'm wrong >=20 > My understand is MTA table is shared by all VFs (I guess also pf), but wh= at if Yes, vf share it but not pf, it is used in vf pool switch > two VFs both enable multi-cast but with different address filter? > Should we prevent the second one to enable multi-cast if any conflict be > detected? Otherwise there still will be unexpected behavior. Sorry, I do not known what is the confict. Because IXGBE_VMOLR is vf specific, that is to say, each vf control itself = for enable ROMPE. >=20 > > + > > return 0; > > } > > > > -- > > 2.7.5