DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] failsafe: Bug fix for the secondary process RX-TX support
@ 2021-11-11 12:44 Kumara Parameshwaran
  2021-11-17 12:04 ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Kumara Parameshwaran @ 2021-11-11 12:44 UTC (permalink / raw)
  To: grive; +Cc: dev, Kumara Parameshwaran, qi.z.zhang

Remove the vdev args check for secondary process which prevents the
secondary from attaching to the device created by the primary process
via the hotplug framework. This check was removed for other vdevs but
was missed for failsafe.

Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Cc: qi.z.zhang@intel.com

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
---
 drivers/net/failsafe/failsafe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index ad6b43538e..3c754a5f66 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -340,8 +340,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
 	INFO("Initializing " FAILSAFE_DRIVER_NAME " for %s",
 			name);
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-	    strlen(rte_vdev_device_args(vdev)) == 0) {
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		eth_dev = rte_eth_dev_attach_secondary(name);
 		if (!eth_dev) {
 			ERROR("Failed to probe %s", name);
-- 
2.30.1 (Apple Git-130)


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

* Re: [PATCH] failsafe: Bug fix for the secondary process RX-TX support
  2021-11-11 12:44 [PATCH] failsafe: Bug fix for the secondary process RX-TX support Kumara Parameshwaran
@ 2021-11-17 12:04 ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2021-11-17 12:04 UTC (permalink / raw)
  To: Kumara Parameshwaran, grive; +Cc: dev, qi.z.zhang

On 11/11/2021 12:44 PM, Kumara Parameshwaran wrote:
> Remove the vdev args check for secondary process which prevents the
> secondary from attaching to the device created by the primary process
> via the hotplug framework. This check was removed for other vdevs but
> was missed for failsafe.
> 
> Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
> Cc: qi.z.zhang@intel.com
> 
> Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>

Renamed patch title as:
net/failsafe: fix secondary process probe

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.

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

* Re: [PATCH] failsafe: Bug fix for the secondary process RX-TX support
  2021-11-11 10:59 ` Gaëtan Rivet
@ 2021-11-17 11:26   ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2021-11-17 11:26 UTC (permalink / raw)
  To: Gaëtan Rivet, Kumara Parameshwaran; +Cc: dev

On 11/11/2021 10:59 AM, Gaëtan Rivet wrote:
> On Thu, Nov 11, 2021, at 11:06, Kumara Parameshwaran wrote:
>> Remove the vdev args check for secondary process which prevents the
>> secondary from attaching
>> to the device created by the primary process via the hotplug framework.
>> This check was removed
>> for other vdevs but was missed for failsafe.
>>
>> Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
> 
> Hello Kumara,
> 
> Thanks for your patch.
> If this is a fix, can you provide the fixline with a pointer to the patch it is meant
> to fix please?
> 
> I'm guessing this should be this:
> Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
> Cc: qi.z.zhang@intel.com
> 
> Looking at this patch, I see also
> 
> +       if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +               return rte_eth_dev_release_port_secondary(eth_dev);
> +
> 
> Added to the remove callbacks of the ports.
> It seems to be omitted from this patch, is there a reason?
> 

Hi Gaetan,

Above addition is no more required since primary and secondary release
functions merged into 'rte_eth_dev_release_port()' one which has process
type check inside it.

And failsafe remove path already calls 'rte_eth_dev_release_port()', so
it should be OK.

>> ---
>>   drivers/net/failsafe/failsafe.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
>> index ad6b43538e..3c754a5f66 100644
>> --- a/drivers/net/failsafe/failsafe.c
>> +++ b/drivers/net/failsafe/failsafe.c
>> @@ -340,8 +340,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
>>   	INFO("Initializing " FAILSAFE_DRIVER_NAME " for %s",
>>   			name);
>>
>> -	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
>> -	    strlen(rte_vdev_device_args(vdev)) == 0) {
>> +	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
>>   		eth_dev = rte_eth_dev_attach_secondary(name);
>>   		if (!eth_dev) {
>>   			ERROR("Failed to probe %s", name);
>> -- 
>> 2.30.1 (Apple Git-130)
> 


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

* [PATCH] failsafe: Bug fix for the secondary process RX-TX support
@ 2021-11-11 11:51 Kumara Parameshwaran
  0 siblings, 0 replies; 6+ messages in thread
From: Kumara Parameshwaran @ 2021-11-11 11:51 UTC (permalink / raw)
  To: grive; +Cc: dev, Kumara Parameshwaran

Remove the vdev args check for secondary process which prevents the
secondary from attaching to the device created by the primary process
via the hotplug framework. This check was removed for other vdevs but
was missed for failsafe.

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
---
 drivers/net/failsafe/failsafe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index ad6b43538e..3c754a5f66 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -340,8 +340,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
 	INFO("Initializing " FAILSAFE_DRIVER_NAME " for %s",
 			name);
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-	    strlen(rte_vdev_device_args(vdev)) == 0) {
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		eth_dev = rte_eth_dev_attach_secondary(name);
 		if (!eth_dev) {
 			ERROR("Failed to probe %s", name);
-- 
2.30.1 (Apple Git-130)


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

* Re: [PATCH] failsafe: Bug fix for the secondary process RX-TX support
  2021-11-11 10:06 Kumara Parameshwaran
@ 2021-11-11 10:59 ` Gaëtan Rivet
  2021-11-17 11:26   ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Gaëtan Rivet @ 2021-11-11 10:59 UTC (permalink / raw)
  To: Kumara Parameshwaran; +Cc: dev

On Thu, Nov 11, 2021, at 11:06, Kumara Parameshwaran wrote:
> Remove the vdev args check for secondary process which prevents the 
> secondary from attaching
> to the device created by the primary process via the hotplug framework. 
> This check was removed
> for other vdevs but was missed for failsafe.
>
> Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>

Hello Kumara,

Thanks for your patch.
If this is a fix, can you provide the fixline with a pointer to the patch it is meant
to fix please?

I'm guessing this should be this:
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Cc: qi.z.zhang@intel.com

Looking at this patch, I see also

+       if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+               return rte_eth_dev_release_port_secondary(eth_dev);
+

Added to the remove callbacks of the ports.
It seems to be omitted from this patch, is there a reason?

> ---
>  drivers/net/failsafe/failsafe.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
> index ad6b43538e..3c754a5f66 100644
> --- a/drivers/net/failsafe/failsafe.c
> +++ b/drivers/net/failsafe/failsafe.c
> @@ -340,8 +340,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
>  	INFO("Initializing " FAILSAFE_DRIVER_NAME " for %s",
>  			name);
> 
> -	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
> -	    strlen(rte_vdev_device_args(vdev)) == 0) {
> +	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
>  		eth_dev = rte_eth_dev_attach_secondary(name);
>  		if (!eth_dev) {
>  			ERROR("Failed to probe %s", name);
> -- 
> 2.30.1 (Apple Git-130)

-- 
Gaetan Rivet

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

* [PATCH] failsafe: Bug fix for the secondary process RX-TX support
@ 2021-11-11 10:06 Kumara Parameshwaran
  2021-11-11 10:59 ` Gaëtan Rivet
  0 siblings, 1 reply; 6+ messages in thread
From: Kumara Parameshwaran @ 2021-11-11 10:06 UTC (permalink / raw)
  To: grive; +Cc: dev, Kumara Parameshwaran

Remove the vdev args check for secondary process which prevents the secondary from attaching
to the device created by the primary process via the hotplug framework. This check was removed
for other vdevs but was missed for failsafe.

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
---
 drivers/net/failsafe/failsafe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index ad6b43538e..3c754a5f66 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -340,8 +340,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
 	INFO("Initializing " FAILSAFE_DRIVER_NAME " for %s",
 			name);
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-	    strlen(rte_vdev_device_args(vdev)) == 0) {
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		eth_dev = rte_eth_dev_attach_secondary(name);
 		if (!eth_dev) {
 			ERROR("Failed to probe %s", name);
-- 
2.30.1 (Apple Git-130)


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

end of thread, other threads:[~2021-11-17 12:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 12:44 [PATCH] failsafe: Bug fix for the secondary process RX-TX support Kumara Parameshwaran
2021-11-17 12:04 ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2021-11-11 11:51 Kumara Parameshwaran
2021-11-11 10:06 Kumara Parameshwaran
2021-11-11 10:59 ` Gaëtan Rivet
2021-11-17 11:26   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).