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 0F3DCA04B4; Tue, 19 Nov 2019 14:55:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A171BA69; Tue, 19 Nov 2019 14:55:39 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 97B731F5 for ; Tue, 19 Nov 2019 14:55:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574171738; 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=/JPbtLA4R8Bb0mrUApMUqzFbQzfcSsG1pXlEAnqlrGE=; b=Y6ML/DsjUwVmIlSZfn3aDVYF+7KnctjEC7cxrSv6A9WgrSrVn+ay5KZnKIzz3YisgkYQp5 xZPqUPMZrSKvBslnenMsJmfEzEssl15OZ4J/coMYXJ+Zc5FnayVbMgov4ZkgBqiiUqLJHg 7vwVQ4yw2yhMByZYmgg2dbD3zeZkZLc= 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-254-kaxqFQAROlau5CEzWsWiJg-1; Tue, 19 Nov 2019 08:55:34 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B41EF800580; Tue, 19 Nov 2019 13:55:33 +0000 (UTC) Received: from [10.36.116.191] (ovpn-116-191.ams2.redhat.com [10.36.116.191]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B984C5037E; Tue, 19 Nov 2019 13:55:32 +0000 (UTC) From: "Eelco Chaudron" To: "Zhang, Xiao" Cc: "Zhang, Qi Z" , dev@dpdk.org, "Xing, Beilei" Date: Tue, 19 Nov 2019 14:55:30 +0100 Message-ID: In-Reply-To: References: <675a204e3f5630d66cfa79b933da25a6c9227069.1568705792.git.echaudro@redhat.com> <94479800C636CB44BD422CB454846E013CE63719@SHSMSX101.ccr.corp.intel.com> <65C73CA4-E1AA-44F2-9258-586B23CC1448@redhat.com> <63F37687-13EA-426A-A23D-301EE6CB65F0@redhat.com> <94479800C636CB44BD422CB454846E013CE7E99B@SHSMSX101.ccr.corp.intel.com> <724A0BBE-66F4-40D3-A38E-8F4E9C09ECC5@redhat.com> <56E46949-C2B5-42C6-9F21-E4A5E519A628@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: kaxqFQAROlau5CEzWsWiJg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable 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" On 13 Nov 2019, at 2:14, Zhang, Xiao wrote: >> -----Original Message----- >> From: Eelco Chaudron [mailto:echaudro@redhat.com] >> Sent: Tuesday, November 12, 2019 7:09 PM >> To: Zhang, Xiao >> Cc: Zhang, Qi Z ; dev@dpdk.org; Xing, Beilei >> >> Subject: Re: [dpdk-dev] [PATCH] net/i40e: force promiscuous state=20 >> after VF >> reset >> >> >> >> On 12 Nov 2019, at 1:52, Zhang, Xiao wrote: >> >>> Hi Eelco, >>> >>> Seems you missed this mail. >> >> Not sure why I missed this email, as it does not show up in my email=20 >> client :( See >> below=E2=80=A6 >> >> >> >>>>>>>> Hi Eelco, >>>>>>>> >>>>>>>> I think you may need add more detailed message in the commit=20 >>>>>>>> log >>>>>>>> or comments. >>>>>>> >>>>>>> My interpretation of the request was that Beilei wanted to know >>>>>>> why >>>>>>> disabling promiscuous mode in HW was failing. Beilei can you >>>>>>> comment, is the additional description from Xiao enough? >>>>>> >>>>>> Yes, promisc_unicast_enabled flag is not cleared during vf reset >>>>>> because fail to disable promiscuous mode, So I think we need to >>>>>> root >>>>>> cause why fail to disable promiscuous mode first. >>>>>> This patch looks like a workaround but not a fix. >>>>>> >>>>> >>>>> This was debugged together with Xiao and from what I understand is >>>>> that DPDK fails to reset promiscuous mode in hardware as PF and VF >>>>> operations are not synced between kernel and DPDK. >>>>> >>>>> Xiao told me this could not be fixed in another way, Xiao can you >>>>> comment? >>>>> >>>> >>>> Checked again, the root cause is not synced issue between kernel=20 >>>> and >>>> DPDK >>>> during reset. >> >> What is the root cause, so I can update the patch description for the >> next revision. > > Kernel PF do reset once VF mac changed and send reset event to VF, > VF do reset once received even if reset task not done by PF, so admin=20 > q message will not get response. Thanks, added this to the v2 commit message. >> >>>> Suggest to remove the checking and setting of=20 >>>> promisc_unicast_enabled >>>> flag, >>>> since this flag is only used when enable/disable promiscuous mode. >>>> Considering the un-synced issue, it will be more clean if remove=20 >>>> the >>>> flag. >>>> Also same with flag promisc_multicast_enabled. >> >> So if I understand it correctly remove the following code: >> >> 2203 =09/* If enabled, just return */ >> 2204 =09if (vf->promisc_multicast_enabled) >> 2205 =09=09return 0; >> >> and >> >> 2222 =09/* If enabled, just return */ >> 2223 =09if (!vf->promisc_multicast_enabled) >> 2224 =09=09return 0; >> >> Or to remove the flags from the i40e_vf structure (and relative =20 >> code): >> >> 1051 =09bool promisc_unicast_enabled; >> 1052 =09bool promisc_multicast_enabled; >> >> Let me know and I craft up a patch=E2=80=A6 > > You can remove promisc_unicast_enabled/promisc_multicast_enabled and=20 > related code. Removing the flags did not work, as they are needed for programming one=20 or the other, so I kept them. In the end, I removed the =E2=80=9CIf enabled=E2=80=9D checks above, see th= e v2=20 patch with the name =E2=80=9C[PATCH v2] net/i40e: always re-program promiscuous mode on VF=20 interface=E2=80=9D