@@ -26,13 +26,15 @@ openvswitch_sources = \
flow_table.c \
vport.c \
vport-internal_dev.c \
- vport-netdev.c
+ vport-netdev.c \
+ nsh.c
vport_geneve_sources = vport-geneve.c
vport_vxlan_sources = vport-vxlan.c
vport_gre_sources = vport-gre.c
vport_lisp_sources = vport-lisp.c
vport_stt_sources = vport-stt.c
+nsh_sources = nsh.c
openvswitch_headers = \
compat.h \
@@ -51,6 +51,7 @@
#include <net/genetlink.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
+#include <net/nsh.h>
#include "datapath.h"
#include "conntrack.h"
@@ -2408,6 +2409,7 @@ static int __init dp_init(void)
pr_info("Open vSwitch switching datapath %s\n", VERSION);
+ ovs_nsh_init();
err = action_fifos_init();
if (err)
goto error;
@@ -2463,6 +2465,7 @@ error_unreg_rtnl_link:
error_action_fifos_exit:
action_fifos_exit();
error:
+ ovs_nsh_cleanup();
return err;
}
@@ -2478,6 +2481,7 @@ static void dp_cleanup(void)
ovs_flow_exit();
ovs_internal_dev_rtnl_link_unregister();
action_fifos_exit();
+ ovs_nsh_cleanup();
}
module_init(dp_init);
@@ -304,4 +304,7 @@ static inline void nsh_set_flags_ttl_len(struct nshhdr *nsh, u8 flags,
NSH_FLAGS_MASK | NSH_TTL_MASK | NSH_LEN_MASK);
}
+int ovs_nsh_init(void);
+void ovs_nsh_cleanup(void);
+
#endif /* __NET_NSH_H */