From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B45DEA04B5; Wed, 4 Dec 2019 16:18:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 10D161BE84; Wed, 4 Dec 2019 16:18:51 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 70A081F5 for ; Wed, 4 Dec 2019 16:18:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575472728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=po4ZNBNNRvNoQ3guez9dwgqarSll9P6dfTz6WpQcdgs=; b=TwwDoPPvukrdP7KGbExfi5kj8tUyfbsL7GVH94AKSFglH+mUq8Z8Hf8ZeoH5a5YA4S9Le1 vwpWIiw3xIxFa0zAgWB5ge8wFL9WOcoDwK2gpWTwa7/HVkGUAcL7Da/zuuJhO4QN93ysr4 kb+Te5iAax/ZALS2EgBF2bJRk2DvaU8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-406--i3_LplYPMGldSo66sT_3Q-1; Wed, 04 Dec 2019 10:18:47 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81DEC8024C8; Wed, 4 Dec 2019 15:18:46 +0000 (UTC) Received: from [10.36.118.152] (unknown [10.36.118.152]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8A9C1001B28; Wed, 4 Dec 2019 15:18:45 +0000 (UTC) From: "Eelco Chaudron" To: beilei.xing@intel.com, qi.z.zhang@intel.com Cc: xiao.zhang@intel.com, dev@dpdk.org Date: Wed, 04 Dec 2019 16:18:43 +0100 Message-ID: <42155D7E-BE15-4EE3-8400-78EF8D1C3D0C@redhat.com> In-Reply-To: <20191119134431.13566.87940.stgit@netdev64> References: <20191119134431.13566.87940.stgit@netdev64> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: -i3_LplYPMGldSo66sT_3Q-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: always re-program promiscuous mode on VF interface 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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=20 > programming. > > v1 patch was called: net/i40e: force promiscuous state after VF=20 > reset > > drivers/net/i40e/i40e_ethdev_vf.c | 16 ---------------- > 1 file changed, 16 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c=20 > 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=20 > rte_pci_device *pci_dev) > =09struct i40e_vf *vf =3D=20 > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > =09int ret; > > -=09/* If enabled, just return */ > -=09if (vf->promisc_unicast_enabled) > -=09=09return 0; > - > =09ret =3D i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled); > =09if (ret =3D=3D 0) > =09=09vf->promisc_unicast_enabled =3D TRUE; > @@ -2181,10 +2177,6 @@ static int eth_i40evf_pci_remove(struct=20 > rte_pci_device *pci_dev) > =09struct i40e_vf *vf =3D=20 > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > =09int ret; > > -=09/* If disabled, just return */ > -=09if (!vf->promisc_unicast_enabled) > -=09=09return 0; > - > =09ret =3D i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled); > =09if (ret =3D=3D 0) > =09=09vf->promisc_unicast_enabled =3D FALSE; > @@ -2200,10 +2192,6 @@ static int eth_i40evf_pci_remove(struct=20 > rte_pci_device *pci_dev) > =09struct i40e_vf *vf =3D=20 > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > =09int ret; > > -=09/* If enabled, just return */ > -=09if (vf->promisc_multicast_enabled) > -=09=09return 0; > - > =09ret =3D i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1); > =09if (ret =3D=3D 0) > =09=09vf->promisc_multicast_enabled =3D TRUE; > @@ -2219,10 +2207,6 @@ static int eth_i40evf_pci_remove(struct=20 > rte_pci_device *pci_dev) > =09struct i40e_vf *vf =3D=20 > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > =09int ret; > > -=09/* If enabled, just return */ > -=09if (!vf->promisc_multicast_enabled) > -=09=09return 0; > - > =09ret =3D i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0); > =09if (ret =3D=3D 0) > =09=09vf->promisc_multicast_enabled =3D FALSE;