summaryrefslogtreecommitdiff
path: root/datapath/Modules.mk
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-08-05 12:51:30 -0700
committerBen Pfaff <blp@nicira.com>2009-08-06 16:57:06 -0700
commit2e7dd8eca88d131112a76301da24709b0472e381 (patch)
treebb57c3a75aac8365cb7a44e0ecca780873472e95 /datapath/Modules.mk
parent3cc42ebbc144096dc56b618845519daf2d48ef6e (diff)
downloadopenvswitch-2e7dd8eca88d131112a76301da24709b0472e381.tar.gz
datapath: Move sysfs support from brcompat_mod into openvswitch_mod.
In the past problems have arisen due to the different ways that datapaths are created and destroyed in the three different cases: 1. sysfs supported, brcompat_mod loaded. 2. sysfs supported, brcompat_mod not loaded. 3. sysfs not supported. The brcompat_mod loaded versus not loaded distinction is the stickiest because we have to do all the calls into brcompat_mod through hook functions, which in turn causes pressure to keep the number of hook functions small and well-defined, which makes it really difficult to put the hook call points at exactly the right place. Witness, for example, this piece of code in datapath.c: int dp_del_port(struct net_bridge_port *p) { ASSERT_RTNL(); #ifdef SUPPORT_SYSFS if (p->port_no != ODPP_LOCAL && dp_del_if_hook) sysfs_remove_link(&p->dp->ifobj, p->dev->name); #endif The code inside the #ifdef is logically part of the brcompat_mod sysfs support, but the author of this code (quite reasonably) didn't want to add a hook function call there. After all, what would you call the hook function? There's no obvious name from the dp_del_port() caller's perspective. All this argues that sysfs support should be in openvswitch_mod itself, since it has to be tightly integrated, not bolted on. So this commit moves it there. Now, this is not to say that openvswitch_mod should actually be implementing bridge-compatible sysfs. In the future, it probably should not be; rather, it should implement something appropriate for Open vSwitch datapaths instead. But right now we have bridge-compatible sysfs, and so that's what this commit moves.
Diffstat (limited to 'datapath/Modules.mk')
-rw-r--r--datapath/Modules.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/datapath/Modules.mk b/datapath/Modules.mk
index 1b5de4aba..b7d54d1a0 100644
--- a/datapath/Modules.mk
+++ b/datapath/Modules.mk
@@ -11,6 +11,8 @@ dist_modules = $(both_modules) # Modules to distribute
openvswitch_sources = \
actions.c \
+ brc_sysfs_dp.c \
+ brc_sysfs_if.c \
datapath.c \
dp_dev.c \
dp_notify.c \
@@ -19,6 +21,7 @@ openvswitch_sources = \
openvswitch_headers = \
actions.h \
+ brc_sysfs.h \
compat.h \
datapath.h \
dp_dev.h \