From: Vincent Guo Date: Fri, 2 Sep 2016 10:23:13 +0000 (+0800) Subject: kni: fix module init/exit X-Git-Tag: spdx-start~6022 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6914c3b844195875c351d2c36685a84715f1e659;p=dpdk.git kni: fix module init/exit Fix pernet calls when HAVE_SIMPLIFIED_PERNET_OPERATIONS is not set. Fixes: e6734d21b4e1 ("kni: fix build with kernel 2.6.32") Signed-off-by: Vincent Guo Acked-by Ferruh Yigit --- diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 4f0750797e..3501dc1bac 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -194,7 +194,7 @@ out: #ifdef HAVE_SIMPLIFIED_PERNET_OPERATIONS unregister_pernet_subsys(&kni_net_ops); #else - register_pernet_gen_subsys(&kni_net_id, &kni_net_ops); + unregister_pernet_gen_subsys(kni_net_id, &kni_net_ops); #endif return rc; } @@ -206,7 +206,7 @@ kni_exit(void) #ifdef HAVE_SIMPLIFIED_PERNET_OPERATIONS unregister_pernet_subsys(&kni_net_ops); #else - register_pernet_gen_subsys(&kni_net_id, &kni_net_ops); + unregister_pernet_gen_subsys(kni_net_id, &kni_net_ops); #endif KNI_PRINT("####### DPDK kni module unloaded #######\n"); }