DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: fix error code when creating bonded device
@ 2020-07-14  8:19 Wei Hu (Xavier)
  2020-07-14 11:58 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Hu (Xavier) @ 2020-07-14  8:19 UTC (permalink / raw)
  To: dev, ard, chas3, ferruh.yigit; +Cc: xavier.huwei

Because the return value of rte_vdev_init() has multiple non-zero values,
when rte_vdev_init() return non-zero in the rte_eth_bond_create() function,
it should return the actual error code rather than -ENOMEM.

Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")
Cc: stable@dpdk.org

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index f38eb3b..d77dc40 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -167,7 +167,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 
 	ret = rte_vdev_init(name, devargs);
 	if (ret)
-		return -ENOMEM;
+		return ret;
 
 	ret = rte_eth_dev_get_port_by_name(name, &port_id);
 	RTE_ASSERT(!ret);
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] net/bonding: fix error code when creating bonded device
  2020-07-14  8:19 [dpdk-dev] [PATCH] net/bonding: fix error code when creating bonded device Wei Hu (Xavier)
@ 2020-07-14 11:58 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2020-07-14 11:58 UTC (permalink / raw)
  To: Wei Hu (Xavier), dev, ard, chas3

On 7/14/2020 9:19 AM, Wei Hu (Xavier) wrote:
> Because the return value of rte_vdev_init() has multiple non-zero values,
> when rte_vdev_init() return non-zero in the rte_eth_bond_create() function,
> it should return the actual error code rather than -ENOMEM.
> 
> Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

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

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

end of thread, other threads:[~2020-07-14 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14  8:19 [dpdk-dev] [PATCH] net/bonding: fix error code when creating bonded device Wei Hu (Xavier)
2020-07-14 11:58 ` 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).