[dpdk-dev,v2] kni: Bug fix in module_init and module_exit

Message ID 1472811793-4433-1-git-send-email-guopengfei160@163.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Commit Message

郭鹏飞 Sept. 2, 2016, 10:23 a.m.
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 <guopengfei160@163.com>
---
 lib/librte_eal/linuxapp/kni/kni_misc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ferruh Yigit Sept. 6, 2016, 8:02 a.m. | #1
On 9/2/2016 11:23 AM, Vincent Guo wrote:
> 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 <guopengfei160@163.com>

Only patch subject should start with lowercase, Thomas would you mind
fixing this while applying?

Acked-by Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon Sept. 9, 2016, 2:31 p.m. | #2
2016-09-06 09:02, Ferruh Yigit:
> On 9/2/2016 11:23 AM, Vincent Guo wrote:
> > 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 <guopengfei160@163.com>
> 
> Only patch subject should start with lowercase, Thomas would you mind
> fixing this while applying?
> 
> Acked-by Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

Patch

diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
index 67e9b7d..d7850be 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");
 }