Skip to content
Snippets Groups Projects
Commit a0c97d11 authored by Bob Lantz's avatar Bob Lantz
Browse files

Added patches for openflow reference version.

These may not be needed if they are pushed upstream.
parent 8125370d
No related branches found
No related tags found
No related merge requests found
Patches for OpenFlow Reference Implementation
controller.patch: patch controller to support up to 4096 switches (up from 16!)
datapath.patch: patch to kernel datapath to compile with CONFIG_NET_NS=y
diff --git a/controller/controller.c b/controller/controller.c
index 41f2547..6eec590 100644
--- a/controller/controller.c
+++ b/controller/controller.c
@@ -58,8 +58,8 @@
#include "vlog.h"
#define THIS_MODULE VLM_controller
-#define MAX_SWITCHES 16
-#define MAX_LISTENERS 16
+#define MAX_SWITCHES 4096
+#define MAX_LISTENERS 4096
struct switch_ {
struct lswitch *lswitch;
diff --git a/datapath/datapath.c b/datapath/datapath.c
index 4a4d3a2..365aa25 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -47,6 +47,9 @@
#include "compat.h"
+#ifdef CONFIG_NET_NS
+#include <net/net_namespace.h>
+#endif
/* Strings to describe the manufacturer, hardware, and software. This data
* is queriable through the switch description stats message. */
@@ -259,7 +262,11 @@ send_openflow_skb(const struct datapath *dp,
struct sk_buff *skb, const struct sender *sender)
{
return (sender
- ? genlmsg_unicast(skb, sender->pid)
+#ifdef CONFIG_NET_NS
+ ? genlmsg_unicast(&init_net, skb, sender->pid)
+#else
+ ? genlmsg_unicast(skb, sender->pid)
+#endif
: genlmsg_multicast(skb, 0, dp_mc_group(dp), GFP_ATOMIC));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment