From: Giuseppe Lettieri Date: Tue, 4 Feb 2014 23:02:44 +0000 (+0100) Subject: Merge branch 'mainstream' X-Git-Tag: sliver-openvswitch-2.1.90-1~8 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bdd534291ff72077390f7b1745c4443ad3833d99;hp=-c;p=sliver-openvswitch.git Merge branch 'mainstream' --- bdd534291ff72077390f7b1745c4443ad3833d99 diff --combined Makefile.am index c0e2787c4,340b12dbe..8e8755785 --- a/Makefile.am +++ b/Makefile.am @@@ -10,11 -10,14 +10,14 @@@ ACLOCAL_AMFLAGS = -I m SUBDIRS = datapath AM_CPPFLAGS = $(SSL_CFLAGS) + AM_LDFLAGS = $(SSL_LDFLAGS) if WIN32 AM_CPPFLAGS += -I $(top_srcdir)/include/windows endif + AM_CPPFLAGS += $(SSL_INCLUDES) + AM_CPPFLAGS += -I $(top_srcdir)/include AM_CPPFLAGS += -I $(top_srcdir)/lib AM_CPPFLAGS += -I $(top_builddir)/lib @@@ -124,7 -127,6 +127,7 @@@ ro_shell = printf '\043 Generated autom SUFFIXES += .in .in: + @mkdir -p $$(dirname $@) $(PERL) $(srcdir)/build-aux/soexpand.pl -I$(srcdir) < $< | \ sed \ -e 's,[@]PKIDIR[@],$(PKIDIR),g' \ @@@ -142,10 -144,9 +145,9 @@@ -e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \ > $@.tmp @if head -n 1 $@.tmp | grep '#!' > /dev/null; then \ - echo chmod +x $@.tmp; \ chmod +x $@.tmp; \ fi - mv $@.tmp $@ + $(AM_V_GEN) mv $@.tmp $@ .PHONY: clean-pycov clean-pycov: @@@ -164,10 -165,10 +166,10 @@@ dist-hook-git: distfile @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \ (cd datapath && $(MAKE) distfiles); \ (cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \ - LC_ALL=C sort -u > all-distfiles; \ - (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \ - LC_ALL=C sort -u > all-gitfiles; \ - LC_ALL=C comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \ + LC_ALL=C sort -u > all-distfiles; \ + (cd $(srcdir) && git ls-files) | grep -vFf $(srcdir)/.non-distfiles | \ + LC_ALL=C sort -u > all-gitfiles; \ + LC_ALL=C comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \ if test -s missing-distfiles; then \ echo "The distribution is missing the following files:"; \ cat missing-distfiles; \ @@@ -263,7 -264,8 +265,8 @@@ manpage-check: $(man_MANS) $(dist_man_M if grep warning: $@.tmp; then error=:; fi; \ rm -f $@.tmp; \ done; \ - if $$error; then exit 1; else echo touch $@; touch $@; fi + if $$error; then exit 1; else touch $@; fi + $(AM_V_GEN) touch -c $@ CLEANFILES += manpage-check endif @@@ -304,6 -306,5 +307,6 @@@ include rhel/automake.m 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 diff --combined lib/automake.mk index 7900fa39f,4ecd61df0..ebf3f9ddd --- a/lib/automake.mk +++ b/lib/automake.mk @@@ -40,7 -40,6 +40,6 @@@ lib_libopenvswitch_la_SOURCES = lib/crc32c.h \ lib/csum.c \ lib/csum.h \ - lib/daemon.c \ lib/daemon.h \ lib/dhcp.h \ lib/dummy.c \ @@@ -101,8 -100,6 +100,8 @@@ 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 \ @@@ -213,8 -210,6 +212,8 @@@ 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 \ @@@ -240,10 -235,16 +239,16 @@@ lib/vswitch-idl.h \ lib/vtep-idl.c \ lib/vtep-idl.h + if WIN32 - lib_libopenvswitch_la_SOURCES += lib/latch-windows.c + lib_libopenvswitch_la_SOURCES += \ + lib/daemon-windows.c \ + lib/getopt_long.c \ + lib/latch-windows.c else - lib_libopenvswitch_la_SOURCES += lib/latch.c + lib_libopenvswitch_la_SOURCES += \ + lib/daemon.c \ + lib/latch.c endif EXTRA_DIST += \ @@@ -337,6 -338,8 +342,8 @@@ MAN_FRAGMENTS += lib/memory-unixctl.man \ lib/ofp-version.man \ lib/ovs.tmac \ + lib/service.man \ + lib/service-syn.man \ lib/ssl-bootstrap.man \ lib/ssl-bootstrap-syn.man \ lib/ssl-peer-ca-cert.man \ diff --combined lib/dpif-netdev.c index d62949baf,73eb99d16..b3a374260 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@@ -367,17 -367,10 +367,17 @@@ dpif_netdev_class_is_dummy(const struc 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"; } @@@ -406,8 -399,7 +406,8 @@@ choose_port(struct dp_netdev *dp, cons { 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; @@@ -1041,7 -1033,10 +1041,10 @@@ dpif_netdev_mask_from_nlattrs(const str struct flow *mask) { if (mask_key_len) { - if (odp_flow_key_to_mask(mask_key, mask_key_len, mask, flow)) { + enum odp_key_fitness fitness; + + fitness = odp_flow_key_to_mask(mask_key, mask_key_len, mask, flow); + if (fitness) { /* This should not happen: it indicates that * odp_flow_key_from_mask() and odp_flow_key_to_mask() * disagree on the acceptable form of a mask. Log the problem @@@ -1054,7 -1049,8 +1057,8 @@@ ds_init(&s); odp_flow_format(key, key_len, mask_key, mask_key_len, NULL, &s, true); - VLOG_ERR("internal error parsing flow mask %s", ds_cstr(&s)); + VLOG_ERR("internal error parsing flow mask %s (%s)", + ds_cstr(&s), odp_key_fitness_to_string(fitness)); ds_destroy(&s); } @@@ -1369,7 -1365,8 +1373,8 @@@ dpif_netdev_flow_dump_next(const struc ofpbuf_use_stack(&buf, &state->maskbuf, sizeof state->maskbuf); minimask_expand(&netdev_flow->cr.match.mask, &wc); odp_flow_key_from_mask(&buf, &wc.masks, &netdev_flow->flow, - odp_to_u32(wc.masks.in_port.odp_port)); + odp_to_u32(wc.masks.in_port.odp_port), + SIZE_MAX); *mask = buf.data; *mask_len = buf.size; @@@ -1829,48 -1826,40 +1834,48 @@@ dp_netdev_execute_actions(struct dp_net odp_execute_actions(&aux, packet, md, actions, actions_len, dp_execute_cb); } +#define DPIF_NETDEV_CLASS_FUNCTIONS \ + dpif_netdev_enumerate, \ + dpif_netdev_port_open_type, \ + dpif_netdev_open, \ + dpif_netdev_close, \ + dpif_netdev_destroy, \ + NULL, \ + NULL, \ + dpif_netdev_get_stats, \ + dpif_netdev_port_add, \ + dpif_netdev_port_del, \ + dpif_netdev_port_query_by_number, \ + dpif_netdev_port_query_by_name, \ + 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, - NULL, /* run */ - NULL, /* 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, - 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 @@@ -1951,4 -1940,3 +1956,4 @@@ dpif_dummy_register(bool override "DP PORT NEW-NUMBER", 3, 3, dpif_dummy_change_port_number, NULL); } +