net/kni: check rte kni init result
PATCH 1/1 net/kni: check rte kni init result
From: Chengwen Feng <[email protected]>
This patch adds checking for rte_kni_init() result.
Fixes 75e2bc54c018 ("net/kni: add KNI PMD")
Signed-off-by Chengwen Feng <[email protected]>
Signed-off-by Min Hu (Connor) <[email protected]>
--- drivers/net/kni/rte_eth_kni.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/kni/rte_eth_kni.c +7 -2
@@ -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++;
Signature · 1 line
2.7.4
Quoted 9 lines · Min Hu (Connor)
From: Chengwen Feng <[email protected]>
This patch adds checking for
rte_kni_init()result.Fixes 75e2bc54c018 ("net/kni: add KNI PMD")Signed-off-by Chengwen Feng <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>
Acked-by Ferruh Yigit <[email protected]>
Ferruh Yigit
AppliedQuoted 5 lines · Ferruh Yigit
Quoted 4 lines · Min Hu (Connor)
From: Chengwen Feng <[email protected]>
This patch adds checking for
rte_kni_init()result.
Quoted 7 lines
Quoted 5 lines
Fixes 75e2bc54c018 ("net/kni: add KNI PMD")Signed-off-by Chengwen Feng <[email protected]>Signed-off-by Min Hu (Connor) <[email protected]>Acked-by Ferruh Yigit <[email protected]>
Applied to dpdk-next-net/main, thanks.