DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [v3]net/hinic: fix coredump when the scondary process using the hinic port.
@ 2020-10-31  9:38 Qingqing Li
  2020-10-31 10:01 ` [dpdk-dev] [v4]net/hinic: " Qingqing Li
  0 siblings, 1 reply; 10+ messages in thread
From: Qingqing Li @ 2020-10-31  9:38 UTC (permalink / raw)
  To: dev, cloud.wangxiaoyun, zhouguoyang; +Cc: Hushiyuan

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);
  }

-- 
2.19.1


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

* [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-10-31  9:38 [dpdk-dev] [v3]net/hinic: fix coredump when the scondary process using the hinic port Qingqing Li
@ 2020-10-31 10:01 ` Qingqing Li
  2020-10-31 10:10   ` Qingqing Li
  2020-10-31 10:23   ` Qingqing Li
  0 siblings, 2 replies; 10+ messages in thread
From: Qingqing Li @ 2020-10-31 10:01 UTC (permalink / raw)
  To: dev, cloud.wangxiaoyun, zhouguoyang; +Cc: Hushiyuan

 From adb560f53b1a1585dc32adfb0e44e404e1198c96 Mon Sep 17 00:00:00 2001
From: liqingqing <liqingqing3@huawei.com>
Date: Sat, 31 Oct 2020 06:02:57 -0400
Subject: [v4] net/hinic: fix coredump when the scondary process using 
the hinic port.

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>
---
v4: adapt to the latest version.
---
v3: update the signed-off information.
---
v2:  solve the coding style issue.
Signed-off-by: liqingqing <liqingqing3@huawei.com>
---
  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);
  }

-- 
2.19.1



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

* [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-10-31 10:01 ` [dpdk-dev] [v4]net/hinic: " Qingqing Li
@ 2020-10-31 10:10   ` Qingqing Li
  2020-11-12  2:11     ` Wangxiaoyun (Cloud)
  2020-10-31 10:23   ` Qingqing Li
  1 sibling, 1 reply; 10+ messages in thread
From: Qingqing Li @ 2020-10-31 10:10 UTC (permalink / raw)
  To: dev, cloud.wangxiaoyun, zhouguoyang; +Cc: Hushiyuan

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>
---
v4: adapt to the latest version.
---
v3: update the signed-off information.
---
v2:  solve the coding style issue.
Signed-off-by: liqingqing <liqingqing3@huawei.com>
---
  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);
  }

-- 
2.19.1



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

* [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-10-31 10:01 ` [dpdk-dev] [v4]net/hinic: " Qingqing Li
  2020-10-31 10:10   ` Qingqing Li
@ 2020-10-31 10:23   ` Qingqing Li
  1 sibling, 0 replies; 10+ messages in thread
From: Qingqing Li @ 2020-10-31 10:23 UTC (permalink / raw)
  To: dev, Hushiyuan

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".

---
v4: adapt to the latest version.
---
v3: update the signed-off information.
---
v2:  solve the coding style issue.
---

Signed-off-by: Qingqing Li <liqingqing3@huawei.com>
---
  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);
  }

-- 
2.19.1



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

* Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-10-31 10:10   ` Qingqing Li
@ 2020-11-12  2:11     ` Wangxiaoyun (Cloud)
  2020-11-12  9:26       ` Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Wangxiaoyun (Cloud) @ 2020-11-12  2:11 UTC (permalink / raw)
  To: Qingqing Li, dev, zhouguoyang, ferruh.yigit
  Cc: Hushiyuan, yin.yinshi, xuanziyang2

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.

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 <liqingqing3@huawei.com>
> ---
> v4: adapt to the latest version.
> ---
> v3: update the signed-off information.
> ---
> v2:  solve the coding style issue.
> Signed-off-by: liqingqing <liqingqing3@huawei.com>
> ---
>   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);
>   }
> 

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

* Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-11-12  2:11     ` Wangxiaoyun (Cloud)
@ 2020-11-12  9:26       ` Ferruh Yigit
  2020-11-12 12:30         ` Wangxiaoyun (Cloud)
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2020-11-12  9:26 UTC (permalink / raw)
  To: Wangxiaoyun (Cloud), Qingqing Li, dev, zhouguoyang
  Cc: Hushiyuan, yin.yinshi, xuanziyang2

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 <liqingqing3@huawei.com>
>> ---
>> v4: adapt to the latest version.
>> ---
>> v3: update the signed-off information.
>> ---
>> v2:  solve the coding style issue.
>> Signed-off-by: liqingqing <liqingqing3@huawei.com>
>> ---
>>   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);
>>   }
>>


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

* Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-11-12  9:26       ` Ferruh Yigit
@ 2020-11-12 12:30         ` Wangxiaoyun (Cloud)
  2020-11-12 12:39           ` Ferruh Yigit
  2021-03-18  6:12           ` Wangxiaoyun (Cloud)
  0 siblings, 2 replies; 10+ messages in thread
From: Wangxiaoyun (Cloud) @ 2020-11-12 12:30 UTC (permalink / raw)
  To: Ferruh Yigit, Qingqing Li, dev, zhouguoyang
  Cc: Hushiyuan, yin.yinshi, xuanziyang2

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 <liqingqing3@huawei.com>
>>> ---
>>> v4: adapt to the latest version.
>>> ---
>>> v3: update the signed-off information.
>>> ---
>>> v2:  solve the coding style issue.
>>> Signed-off-by: liqingqing <liqingqing3@huawei.com>
>>> ---
>>>   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);
>>>   }
>>>
> 
> .

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

* Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-11-12 12:30         ` Wangxiaoyun (Cloud)
@ 2020-11-12 12:39           ` Ferruh Yigit
  2021-03-18  6:12           ` Wangxiaoyun (Cloud)
  1 sibling, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2020-11-12 12:39 UTC (permalink / raw)
  To: Wangxiaoyun (Cloud), Qingqing Li, dev, zhouguoyang
  Cc: Hushiyuan, yin.yinshi, xuanziyang2

On 11/12/2020 12:30 PM, Wangxiaoyun (Cloud) wrote:

< copied the response down, please don't top post >

> 在 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.
>>
 > When we complete repair and testing, we will upstream the patch in next release,
 > maybe not keep up with 20.11.
 >

OK, I am updating the patch status as deferred to follow it in next release.

>>
>>> 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 <liqingqing3@huawei.com>
>>>> ---
>>>> v4: adapt to the latest version.
>>>> ---
>>>> v3: update the signed-off information.
>>>> ---
>>>> v2:  solve the coding style issue.
>>>> Signed-off-by: liqingqing <liqingqing3@huawei.com>
>>>> ---
>>>>   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);
>>>>   }
>>>>
>>
>> .


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

* Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2020-11-12 12:30         ` Wangxiaoyun (Cloud)
  2020-11-12 12:39           ` Ferruh Yigit
@ 2021-03-18  6:12           ` Wangxiaoyun (Cloud)
  2021-03-22  9:04             ` Ferruh Yigit
  1 sibling, 1 reply; 10+ messages in thread
From: Wangxiaoyun (Cloud) @ 2021-03-18  6:12 UTC (permalink / raw)
  To: Ferruh Yigit, Qingqing Li, dev, zhouguoyang
  Cc: Hushiyuan, yin.yinshi, xuanziyang2

Hi Ferruh,
	For secondary process fix,you can refer to this patch "net/hinic: fix coredump when PMD used by fstack".
Thanks

在 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 <liqingqing3@huawei.com>
>>>> ---
>>>> v4: adapt to the latest version.
>>>> ---
>>>> v3: update the signed-off information.
>>>> ---
>>>> v2:  solve the coding style issue.
>>>> Signed-off-by: liqingqing <liqingqing3@huawei.com>
>>>> ---
>>>>   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);
>>>>   }
>>>>
>>
>> .

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

* Re: [dpdk-dev] [v4]net/hinic: fix coredump when the scondary process using the hinic port.
  2021-03-18  6:12           ` Wangxiaoyun (Cloud)
@ 2021-03-22  9:04             ` Ferruh Yigit
  0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-03-22  9:04 UTC (permalink / raw)
  To: Wangxiaoyun (Cloud), Qingqing Li, dev, zhouguoyang
  Cc: Hushiyuan, yin.yinshi, xuanziyang2

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 <liqingqing3@huawei.com>
>>>>> ---
>>>>> v4: adapt to the latest version.
>>>>> ---
>>>>> v3: update the signed-off information.
>>>>> ---
>>>>> v2:  solve the coding style issue.
>>>>> Signed-off-by: liqingqing <liqingqing3@huawei.com>
>>>>> ---
>>>>>   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);
>>>>>   }
>>>>>
>>>
>>> .


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

end of thread, other threads:[~2021-03-22  9:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31  9:38 [dpdk-dev] [v3]net/hinic: fix coredump when the scondary process using the hinic port Qingqing Li
2020-10-31 10:01 ` [dpdk-dev] [v4]net/hinic: " Qingqing Li
2020-10-31 10:10   ` Qingqing Li
2020-11-12  2:11     ` Wangxiaoyun (Cloud)
2020-11-12  9:26       ` Ferruh Yigit
2020-11-12 12:30         ` Wangxiaoyun (Cloud)
2020-11-12 12:39           ` Ferruh Yigit
2021-03-18  6:12           ` Wangxiaoyun (Cloud)
2021-03-22  9:04             ` Ferruh Yigit
2020-10-31 10:23   ` Qingqing Li

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://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/ http://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