Added patches for openflow reference version.

These may not be needed if they are pushed upstream.
This commit is contained in:
Bob Lantz
2010-03-26 14:04:13 -07:00
parent 8125370d8e
commit a0c97d110c
3 changed files with 46 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
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
+15
View File
@@ -0,0 +1,15 @@
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;
+26
View File
@@ -0,0 +1,26 @@
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));
}