Added patches for openflow reference version.
These may not be needed if they are pushed upstream.
This commit is contained in:
@@ -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
|
||||||
@@ -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;
|
||||||
@@ -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));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user