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 A4B15A04B6; Tue, 13 Oct 2020 10:46:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31B631DA9E; Tue, 13 Oct 2020 10:46:38 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 31AEE1DA4E for ; Tue, 13 Oct 2020 10:46:35 +0200 (CEST) IronPort-SDR: nT2x8DZFyTL7VG3oKrS41hFlRxGWGUs16OjtRm03B9aKEQtXL/naplA+dKGFdlEt4mQ+yJM9C4 ENJQTlJ89uvA== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="250569799" X-IronPort-AV: E=Sophos;i="5.77,369,1596524400"; d="scan'208";a="250569799" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 01:46:25 -0700 IronPort-SDR: QG7wbWL2ezdkvJdopb+l+rzrklHIJJiO+LIYy5rsBewgKgg4NYGHhQ8XKvqOkwUssamU5Wl9Fz rXic2AjNgpxA== X-IronPort-AV: E=Sophos;i="5.77,369,1596524400"; d="scan'208";a="530314515" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.214.64]) ([10.213.214.64]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 01:46:23 -0700 To: l00283554 , dev@dpdk.org, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com Cc: Hushiyuan , wangshuo47@huawei.com, Liusirui References: <5147753f-bb23-ee21-5ba8-4eb8ef908225@huawei.com> <238443d2-512d-185d-945e-6c77815f7888@huawei.com> <12de74a8-9b1c-d664-0ea3-89c80f69b9e2@huawei.com> From: Ferruh Yigit Message-ID: <12f0f416-0eb3-12e9-b0a9-b58588fdb40c@intel.com> Date: Tue, 13 Oct 2020 09:46:19 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3] net/hinic: fix secondary process's using coredump. 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 10/9/2020 8:47 AM, l00283554 wrote: > fix coredump when secondary process using the hinic port. > the reason is that during the stage of > secondary process port initialization, > it lack the initialization of "eth_dev->dev_ops". > > Signed-off-by: Qingqing Li > --- > v3: update the signed-off information. > --- > v2:  solve the coding style issue. > --- >  drivers/net/hinic/hinic_pmd_ethdev.c | 21 ++++++++++++--------- >  1 file changed, 12 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c > b/drivers/net/hinic/hinic_pmd_ethdev.c > index 67e6afcf7..26c6098d3 100644 > --- a/drivers/net/hinic/hinic_pmd_ethdev.c > +++ b/drivers/net/hinic/hinic_pmd_ethdev.c > @@ -3060,15 +3060,6 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev) >      int rc; > >      pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); > - > -    /* EAL is SECONDARY and eth_dev is already created */ > -    if (rte_eal_process_type() != RTE_PROC_PRIMARY) { > -        PMD_DRV_LOG(INFO, "Initialize %s in secondary process", > -                eth_dev->data->name); > - > -        return 0; > -    } > - >      nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev); >      memset(nic_dev, 0, sizeof(*nic_dev)); > > @@ -3206,6 +3197,18 @@ static int hinic_dev_init(struct rte_eth_dev *eth_dev) >      eth_dev->rx_pkt_burst = hinic_recv_pkts; >      eth_dev->tx_pkt_burst = hinic_xmit_pkts; > > +    /* EAL is SECONDARY and eth_dev is already created */ > +    if (rte_eal_process_type() != RTE_PROC_PRIMARY) { > +        PMD_DRV_LOG(INFO, "Initialize %s in secondary process", > eth_dev->data->name); > + > +        struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev); > +        if (HINIC_IS_VF(nic_dev->hwdev)) > +            eth_dev->dev_ops = &hinic_pmd_vf_ops; > +        else > +            eth_dev->dev_ops = &hinic_pmd_ops; > +        return 0; > +    } > + >      return hinic_func_init(eth_dev); >  } > Overall looks good to me, waiting ack from driver maintainers. Meanwhile the patch doesn't apply cleanly, it seems same problem in the CI, can you please rebase on top of latest head and send the patch again?