DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: "Eelco Chaudron" <echaudro@redhat.com>
To: beilei.xing@intel.com, qi.z.zhang@intel.com
Cc: xiao.zhang@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: always re-program promiscuous mode on VF interface
Date: Wed, 04 Dec 2019 16:18:43 +0100
Message-ID: <42155D7E-BE15-4EE3-8400-78EF8D1C3D0C@redhat.com> (raw)
In-Reply-To: <20191119134431.13566.87940.stgit@netdev64>

Any update on this patch?


On 19 Nov 2019, at 14:45, Eelco Chaudron wrote:

> During a kernel PF reset, this event is propagated to the VF.
> The DPDK VF PMD will execute the reset task before the PF is done
> with his. This results in the admin queue message not being responded
> to leaving the port in "promiscuous" mode.
>
> This patch makes sure the promiscuous mode is configured independently
> of the current admin state.
>
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
> ---
> v1-v2:
>   In the earlier patch, we would force the vf->promisc_unicast_enabled
>   state to false after a reset. Based on the review comments it was
>   prefered to not take the current state into account when 
> programming.
>
>   v1 patch was called: net/i40e: force promiscuous state after VF 
> reset
>
>  drivers/net/i40e/i40e_ethdev_vf.c |   16 ----------------
>  1 file changed, 16 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c 
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 5dba092..43f7ab5 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -2162,10 +2162,6 @@ static int eth_i40evf_pci_remove(struct 
> rte_pci_device *pci_dev)
>  	struct i40e_vf *vf = 
> I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
>  	int ret;
>
> -	/* If enabled, just return */
> -	if (vf->promisc_unicast_enabled)
> -		return 0;
> -
>  	ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled);
>  	if (ret == 0)
>  		vf->promisc_unicast_enabled = TRUE;
> @@ -2181,10 +2177,6 @@ static int eth_i40evf_pci_remove(struct 
> rte_pci_device *pci_dev)
>  	struct i40e_vf *vf = 
> I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
>  	int ret;
>
> -	/* If disabled, just return */
> -	if (!vf->promisc_unicast_enabled)
> -		return 0;
> -
>  	ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled);
>  	if (ret == 0)
>  		vf->promisc_unicast_enabled = FALSE;
> @@ -2200,10 +2192,6 @@ static int eth_i40evf_pci_remove(struct 
> rte_pci_device *pci_dev)
>  	struct i40e_vf *vf = 
> I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
>  	int ret;
>
> -	/* If enabled, just return */
> -	if (vf->promisc_multicast_enabled)
> -		return 0;
> -
>  	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1);
>  	if (ret == 0)
>  		vf->promisc_multicast_enabled = TRUE;
> @@ -2219,10 +2207,6 @@ static int eth_i40evf_pci_remove(struct 
> rte_pci_device *pci_dev)
>  	struct i40e_vf *vf = 
> I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
>  	int ret;
>
> -	/* If enabled, just return */
> -	if (!vf->promisc_multicast_enabled)
> -		return 0;
> -
>  	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0);
>  	if (ret == 0)
>  		vf->promisc_multicast_enabled = FALSE;


      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 13:45 Eelco Chaudron
2019-12-04 15:18 ` Eelco Chaudron [this message]

Reply instructions:

You may reply publically 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=42155D7E-BE15-4EE3-8400-78EF8D1C3D0C@redhat.com \
    --to=echaudro@redhat.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=xiao.zhang@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

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git