DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: l00283554 <liqingqing3@huawei.com>,
	dev@dpdk.org, xuanziyang2@huawei.com,
	 cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com
Cc: Hushiyuan <hushiyuan@huawei.com>,
	wangshuo47@huawei.com, Liusirui <liusirui@huawei.com>
Subject: Re: [dpdk-dev] [PATCH v3] net/hinic: fix secondary process's using coredump.
Date: Tue, 13 Oct 2020 09:46:19 +0100
Message-ID: <12f0f416-0eb3-12e9-b0a9-b58588fdb40c@intel.com> (raw)
In-Reply-To: <aa7da95c-d5b6-5b5c-47b3-98b2ca701cde@huawei.com>

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 <liqingqing3@huawei.com>
> ---
> 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?

      reply	other threads:[~2020-10-13  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-08  7:20 [dpdk-dev] [PATCH] net/hinic: fix coredump when secondary process using the hinic port liqingqing
2020-08-08  7:45 ` [dpdk-dev] [PATCH v2] net/hinic: fix secondary process's using coredump liqingqing
2020-09-01 11:44   ` Ferruh Yigit
2020-09-14 13:21     ` Ferruh Yigit
     [not found]   ` <12de74a8-9b1c-d664-0ea3-89c80f69b9e2@huawei.com>
     [not found]     ` <f3b34a16-9fca-e2e2-d11a-7f55c35268de@huawei.com>
2020-10-09  7:47       ` [dpdk-dev] [PATCH v3] " l00283554
2020-10-13  8:46         ` Ferruh Yigit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12f0f416-0eb3-12e9-b0a9-b58588fdb40c@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=hushiyuan@huawei.com \
    --cc=liqingqing3@huawei.com \
    --cc=liusirui@huawei.com \
    --cc=wangshuo47@huawei.com \
    --cc=xuanziyang2@huawei.com \
    --cc=zhouguoyang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git