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 9BC49A0583; Fri, 20 Mar 2020 05:22:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 957211515; Fri, 20 Mar 2020 05:22:03 +0100 (CET) Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65]) by dpdk.org (Postfix) with ESMTP id 1154BF90 for ; Fri, 20 Mar 2020 05:22:02 +0100 (CET) Received: by mail-vs1-f65.google.com with SMTP id m25so3224282vsa.7 for ; Thu, 19 Mar 2020 21:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K8Sk2BDRvePFlJcs4x6QwNWxYs3hoqRtiwZVZq2zoJI=; b=Ebe2njWKWxg3fX7ZPaVPlC/mSXim00mrEMSKok4O4bbICWlgezo4zvoeMuFDnX19/D tCnr8IqIJdTXCK9cQtW5JxvAxEIyuH0dqxMqXbXLgcj7gdP8AnziVRoVDo/gf/BbWGay HZ/H+4rsIBPn0V5hd8hooMkKYp26BRPqiAQdY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K8Sk2BDRvePFlJcs4x6QwNWxYs3hoqRtiwZVZq2zoJI=; b=mbh6LPmHiUnRHydSu3xprxQTTFxuhNur8AWxeXM93WBZ9ByxKKsBonIAQAXNT/9p8T 9sGy9F2PaV4grlMqA8nXd9oHAIkj/Xkn988GyZP4Ni+GI7l47OSNZiJj0rI3iHhHelbg Fy5pdipeq7o9FWQaCcw4AwnGGY8jkKT2SzFUzgPzsMUUES3wjBsUPjkismbwdpidFa3k G4WmWyk0lTb3k+0Twz8qXMuClUFXXTkrJ4oWkuAA89Fbtr52HiLv+2q72DBpPpadlYZ+ xc6y+bmvqFg2uVhUo0Nsj2Mlkc5r+AdDinTDa2cYavzd4hXB85fyKDldBl0NGwhnTzBd I+/w== X-Gm-Message-State: ANhLgQ2KLHi8nJhYAcL5Rugl7PAQntiy5J5c9oK3DyVmSR+NL6q9+U29 QIijxieLdPy/829NUjXTH45thNRGVHL79CMh4MtrtQ== X-Google-Smtp-Source: ADFU+vucxvVWFnsax2QkVfaLN+R4lKWLZUB8XovBXX3f8yw5lERheKTaKOj/ERMoAp2YpuvDs5gOwThHBEmAIW1fAcM= X-Received: by 2002:a67:7c55:: with SMTP id x82mr5128889vsc.187.1584678121111; Thu, 19 Mar 2020 21:22:01 -0700 (PDT) MIME-Version: 1.0 References: <20200214064353.31022-1-somnath.kotur@broadcom.com> <2210365.oX9e4DgFVH@xps> In-Reply-To: <2210365.oX9e4DgFVH@xps> From: Somnath Kotur Date: Fri, 20 Mar 2020 09:51:49 +0530 Message-ID: To: Thomas Monjalon Cc: Gaetan Rivet , Ferruh Yigit , dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] eal: fix to set the rte_device ptr's device args before hotplug 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 Mon, Feb 17, 2020 at 3:36 PM Thomas Monjalon wrote: > > 17/02/2020 11:02, Ferruh Yigit: > > On 2/17/2020 3:18 AM, Somnath Kotur wrote: > > > On Fri, Feb 14, 2020 at 1:54 PM Gaetan Rivet wrote: > > >> > > >> On 14/02/2020 07:43, Somnath Kotur wrote: > > >>> As per the comments in this code section, since there is a matching device, > > >>> it is now its responsibility to manage the devargs we've just inserted. > > >>> But the matching device ptr's devargs is still uninitialized or not pointing > > >>> to the newest dev_args that were passed as a parameter to local_dev_probe(). > > >>> This is needed particularly in the case when *probe is called again* on an > > >>> already probed device as part of adding a representor port to an OVS switch(OVS-DPDK) > > >>> > > >>> Fixes: 7e8b26650146 ("eal: fix hotplug add / remove") > > >>> Signed-off-by: Somnath Kotur > > >>> --- > > >>> v1->v2: Incorporated suggestions from Gaetan Rivet > > >>> drivers/bus/pci/linux/pci.c | 5 +++++ > > >>> 1 file changed, 5 insertions(+) > > >>> > > >>> diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c > > >>> index 740a2cd..71b0a30 100644 > > >>> --- a/drivers/bus/pci/linux/pci.c > > >>> +++ b/drivers/bus/pci/linux/pci.c > > >>> @@ -377,6 +377,11 @@ > > >>> */ > > >>> RTE_LOG(ERR, EAL, "Unexpected device scan at %s!\n", > > >>> filename); > > >>> + else if (dev2->device.devargs != > > >>> + dev->device.devargs) { > > >>> + rte_devargs_remove(dev2->device.devargs); > > >>> + pci_name_set(dev2); > > >>> + } > > >>> } > > >>> free(dev); > > >>> } > > >>> > > >> > > >> Hi Somnath, > > >> > > >> I see that this is already pretty similar in BSD (minus the rte_devargs_remove()), > > >> so if you have tested and validated that this works properly I'm fine with this patch. > > >> > > >> This might miss a Cc: stable@dpdk.org, otherwise, > > >> > > >> Acked-by: Gaetan Rivet > > > > > > Off the list. > > > Thanks Gaetan. Ferruh : Anything else you waiting from my side or is > > > this done ? > > > > Hi Somnath, > > > > The patch is for the main repo, it is Thomas who will merge it, cc'ed. > > I won't take any risk changing this critical code in the last days of 20.02. > I will take time to review it carefully post-20.02. > Thomas, Now that 20.02 is out and we are already in the 20.05 window, could you please merge this in or pls give me an ETA by when you think you'll be able to do it? Thank you so much! Som