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 4F32FA034F; Mon, 22 Mar 2021 10:04:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB07540040; Mon, 22 Mar 2021 10:04:57 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id B69944003D for ; Mon, 22 Mar 2021 10:04:55 +0100 (CET) IronPort-SDR: vxUSXiJPGSKH+l192h8a8he8gbs5wl4NH7kEt7iKF+649ADawq4YZXVfpz4ZA1umnLVFv7BkZR FkVcW1j6CQig== X-IronPort-AV: E=McAfee;i="6000,8403,9930"; a="275326044" X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="275326044" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2021 02:04:54 -0700 IronPort-SDR: wwVAG1ZczDCdJ/rrrA76xAAIfOXbl3DNL9jYdIwBx753rDEaAiiIYlPxW6yVLt3xuM3omO08Aj uI9nFFeJigNg== X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="451667366" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.14.44]) ([10.252.14.44]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2021 02:04:52 -0700 To: "Wangxiaoyun (Cloud)" , Qingqing Li , dev@dpdk.org, zhouguoyang@huawei.com Cc: Hushiyuan , yin.yinshi@huawei.com, xuanziyang2@huawei.com References: <836f40cb-57a9-7b02-adcc-dd302a93a722@huawei.com> <0a7d71fa-86f3-d8d0-3e77-1edfa6d5faf5@huawei.com> <3b629e80-39e1-5595-c88f-9b4871eccb8b@huawei.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <69b3d3c5-295d-c2d5-2c6b-32640ec579cf@intel.com> Date: Mon, 22 Mar 2021 09:04:51 +0000 MIME-Version: 1.0 In-Reply-To: <3b629e80-39e1-5595-c88f-9b4871eccb8b@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port. 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" On 3/18/2021 6:12 AM, Wangxiaoyun (Cloud) wrote: > Hi Ferruh, >     For secondary process fix,you can refer to this patch "net/hinic: fix > coredump when PMD used by fstack". > Thanks Got it, thanks for new version. I am marking the old one as superseded. For reference, the old one is: https://patches.dpdk.org/project/dpdk/patch/19384408-c7b8-8140-2f92-a4fcc071715f@huawei.com/ > > 在 2020/11/12 20:30, Wangxiaoyun (Cloud) 写道: >> When we complete repair and testing, we will upstream the patch in next release, >> maybe not keep up with 20.11. >> >> 在 2020/11/12 17:26, Ferruh Yigit 写道: >>> On 11/12/2020 2:11 AM, Wangxiaoyun (Cloud) wrote: >>>> Hi Ferruh, >>>> >>>> Align with Qingqing Li, this path will not apply to dpdk master now, some >>>> dev_ops may >>>> casue fail when run in secondary proc, so need to modify it later and add >>>> tests for other >>>> dev_ops. >>>> >>> >>> So will there be a new version in next release? >>> >>> Please feel free to put comments in the mail list, it helps recording the >>> status and people looking for it later. >>> >>> >>>> Thanks >>>> >>>> 在 2020/10/31 18:10, Qingqing Li 写道: >>>>> 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 >>>>> --- >>>>> v4: adapt to the latest version. >>>>> --- >>>>> v3: update the signed-off information. >>>>> --- >>>>> v2:  solve the coding style issue. >>>>> Signed-off-by: liqingqing >>>>> --- >>>>>   drivers/net/hinic/hinic_pmd_ethdev.c | 20 ++++++++++++-------- >>>>>   1 file changed, 12 insertions(+), 8 deletions(-) >>>>> >>>>> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c >>>>> b/drivers/net/hinic/hinic_pmd_ethdev.c >>>>> index b694fd83c..526dafdad 100644 >>>>> --- a/drivers/net/hinic/hinic_pmd_ethdev.c >>>>> +++ b/drivers/net/hinic/hinic_pmd_ethdev.c >>>>> @@ -3100,14 +3100,6 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev) >>>>> >>>>>       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; >>>>> -    } >>>>> - >>>>>       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS; >>>>> >>>>>       nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev); >>>>> @@ -3241,6 +3233,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); >>>>>   } >>>>> >>> >>> .