From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D654DA0C45; Tue, 14 Sep 2021 04:52:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A1CA4068F; Tue, 14 Sep 2021 04:52:14 +0200 (CEST) Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by mails.dpdk.org (Postfix) with ESMTP id 4526140151; Tue, 14 Sep 2021 04:52:13 +0200 (CEST) Received: by mail-yb1-f179.google.com with SMTP id k65so24894143yba.13; Mon, 13 Sep 2021 19:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SAN6zvjvc/y9Do5e8E3mETbYb8CuiZoG2DmGesSGiS4=; b=GkMbgg49D75Em4VjeoxRB4NvdQQDOhq29Msjk2cMILWpA3iWoJwI5V3TMPj2DUOJjp dfl1dgHPv/p+XZ0VaJqjGGlKRGWyQ0da0jwX7e/AuTgl40zMnGw+VLn1fklPTeQ9xQE1 9tQuL+53qnMUMttFYXd4YJFeBPSIUWj+dsSx/stBqQF1FsHt0xi5fsZ8sClyavtHk67c Jxgl5rkTwDNjF0eGJM1lD9TH7bl209DYYE18MVmbXVqfxhD2f9mgL9YqOaLd1h2XPho8 1teCcMbh9NCiswra4KLAfc+BsJFSr1BjyS3dlpBSHUE9bUawruhKusPG20Fv441551ZR hfqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SAN6zvjvc/y9Do5e8E3mETbYb8CuiZoG2DmGesSGiS4=; b=OsxaZZBvNQX1b6lLhWVPurxzicft2JkSWKP1LzKQ/e3yXkF9fze4S5+OLL9P9IkjvL 8WnhTxHwRmwqs1anLnE/1ov2FyakLDTAVkPIVakFzmfwJPAnMRM3GVXAR0iN8eNqlSEM ItiIprj5LlBFTphz6pS1VgKGvfmOaBciadAPo18kRcVT3RQzwKZpO/QwnCvkVxnoRw2a VSxshozfVahD98leNCMvSMWi+CWY0GN7UrJXL6AdagfsmDDh6onpQEtkMjGE1Pa6fPv9 D0/yoQE65FjS8JsvKzipSexEXlcQd9JTFKqOR7vi33FawBeZK1AHdrY0PAG7jPriBlax jJMg== X-Gm-Message-State: AOAM530+Zs5x0sdz5kRFjZaHJNrJYDEA5A8UPdaWhJxFDfXGVVulpu0P ih9ols8uhd9JCdLqn3E5Pw5rpjzKRRvVYB3bbUM= X-Google-Smtp-Source: ABdhPJyPjBymk8jDNYxsuaOQwepgFN2PShT66vTOoQ9+neTDPrwA1ucaOI0ZGUCUAOpud9u42jzCvdt2afjV+KD+WAk= X-Received: by 2002:a25:7108:: with SMTP id m8mr18797137ybc.246.1631587932393; Mon, 13 Sep 2021 19:52:12 -0700 (PDT) MIME-Version: 1.0 References: <20210825194526.14987-1-koncept1@gmail.com> <94f93212-6432-710b-1135-638e359741da@intel.com> <11dd4ae3-0396-b237-7f2b-1484f07bb637@redhat.com> <9527de1a-30ac-9bc9-ad11-14fbcd5207a1@intel.com> In-Reply-To: From: Ben Magistro Date: Mon, 13 Sep 2021 22:52:01 -0400 Message-ID: To: "Xueming(Steven) Li" Cc: Ferruh Yigit , Kevin Traynor , "dev@dpdk.org" , Beilei Xing , Luca Boccassi , Christian Ehrhardt , "ben.magistro@trinitycyber.com" , "stefan.baranoff@trinitycyber.com" , Qi Zhang , stable@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] driver: i40evf device initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" +cc: stable@dpdk.org Per discussions here, cc'ing stable for fix to be applied to LTS as i40evf is being removed from next. On Thu, Sep 2, 2021 at 8:37 AM Xueming(Steven) Li wrote: > > > > > -----Original Message----- > > From: Ferruh Yigit > > Sent: Monday, August 30, 2021 5:43 PM > > To: Xueming(Steven) Li ; Kevin Traynor ; Ben Magistro ; > > dev@dpdk.org; Beilei Xing ; Luca Boccassi ; Christian Ehrhardt > > > > Cc: ben.magistro@trinitycyber.com; stefan.baranoff@trinitycyber.com; Qi Zhang > > Subject: Re: [dpdk-dev] [PATCH] driver: i40evf device initialization > > > > On 8/27/2021 7:28 AM, Xueming(Steven) Li wrote: > > > > > > > > >> -----Original Message----- > > >> From: Kevin Traynor > > >> Sent: Thursday, August 26, 2021 6:46 PM > > >> To: Ferruh Yigit ; Ben Magistro > > >> ; dev@dpdk.org; Beilei Xing > > >> ; Luca Boccassi ; Christian > > >> Ehrhardt ; Xueming(Steven) Li > > >> > > >> Cc: ben.magistro@trinitycyber.com; stefan.baranoff@trinitycyber.com; > > >> Qi Zhang > > >> Subject: Re: [dpdk-dev] [PATCH] driver: i40evf device initialization > > >> > > >> + Christian and Xueming > > >> > > >> On 26/08/2021 11:25, Ferruh Yigit wrote: > > >>> On 8/25/2021 8:45 PM, Ben Magistro wrote: > > >>>> The i40evf driver is not initializing the eth_dev attribute which > > >>>> can result in a nullptr dereference. Changes were modeled after the > > >>>> iavf_dev_init() per suggestion from the mailing list[1]. > > >>>> > > >>>> [1] https://mails.dpdk.org/archives/dev/2021-August/217251.html > > >>>> > > >>>> Signed-off-by: Ben Magistro > > >>> > > >>> i40evf will be removed in this release. But I guess it helps for > > >>> stable releases to first merge the fixes and later removed it, not sure. > > >>> > > >>> @Luca, @Kevin, do you prefer this patch directly to stable repos, or > > >>> through the main repo? > > >> > > >> I'll leave to Luca/Xueming and Christian to say if they have a > > >> preference, but I'd guess either way is fine from stable view once it has fixes/stable tags or LTS patch prefix (it doesn't have any of > > these at present). > > > > > > Yes, any option will make it being noticed by LTS maintainer: > > > 1. patches accepted by main with "fix" in subject 2. patches accepted > > > by main with "cc: stable@dpdk.org" in commit message 3. patches > > > backported to LTS, sent to stable maillist with LTS prefix, for example "[20.11]" > > > > > > > Thanks Xueming, > > > > But is there a preferences for this case? > > > > The i40evf will be removed from main repo, is it better > > 1- first apply the fix and remove the component from main (I assume fix still will be bacported to LTS in this case) or > > 2- remove the i40evf from main (without fix), apply the fix directly to the LTS. > > Both options will work, the first is more easy and common I guess, both 19.11 LTS and 20.11 LTS maintainer can find it. > > > > > Thanks, > > ferruh > > > > >> > > >>> i40evf won't be tested in the main anyway, since it would be removed > > >>> before -rc1 testing, so it looks like there won't be any difference from testing point of view. > > >>> > > >>> > > >>>> --- > > >>>> drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++++-- > > >>>> 1 file changed, 6 insertions(+), 2 deletions(-) > > >>>> > > >>>> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > >>>> b/drivers/net/i40e/i40e_ethdev_vf.c > > >>>> index 0cfe13b7b2..ccdce9a16a 100644 > > >>>> --- a/drivers/net/i40e/i40e_ethdev_vf.c > > >>>> +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > >>>> @@ -1564,8 +1564,9 @@ i40evf_dev_alarm_handler(void *param) static > > >>>> int i40evf_dev_init(struct rte_eth_dev *eth_dev) { > > >>>> - struct i40e_hw *hw > > >>>> - = I40E_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); > > >>>> + struct i40e_adapter *adapter = > > >>>> + I40E_DEV_PRIVATE_TO_ADAPTER(eth_dev->data->dev_private); > > >>>> + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(adapter); > > >>>> struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); > > >>>> > > >>>> PMD_INIT_FUNC_TRACE(); > > >>>> @@ -1596,11 +1597,14 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev) > > >>>> hw->device_id = pci_dev->id.device_id; > > >>>> hw->subsystem_vendor_id = pci_dev->id.subsystem_vendor_id; > > >>>> hw->subsystem_device_id = pci_dev->id.subsystem_device_id; > > >>>> + hw->bus.bus_id = pci_dev->addr.bus; > > >>>> hw->bus.device = pci_dev->addr.devid; > > >>>> hw->bus.func = pci_dev->addr.function; > > >>>> hw->hw_addr = (void *)pci_dev->mem_resource[0].addr; > > >>>> hw->adapter_stopped = 1; > > >>>> hw->adapter_closed = 0; > > >>>> + hw->back = I40E_DEV_PRIVATE_TO_ADAPTER(eth_dev->data->dev_private); > > >>>> + adapter->eth_dev = eth_dev; > > >>>> > > >>>> if(i40evf_init_vf(eth_dev) != 0) { > > >>>> PMD_INIT_LOG(ERR, "Init vf failed"); > > >>>> > > >>> > > > >