DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH]net/hinic: fix coredump when secondary process using the hinic port.
       [not found] <2027a001-c422-6464-ccff-1d3d90039ecd@huawei.com>
@ 2020-11-02 14:48 ` Qingqing Li
  2020-11-11 13:07   ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Qingqing Li @ 2020-11-02 14:48 UTC (permalink / raw)
  To: dev, ferruh.yigit, xuanziyang2, cloud.wangxiaoyun, zhouguoyang,
	Hushiyuan

the reason is that during the stage of secondary process port initialization,
it lacks the initialization of "eth_dev->dev_ops".

Signed-off-by: Qingqing Li <liqingqing3@huawei.com>
---
 drivers/net/hinic/hinic_pmd_ethdev.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b694fd83c..786095e9d 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,20 @@ 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);
 }

-- 
2.19.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH]net/hinic: fix coredump when secondary process using the hinic port.
  2020-11-02 14:48 ` [dpdk-dev] [PATCH]net/hinic: fix coredump when secondary process using the hinic port Qingqing Li
@ 2020-11-11 13:07   ` Ferruh Yigit
  2021-02-18 17:54     ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2020-11-11 13:07 UTC (permalink / raw)
  To: Ziyang Xuan, Guoyang Zhou, Xiaoyun Wang; +Cc: dev, Qingqing Li, Hushiyuan

On 11/2/2020 2:48 PM, Qingqing Li wrote:
> the reason is that during the stage of secondary process port initialization,
> it lacks the initialization of "eth_dev->dev_ops".
> 
> Signed-off-by: Qingqing Li <liqingqing3@huawei.com>

Hi Ziyang, Guoyang, Xiaoyun,

The patch is around for a long time [1], can you please review the patch?

Review has been requested multiple times now, not sure why there is no response.

As 'hinic' driver maintainers, expectation is not just send patches to your 
driver, also review patches in the community, *at least* ones against your driver.

Thanks,
ferruh


[1]
https://patches.dpdk.org/patch/75318/
https://patches.dpdk.org/patch/75319/
[ There are a few more versions in between ]
https://patches.dpdk.org/patch/83174/
https://patches.dpdk.org/patch/83421/ [This one]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH]net/hinic: fix coredump when secondary process using the hinic port.
  2020-11-11 13:07   ` Ferruh Yigit
@ 2021-02-18 17:54     ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2021-02-18 17:54 UTC (permalink / raw)
  To: Ziyang Xuan, Guoyang Zhou, Xiaoyun Wang; +Cc: dev, Qingqing Li, Hushiyuan

On 11/11/2020 1:07 PM, Ferruh Yigit wrote:
> On 11/2/2020 2:48 PM, Qingqing Li wrote:
>> the reason is that during the stage of secondary process port initialization,
>> it lacks the initialization of "eth_dev->dev_ops".
>>
>> Signed-off-by: Qingqing Li <liqingqing3@huawei.com>
> 
> Hi Ziyang, Guoyang, Xiaoyun,
> 
> The patch is around for a long time [1], can you please review the patch?
> 
> Review has been requested multiple times now, not sure why there is no response.
> 
> As 'hinic' driver maintainers, expectation is not just send patches to your 
> driver, also review patches in the community, *at least* ones against your driver.
> 
> Thanks,
> ferruh
> 
> 
> [1]
> https://patches.dpdk.org/patch/75318/
> https://patches.dpdk.org/patch/75319/
> [ There are a few more versions in between ]
> https://patches.dpdk.org/patch/83174/
> https://patches.dpdk.org/patch/83421/ [This one]


Hi Ziyang, Guoyang, Xiaoyun,

What is the latest status of this patch?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH] net/hinic: fix coredump when secondary process using the hinic port.
@ 2020-08-08  7:20 liqingqing
  0 siblings, 0 replies; 4+ messages in thread
From: liqingqing @ 2020-08-08  7:20 UTC (permalink / raw)
  To: dev, xuanziyang2, cloud.wangxiaoyun, zhouguoyang
  Cc: Hushiyuan, wangshuo47, Liusirui

From 2eb6ad4d30af54f309f35f16a39a119aa26e7911 Mon Sep 17 00:00:00 2001
From: liqingqing <liqingqing3@huawei.com>
Date: Sat, 8 Aug 2020 00:03:25 -0400
Subject: [PATCH] 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: liqingqing <liqingqing3@huawei.com>
---
 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);
 }

-- 
2.19.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-18 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2027a001-c422-6464-ccff-1d3d90039ecd@huawei.com>
2020-11-02 14:48 ` [dpdk-dev] [PATCH]net/hinic: fix coredump when secondary process using the hinic port Qingqing Li
2020-11-11 13:07   ` Ferruh Yigit
2021-02-18 17:54     ` Ferruh Yigit
2020-08-08  7:20 [dpdk-dev] [PATCH] net/hinic: " liqingqing

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