diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2012-01-04 17:20:08 -0800 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2012-01-04 17:20:08 -0800 |
commit | b9c15df93753b640008f879315e26833c2e95468 (patch) | |
tree | 7004d4b4ef0fc1f73cde1b5a873ff5b66feb4e7f /datapath/datapath.c | |
parent | 33158a18daadcb4c7eaddb226fcfbdcca54539b7 (diff) |
datapath: Add genl_exec().
genl_lock is not exported from older kernel. Following patch add
genl_exec() which can run any function (passed as arg) with
genl_lock held.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath/datapath.c')
-rw-r--r-- | datapath/datapath.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c index c86c20bc..281e86bf 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -54,6 +54,7 @@ #include "checksum.h" #include "datapath.h" #include "flow.h" +#include "genl_exec.h" #include "vlan.h" #include "tunnel.h" #include "vport-internal_dev.h" @@ -2049,10 +2050,14 @@ static int __init dp_init(void) pr_info("Open vSwitch switching datapath %s, built "__DATE__" "__TIME__"\n", VERSION BUILDNR); - err = ovs_tnl_init(); + err = genl_exec_init(); if (err) goto error; + err = ovs_tnl_init(); + if (err) + goto error_genl_exec; + err = ovs_flow_init(); if (err) goto error_tnl_exit; @@ -2079,6 +2084,8 @@ error_flow_exit: ovs_flow_exit(); error_tnl_exit: ovs_tnl_exit(); +error_genl_exec: + genl_exec_exit(); error: return err; } @@ -2091,6 +2098,7 @@ static void dp_cleanup(void) ovs_vport_exit(); ovs_flow_exit(); ovs_tnl_exit(); + genl_exec_exit(); } module_init(dp_init); |