Skip to contentSkip to conversation

net/mlx5: call generic strlcpy

PATCH Applied Thomas Monjalon 3 participants 3 messages Feb 24, 2019 – Mar 7, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: call generic strlcpy

The call to strlcpy uses either libc, libbsd or internal rte_strlcpy. No need to call the DPDK flavor explictly.

---
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5.c +1 -1
index df71707ccb..bda909eaa5 100644
@@ -785,7 +785,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	}
 	/* Build device name. */
 	if (!switch_info->representor)
-		rte_strlcpy(name, dpdk_dev->name, sizeof(name));
+		strlcpy(name, dpdk_dev->name, sizeof(name));
 	else
 		snprintf(name, sizeof(name), "%s_representor_%u",
 			 dpdk_dev->name, switch_info->port_name);
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Checked on Fedora 28

Reviewed-by Rami Rosen <ramirose at gmail.com>
Quoted 25 lines · Thomas Monjalon

The call to strlcpy uses either libc, libbsd or internal rte_strlcpy. No need to call the DPDK flavor explictly.

---
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5.c +1 -2
index df71707ccb..bda909eaa5 100644
@@ -785,7 +785,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        }
        /* Build device name. */
        if (!switch_info->representor)
-               rte_strlcpy(name, dpdk_dev->name, sizeof(name));
+               strlcpy(name, dpdk_dev->name, sizeof(name));
        else
                snprintf(name, sizeof(name), "%s_representor_%u",
                         dpdk_dev->name, switch_info->port_name);
--

2.20.1

Signature · 2 lines
regards,
Rami Rosen
Reviewed-by Rami Rosen Applied
#2 lore raw

Applied to next-net-mlx, thanks.

From: Rami Rosen <[email protected]>
Sent: Monday, February 25, 2019 8:26 AM
To: Thomas Monjalon <[email protected]>
Cc: Shahaf Shuler <[email protected]>; Yongseok Koh <[email protected]>; dev <[email protected]>; Ophir Munk <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: call generic strlcpy

Checked on Fedora 28

Reviewed-by Rami Rosen <ramirose at gmail.com<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgmail.com&data=02%7C01%7Cshahafs%40mellanox.com%7Ca6471d19ffc94a63e8f308d69aea31bf%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636866727983375321&sdata=JE%2BULD6LG98IBEf6D%2F3bW98LivPLm2QD7xlshkdQDdc%3D&reserved=0>>

On Mon, Feb 25, 2019 at 12:42 AM Thomas Monjalon <[email protected]<mailto:[email protected]>> wrote:
The call to strlcpy uses either libc, libbsd or internal rte_strlcpy.
No need to call the DPDK flavor explictly.

---
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5.c +1 -1
index df71707ccb..bda909eaa5 100644
@@ -785,7 +785,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
        }
        /* Build device name. */
        if (!switch_info->representor)
-               rte_strlcpy(name, dpdk_dev->name, sizeof(name));
+               strlcpy(name, dpdk_dev->name, sizeof(name));
        else
                snprintf(name, sizeof(name), "%s_representor_%u",
                         dpdk_dev->name, switch_info->port_name);

--
2.20.1

--
regards,
Rami Rosen