DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/kni: check rte kni init result
@ 2021-04-21  2:14 Min Hu (Connor)
  2021-04-23 10:17 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Min Hu (Connor) @ 2021-04-21  2:14 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

This patch adds checking for rte_kni_init() result.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/kni/rte_eth_kni.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 9ce74e5..4d2a42d 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -406,8 +406,13 @@ eth_kni_create(struct rte_vdev_device *vdev,
 static int
 kni_init(void)
 {
-	if (is_kni_initialized == 0)
-		rte_kni_init(MAX_KNI_PORTS);
+	int ret;
+
+	if (is_kni_initialized == 0) {
+		ret = rte_kni_init(MAX_KNI_PORTS);
+		if (ret < 0)
+			return ret;
+	}
 
 	is_kni_initialized++;
 
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] net/kni: check rte kni init result
  2021-04-21  2:14 [dpdk-dev] [PATCH] net/kni: check rte kni init result Min Hu (Connor)
@ 2021-04-23 10:17 ` Ferruh Yigit
  2021-04-26 10:18   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2021-04-23 10:17 UTC (permalink / raw)
  To: Min Hu (Connor), dev

On 4/21/2021 3:14 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> This patch adds checking for rte_kni_init() result.
> 
> Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>

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

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

* Re: [dpdk-dev] [PATCH] net/kni: check rte kni init result
  2021-04-23 10:17 ` Ferruh Yigit
@ 2021-04-26 10:18   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2021-04-26 10:18 UTC (permalink / raw)
  To: Min Hu (Connor), dev

On 4/23/2021 11:17 AM, Ferruh Yigit wrote:
> On 4/21/2021 3:14 AM, Min Hu (Connor) wrote:
>> From: Chengwen Feng <fengchengwen@huawei.com>
>>
>> This patch adds checking for rte_kni_init() result.
>>
>> Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

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

end of thread, other threads:[~2021-04-26 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21  2:14 [dpdk-dev] [PATCH] net/kni: check rte kni init result Min Hu (Connor)
2021-04-23 10:17 ` Ferruh Yigit
2021-04-26 10:18   ` 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).