* [dpdk-stable] [PATCH] net/mlx5/windows: fix link speed calculation
@ 2021-04-05 16:18 Tal Shnaiderman
2021-04-05 19:01 ` Thomas Monjalon
2021-04-06 7:31 ` [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows Tal Shnaiderman
0 siblings, 2 replies; 6+ messages in thread
From: Tal Shnaiderman @ 2021-04-05 16:18 UTC (permalink / raw)
To: dev; +Cc: thomas, matan, rasland, ophirmu, stable
In Windows DevX returns the value of the current link speed
in bps rate, the conversion to the Mbps rate expected by DPDK
is incorrect and fixed.
Fixes: 6fbd73709ee4be32 ("net/mlx5: support link update on Windows")
Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
index 8609d38eca..c709dd19be 100644
--- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
@@ -254,7 +254,7 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
}
priv = dev->data->dev_private;
context_obj = (mlx5_context_st *)priv->sh->ctx;
- dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1024 * 1024);
+ dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1000 * 1000);
dev_link.link_status =
(context_obj->mlx5_dev.link_state == 1 && !mlx5_is_removed(dev))
? 1 : 0;
--
2.16.1.windows.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH] net/mlx5/windows: fix link speed calculation
2021-04-05 16:18 [dpdk-stable] [PATCH] net/mlx5/windows: fix link speed calculation Tal Shnaiderman
@ 2021-04-05 19:01 ` Thomas Monjalon
2021-04-06 7:02 ` Tal Shnaiderman
2021-04-06 7:31 ` [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows Tal Shnaiderman
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2021-04-05 19:01 UTC (permalink / raw)
To: Tal Shnaiderman; +Cc: dev, matan, rasland, ophirmu, stable
There is no previous commit with net/mlx5/windows as title prefix.
In general, there is "on Windows" at the end of the title.
This way we can have the same formatting when fixing the common code
for a Windows case.
05/04/2021 18:18, Tal Shnaiderman:
> In Windows DevX returns the value of the current link speed
> in bps rate, the conversion to the Mbps rate expected by DPDK
> is incorrect and fixed.
"was" incorrect.
I think you should explain the confusion between Mbit/s and Mibit/s.
> - dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1024 * 1024);
> + dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1000 * 1000);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH] net/mlx5/windows: fix link speed calculation
2021-04-05 19:01 ` Thomas Monjalon
@ 2021-04-06 7:02 ` Tal Shnaiderman
0 siblings, 0 replies; 6+ messages in thread
From: Tal Shnaiderman @ 2021-04-06 7:02 UTC (permalink / raw)
To: NBU-Contact-Thomas Monjalon
Cc: dev, Matan Azrad, Raslan Darawsheh, Ophir Munk, stable
> Subject: Re: [PATCH] net/mlx5/windows: fix link speed calculation
>
> External email: Use caution opening links or attachments
>
>
> There is no previous commit with net/mlx5/windows as title prefix.
> In general, there is "on Windows" at the end of the title.
> This way we can have the same formatting when fixing the common code for a
> Windows case.
>
> 05/04/2021 18:18, Tal Shnaiderman:
> > In Windows DevX returns the value of the current link speed in bps
> > rate, the conversion to the Mbps rate expected by DPDK is incorrect
> > and fixed.
>
> "was" incorrect.
>
> I think you should explain the confusion between Mbit/s and Mibit/s.
>
> > - dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1024 * 1024);
> > + dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1000 *
> > + 1000);
>
>
Thanks Thomas for the review, will address the comments in v2.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows
2021-04-05 16:18 [dpdk-stable] [PATCH] net/mlx5/windows: fix link speed calculation Tal Shnaiderman
2021-04-05 19:01 ` Thomas Monjalon
@ 2021-04-06 7:31 ` Tal Shnaiderman
2021-04-06 7:46 ` Matan Azrad
2021-04-08 10:59 ` Raslan Darawsheh
1 sibling, 2 replies; 6+ messages in thread
From: Tal Shnaiderman @ 2021-04-06 7:31 UTC (permalink / raw)
To: dev; +Cc: thomas, matan, rasland, ophirmu, stable
In Windows DevX returns the rate of the current link speed
in bit/s, this rate was converted to Mibit/s instead of the Mbit/s
rate expected by DPDK resulting in wrong link speed reporting.
Fixes: 6fbd73709ee4be32 ("net/mlx5: support link update on Windows")
Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
v2: fix commit message [Thomas]
---
drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
index 8609d38eca..c709dd19be 100644
--- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
@@ -254,7 +254,7 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
}
priv = dev->data->dev_private;
context_obj = (mlx5_context_st *)priv->sh->ctx;
- dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1024 * 1024);
+ dev_link.link_speed = context_obj->mlx5_dev.link_speed / (1000 * 1000);
dev_link.link_status =
(context_obj->mlx5_dev.link_state == 1 && !mlx5_is_removed(dev))
? 1 : 0;
--
2.16.1.windows.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows
2021-04-06 7:31 ` [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows Tal Shnaiderman
@ 2021-04-06 7:46 ` Matan Azrad
2021-04-08 10:59 ` Raslan Darawsheh
1 sibling, 0 replies; 6+ messages in thread
From: Matan Azrad @ 2021-04-06 7:46 UTC (permalink / raw)
To: Tal Shnaiderman, dev
Cc: NBU-Contact-Thomas Monjalon, Raslan Darawsheh, Ophir Munk, stable
From: Tal Shnaiderman
> In Windows DevX returns the rate of the current link speed in bit/s, this rate
> was converted to Mibit/s instead of the Mbit/s rate expected by DPDK resulting
> in wrong link speed reporting.
>
> Fixes: 6fbd73709ee4be32 ("net/mlx5: support link update on Windows")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows
2021-04-06 7:31 ` [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows Tal Shnaiderman
2021-04-06 7:46 ` Matan Azrad
@ 2021-04-08 10:59 ` Raslan Darawsheh
1 sibling, 0 replies; 6+ messages in thread
From: Raslan Darawsheh @ 2021-04-08 10:59 UTC (permalink / raw)
To: Tal Shnaiderman, dev
Cc: NBU-Contact-Thomas Monjalon, Matan Azrad, Ophir Munk, stable
Hi,
> -----Original Message-----
> From: Tal Shnaiderman <talshn@nvidia.com>
> Sent: Tuesday, April 6, 2021 10:32 AM
> To: dev@dpdk.org
> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Matan Azrad
> <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>; Ophir
> Munk <ophirmu@nvidia.com>; stable@dpdk.org
> Subject: [PATCH v2] net/mlx5: fix link speed calculation on Windows
>
> In Windows DevX returns the rate of the current link speed
> in bit/s, this rate was converted to Mibit/s instead of the Mbit/s
> rate expected by DPDK resulting in wrong link speed reporting.
>
> Fixes: 6fbd73709ee4be32 ("net/mlx5: support link update on Windows")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
> v2: fix commit message [Thomas]
> ---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-08 10:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 16:18 [dpdk-stable] [PATCH] net/mlx5/windows: fix link speed calculation Tal Shnaiderman
2021-04-05 19:01 ` Thomas Monjalon
2021-04-06 7:02 ` Tal Shnaiderman
2021-04-06 7:31 ` [dpdk-stable] [PATCH v2] net/mlx5: fix link speed calculation on Windows Tal Shnaiderman
2021-04-06 7:46 ` Matan Azrad
2021-04-08 10:59 ` Raslan Darawsheh
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).