patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Zhao1, Wei" <wei.zhao1@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in multicast
Date: Thu, 3 Jan 2019 13:47:21 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E706115331422E@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1546410760-24879-1-git-send-email-wei.zhao1@intel.com>

Hi Wei

> -----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 <jingjing.wu@intel.com>; Zhao1, Wei
> <wei.zhao1@intel.com>
> Subject: [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in multicast

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 bug.

There are some typo in you commit log.

> 
> Fixes: 00e30184daa0 ("ixgbe: add PF support")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  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);


Please correct me if I'm wrong

My understand is MTA table is shared by all VFs (I guess also pf), but what if 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.

> +
>  	return 0;
>  }
> 
> --
> 2.7.5

  reply	other threads:[~2019-01-03 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02  6:32 [dpdk-stable] " Wei Zhao
2019-01-03 13:47 ` Zhang, Qi Z [this message]
2019-01-04  8:34   ` [dpdk-stable] [dpdk-dev] " Zhao1, Wei
2019-01-04 12:13     ` Zhang, Qi Z
2019-01-04  8:34 ` [dpdk-stable] [PATCH v2] net/ixgbe: fix multicast table enable error for VF Wei Zhao
2019-01-04 12:20   ` Zhang, Qi Z
2019-01-07  1:25     ` Zhao1, Wei
2019-01-07  5:39   ` [dpdk-stable] [PATCH v3] " Wei Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=039ED4275CED7440929022BC67E706115331422E@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wei.zhao1@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).