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 EFFACA2EFC for ; Tue, 15 Oct 2019 12:32:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 560B41EB61; Tue, 15 Oct 2019 12:32:10 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 08DCD1EB35 for ; Tue, 15 Oct 2019 12:32:07 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 585033C928; Tue, 15 Oct 2019 10:32:07 +0000 (UTC) Received: from [172.16.255.128] (unknown [10.36.118.78]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B5071194B6; Tue, 15 Oct 2019 10:32:02 +0000 (UTC) From: "Eelco Chaudron" To: beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org Date: Tue, 15 Oct 2019 12:31:59 +0200 Message-ID: In-Reply-To: <675a204e3f5630d66cfa79b933da25a6c9227069.1568705792.git.echaudro@redhat.com> References: <675a204e3f5630d66cfa79b933da25a6c9227069.1568705792.git.echaudro@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 15 Oct 2019 10:32:07 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] net/i40e: force promiscuous state after VF reset 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? Thanks, Eelco On 17 Sep 2019, at 9:40, Eelco Chaudron wrote: > Even though the device reset is successful, disabling promiscuous mode > might not always succeed, causing enabling it after reset to > fail. This would happen when the kernel driver requires a reset of the > VF. > > This patch resets the internal state, so next time promiscuous mode is > configured it will be enabled. > > Signed-off-by: Eelco Chaudron > --- > drivers/net/i40e/i40e_ethdev_vf.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > b/drivers/net/i40e/i40e_ethdev_vf.c > index 551f6fa..e0f99a4 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -2276,11 +2276,21 @@ static int eth_i40evf_pci_remove(struct > rte_pci_device *pci_dev) > i40evf_dev_reset(struct rte_eth_dev *dev) > { > int ret; > + struct i40e_vf *vf = > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > > ret = i40evf_dev_uninit(dev); > if (ret) > return ret; > > + /* > + * Even though the device reset is successful disabling promiscuous > + * mode might not always succeed, causing enabling it after reset to > + * fail. This would happen when the kernel driver requires a reset > + * of the VF. > + */ > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) > + vf->promisc_unicast_enabled = FALSE; > + > ret = i40evf_dev_init(dev); > > return ret; > -- > 1.8.3.1