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 BFD33A04FD; Tue, 17 Dec 2019 14:50:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E9AD1BEDE; Tue, 17 Dec 2019 14:50:34 +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 247721BE9E for ; Tue, 17 Dec 2019 14:50:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576590632; 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=tKWEO1Su8sNV9nHb+b+r7NavXz8q9/Kspvj6BY1POkE=; b=R9Tv/ja/ElHfx0SvGdatA4sJxnoYwYKvLt/dgWQxl7faZVPnkvmQt1IuopBaBzNdJfcU3a g21vFEvqL0gcszTfl65dLwsvZtWwruht3ev4zddYVhwV7NO34w2skGUwLy4QcXeVJvZugX KVlI/gt85Z6XFjO5lVefUvJ1zRZl1vo= 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-126-SsCB8dVyNvyHIOS-JxatHw-1; Tue, 17 Dec 2019 08:50:30 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 636438D5B28; Tue, 17 Dec 2019 13:50:29 +0000 (UTC) Received: from [10.36.116.185] (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A4DE7D8B5; Tue, 17 Dec 2019 13:50:28 +0000 (UTC) From: "Eelco Chaudron" To: beilei.xing@intel.com, qi.z.zhang@intel.com, xiao.zhang@intel.com Cc: dev@dpdk.org Date: Tue, 17 Dec 2019 14:50:26 +0100 Message-ID: <6919A158-05DA-495C-A16E-33981DB80145@redhat.com> In-Reply-To: <42155D7E-BE15-4EE3-8400-78EF8D1C3D0C@redhat.com> References: <20191119134431.13566.87940.stgit@netdev64> <42155D7E-BE15-4EE3-8400-78EF8D1C3D0C@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: SsCB8dVyNvyHIOS-JxatHw-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" Trying again? On 4 Dec 2019, at 16:18, Eelco Chaudron wrote: > 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=20 >> independently >> of the current admin state. >> >> Signed-off-by: Eelco Chaudron >> --- >> v1-v2: >> In the earlier patch, we would force the=20 >> 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;