# vSwitch, but it causes trouble if you switch from a version with
# foo/__init__.py into an (older) version with plain foo.py, since
# foo/__init__.pyc will cause Python to ignore foo.py.
- run_python = \
- PYTHONDONTWRITEBYTECODE=yes \
- PYTHONPATH=$(top_srcdir)/python:$$PYTHONPATH \
- $(PYTHON)
+ if INCLUDE_PYTHON_COMPAT
+ run_python = PYTHONPATH=$(top_srcdir)/python:$(top_srcdir)/python/compat:$$PYTHONPATH
+ else
+ run_python = PYTHONPATH=$(top_srcdir)/python:$$PYTHONPATH
+ endif
+ run_python += PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
+
ALL_LOCAL =
BUILT_SOURCES =
SUFFIXES += .in
.in:
+ @mkdir -p $$(dirname $@)
$(PERL) $(srcdir)/build-aux/soexpand.pl -I$(srcdir) < $< | \
sed \
-e 's,[@]PKIDIR[@],$(PKIDIR),g' \
(cd datapath && $(MAKE) distfiles); \
(cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \
sort -u > all-distfiles; \
- (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \
+ (cd $(srcdir) && git ls-files) | grep -vFf $(srcdir)/.non-distfiles | \
sort -u > all-gitfiles; \
comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \
if test -s missing-distfiles; then \
include xenserver/automake.mk
include python/automake.mk
include python/compat/automake.mk
+include planetlab/automake.mk
include tutorial/automake.mk
+ include vtep/automake.mk
lib/multipath.c \
lib/multipath.h \
lib/netdev-dummy.c \
+ lib/netdev-tunnel.c \
+ lib/netdev-pltap.c \
lib/netdev-provider.h \
lib/netdev-vport.c \
lib/netdev-vport.h \
lib/timeval.h \
lib/token-bucket.c \
lib/token-bucket.h \
+ lib/tunalloc.c \
+ lib/tunalloc.h \
lib/type-props.h \
lib/unaligned.h \
lib/unicode.c \
lib/vlog.c \
lib/vlog.h \
lib/vswitch-idl.c \
- lib/vswitch-idl.h
+ lib/vswitch-idl.h \
+ lib/vtep-idl.c \
+ lib/vtep-idl.h
nodist_lib_libopenvswitch_a_SOURCES = \
lib/dirs.c
OVSIDL_BUILT += \
$(srcdir)/lib/vswitch-idl.c \
$(srcdir)/lib/vswitch-idl.h \
- $(srcdir)/lib/vswitch-idl.ovsidl
+ $(srcdir)/lib/vswitch-idl.ovsidl \
+ $(srcdir)/lib/vtep-idl.c \
+ $(srcdir)/lib/vtep-idl.h \
+ $(srcdir)/lib/vtep-idl.ovsidl
EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
VSWITCH_IDL_FILES = \
$(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
mv $@.tmp $@
+ EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
+ VTEP_IDL_FILES = \
+ $(srcdir)/vtep/vtep.ovsschema \
+ $(srcdir)/lib/vtep-idl.ann
+ $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
+ $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
+ mv $@.tmp $@
+
lib/dirs.c: lib/dirs.c.in Makefile
($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
-e 's,[@]srcdir[@],$(srcdir),g' \
return class != &dpif_netdev_class;
}
+static bool
+dpif_netdev_class_is_planetlab(const struct dpif_class *class)
+{
+ return class == &dpif_planetlab_class;
+}
+
static const char *
dpif_netdev_port_open_type(const struct dpif_class *class, const char *type)
{
return strcmp(type, "internal") ? type
+ : dpif_netdev_class_is_planetlab(class) ? "pltap"
: dpif_netdev_class_is_dummy(class) ? "dummy"
: "tap";
}
{
uint32_t port_no;
- if (dp->class != &dpif_netdev_class) {
+ if (dp->class != &dpif_netdev_class &&
+ dp->class != &dpif_planetlab_class) {
const char *p;
int start_no = 0;
stats->n_hit = dp->n_hit;
stats->n_missed = dp->n_missed;
stats->n_lost = dp->n_lost;
+ stats->n_masks = UINT64_MAX;
+ stats->n_mask_hit = UINT64_MAX;
ovs_mutex_unlock(&dp_netdev_mutex);
return 0;
dp_netdev_output_port, dp_netdev_action_userspace);
}
+#define DPIF_NETDEV_CLASS_FUNCTIONS \
+ dpif_netdev_enumerate, \
+ dpif_netdev_port_open_type, \
+ dpif_netdev_open, \
+ dpif_netdev_close, \
+ dpif_netdev_destroy, \
+ dpif_netdev_run, \
+ dpif_netdev_wait, \
+ dpif_netdev_get_stats, \
+ dpif_netdev_port_add, \
+ dpif_netdev_port_del, \
+ dpif_netdev_port_query_by_number, \
+ dpif_netdev_port_query_by_name, \
+ dpif_netdev_get_max_ports, \
+ NULL, /* port_get_pid */ \
+ dpif_netdev_port_dump_start, \
+ dpif_netdev_port_dump_next, \
+ dpif_netdev_port_dump_done, \
+ dpif_netdev_port_poll, \
+ dpif_netdev_port_poll_wait, \
+ dpif_netdev_flow_get, \
+ dpif_netdev_flow_put, \
+ dpif_netdev_flow_del, \
+ dpif_netdev_flow_flush, \
+ dpif_netdev_flow_dump_start, \
+ dpif_netdev_flow_dump_next, \
+ dpif_netdev_flow_dump_done, \
+ dpif_netdev_execute, \
+ NULL, /* operate */ \
+ dpif_netdev_recv_set, \
+ dpif_netdev_queue_to_priority, \
+ dpif_netdev_recv, \
+ dpif_netdev_recv_wait, \
+ dpif_netdev_recv_purge, \
+
const struct dpif_class dpif_netdev_class = {
"netdev",
- dpif_netdev_enumerate,
- dpif_netdev_port_open_type,
- dpif_netdev_open,
- dpif_netdev_close,
- dpif_netdev_destroy,
- dpif_netdev_run,
- dpif_netdev_wait,
- dpif_netdev_get_stats,
- dpif_netdev_port_add,
- dpif_netdev_port_del,
- dpif_netdev_port_query_by_number,
- dpif_netdev_port_query_by_name,
- dpif_netdev_get_max_ports,
- NULL, /* port_get_pid */
- dpif_netdev_port_dump_start,
- dpif_netdev_port_dump_next,
- dpif_netdev_port_dump_done,
- dpif_netdev_port_poll,
- dpif_netdev_port_poll_wait,
- dpif_netdev_flow_get,
- dpif_netdev_flow_put,
- dpif_netdev_flow_del,
- dpif_netdev_flow_flush,
- dpif_netdev_flow_dump_start,
- dpif_netdev_flow_dump_next,
- dpif_netdev_flow_dump_done,
- dpif_netdev_execute,
- NULL, /* operate */
- dpif_netdev_recv_set,
- dpif_netdev_queue_to_priority,
- dpif_netdev_recv,
- dpif_netdev_recv_wait,
- dpif_netdev_recv_purge,
+ DPIF_NETDEV_CLASS_FUNCTIONS
+};
+
+const struct dpif_class dpif_planetlab_class = {
+ "planetlab",
+ DPIF_NETDEV_CLASS_FUNCTIONS
};
static void
"DP PORT NEW-NUMBER",
3, 3, dpif_dummy_change_port_number, NULL);
}
+