Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/openvswitch/ovs into master…
Browse files Browse the repository at this point in the history
…_new
  • Loading branch information
shettyg committed Jan 14, 2016
2 parents 51386ba + fc038fb commit 5e3a2a1
Show file tree
Hide file tree
Showing 100 changed files with 1,806 additions and 739 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Kmindg G [email protected]
Krishna Kondaka [email protected]
Kyle Mestery [email protected]
Kyle Upton [email protected]
Lance Richardson [email protected]
Lars Kellogg-Stedman [email protected]
Leo Alterman [email protected]
Lilijun [email protected]
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ Examples of common tags follow.

Reported-at: http://openvswitch.org/pipermail/dev/2014-June/040952.html

Submitted-at: <URL>

If a patch was submitted somewhere other than the Open vSwitch
development mailing list, such as a GitHub pull request, this header can
be used to reference the source.

Submitted-at: https://github.com/openvswitch/ovs/pull/92

VMware-BZ: #1234567
ONF-JIRA: EXT-12345

Expand Down
2 changes: 2 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ installing the following to obtain better warnings:

- clang, version 3.4 or later

- flake8 (for Python code)

Also, you may find the ovs-dev script found in utilities/ovs-dev.py useful.

Installation Requirements
Expand Down
29 changes: 28 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2007-2015 Nicira, Inc.
# Copyright (C) 2007-2016 Nicira, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
Expand Down Expand Up @@ -141,6 +141,7 @@ SUFFIXES =
check_DATA =
check_SCRIPTS =
pkgconfig_DATA =
FLAKE8_PYFILES =

scriptsdir = $(pkgdatadir)/scripts
completiondir = $(sysconfdir)/bash_completion.d
Expand Down Expand Up @@ -182,6 +183,7 @@ SUFFIXES += .in
SUFFIXES += .xml
%: %.xml
$(AM_V_GEN)$(run_python) $(srcdir)/build-aux/xml2nroff $< > $@.tmp \
-I $(srcdir) \
--version=$(VERSION) \
PKIDIR='$(PKIDIR)' \
LOGDIR='$(LOGDIR)' \
Expand Down Expand Up @@ -339,6 +341,31 @@ manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS)
CLEANFILES += manpage-check
endif

if HAVE_FLAKE8
ALL_LOCAL += flake8-check
# http://flake8.readthedocs.org/en/latest/warnings.html
# All warnings explicitly selected or ignored should be listed below.
#
# E***, W*** -- warnings from pep8
# E121 continuation line under-indented for hanging indent (only from flake8 v2.0)
# E123 closing bracket does not match indentation of opening bracket's line
# E125 continuation line with same indent as next logical line (only from flake8 v2.0)
# E126 continuation line over-indented for hanging indent
# E127 continuation line over-indented for visual indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E131 continuation line unaligned for hanging indent
# W503 line break before binary operator
# F*** -- warnings native to flake8
# F811 redefinition of unused <name> from line <N> (only from flake8 v2.0)
# D*** -- warnings from flake8-docstrings plugin
# H*** -- warnings from flake8 hacking plugin (custom style checks beyond PEP8)
# H231 Python 3.x incompatible 'except x,y:' construct
# H233 Python 3.x incompatible use of print operator
flake8-check: $(FLAKE8_PYFILES)
$(AM_V_GEN) if flake8 $^ --select=H231,H233 --ignore=E121,E123,E125,E126,E127,E128,E129,E131,W503,F811,D,H ${FLAKE8_FLAGS}; then touch $@; else exit 1; fi
endif

include $(srcdir)/manpages.mk
$(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.pl
@$(PERL) $(srcdir)/build-aux/sodepends.pl -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Post-v2.5.0
---------------------
- ovsdb-server:
* New "monitor2" and "update2" extensions to RFC 7047.
- OpenFlow:
* OpenFlow 1.1+ OFPT_QUEUE_GET_CONFIG_REQUEST now supports OFPP_ANY.


v2.5.0 - xx xxx xxxx
---------------------
Expand Down
3 changes: 2 additions & 1 deletion acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ AC_DEFUN([OVS_CHECK_DPDK], [
CFLAGS="$ovs_save_CFLAGS"
LDFLAGS="$ovs_save_LDFLAGS"
OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR"
OVS_CFLAGS="$OVS_CFLAGS -I$DPDK_INCLUDE -mssse3"
OVS_CFLAGS="$OVS_CFLAGS -I$DPDK_INCLUDE"
OVS_ENABLE_OPTION([-mssse3])
# DPDK pmd drivers are not linked unless --whole-archive is used.
#
Expand Down
35 changes: 30 additions & 5 deletions build-aux/xml2nroff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python

# Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
# Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,19 +34,39 @@ Each VAR, when enclosed by "@"s in the input, is replaced by its
corresponding VALUE, with characters &<>"' in VALUE escaped.
The following options are also available:
-I, --include=DIR search DIR for include files (default: .)
--version=VERSION use VERSION to display on document footer
-h, --help display this help message\
""" % {'argv0': argv0}
sys.exit(0)


def manpage_to_nroff(xml_file, subst, version=None):
def manpage_to_nroff(xml_file, subst, include_path, version=None):
with open(xml_file) as f:
content = f.read()
for k, v in subst.iteritems():
content = content.replace(k, v)
doc = xml.dom.minidom.parseString(content).documentElement

xi_nodes = doc.getElementsByTagName("xi:include")
for node in xi_nodes:
fn = node.getAttribute("href")
content = None
for dir in include_path:
try:
with open("%s/%s" % (dir, fn)) as xi_f:
content = xi_f.read()
except IOError:
pass
if not content:
sys.stderr.write("%s: could not open include file %s\n"
% (argv0, fn))
sys.exit(1)
for k, v in subst.iteritems():
content = content.replace(k, v)
xi_doc = xml.dom.minidom.parseString(content).documentElement
doc.replaceChild(xi_doc, node)

if version is None:
version = "UNKNOWN"
program = doc.attributes['program'].nodeValue
Expand Down Expand Up @@ -80,22 +100,27 @@ def manpage_to_nroff(xml_file, subst, version=None):

if __name__ == "__main__":
try:
options, args = getopt.gnu_getopt(sys.argv[1:], 'hV',
['version=', 'help'])
options, args = getopt.gnu_getopt(sys.argv[1:], 'hVI:',
['version=', 'help', 'include='])
except getopt.GetoptError, geo:
sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
sys.exit(1)

er_diagram = None
title = None
version = None
include_path = []
for key, value in options:
if key == '--version':
version = value
elif key in ['-h', '--help']:
usage()
elif key in ['-I', '--include']:
include_path.append(value)
else:
sys.exit(0)
if not include_path:
include_path = ['.']

if len(args) < 1:
sys.stderr.write("%s: exactly 1 non-option arguments required "
Expand All @@ -113,7 +138,7 @@ if __name__ == "__main__":
subst['@%s@' % var] = value

try:
s = manpage_to_nroff(args[0], subst, version)
s = manpage_to_nroff(args[0], subst, include_path, version)
except build.nroff.error.Error, e:
sys.stderr.write("%s: %s\n" % (argv0, e.msg))
sys.exit(1)
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ OVS_CHECK_OPENSSL
OVS_CHECK_LIBCAPNG
OVS_CHECK_LOGDIR
OVS_CHECK_PYTHON
OVS_CHECK_FLAKE8
OVS_CHECK_DOT
OVS_CHECK_IF_PACKET
OVS_CHECK_IF_DL
Expand Down
1 change: 0 additions & 1 deletion datapath-windows/ovsext/Gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ OvsDoEncapGre(POVS_VPORT_ENTRY vport,
default:
OVS_LOG_ERROR("Unknown LSO transmit type:%d",
tsoInfo.Transmit.Type);
return NDIS_STATUS_FAILURE;
}
OVS_LOG_TRACE("MSS %u packet len %u", mss,
packetLength);
Expand Down
18 changes: 15 additions & 3 deletions datapath-windows/ovsext/Vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport,
POVS_VXLAN_VPORT vportVxlan;
UINT32 headRoom = OvsGetVxlanTunHdrSize();
UINT32 packetLength;
ULONG mss = 0;

/*
* XXX: the assumption currently is that the NBL is owned by OVS, and
Expand All @@ -204,12 +205,23 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport,

tsoInfo.Value = NET_BUFFER_LIST_INFO(curNbl,
TcpLargeSendNetBufferListInfo);
OVS_LOG_TRACE("MSS %u packet len %u", tsoInfo.LsoV1Transmit.MSS,
switch (tsoInfo.Transmit.Type) {
case NDIS_TCP_LARGE_SEND_OFFLOAD_V1_TYPE:
mss = tsoInfo.LsoV1Transmit.MSS;
break;
case NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE:
mss = tsoInfo.LsoV2Transmit.MSS;
break;
default:
OVS_LOG_ERROR("Unknown LSO transmit type:%d",
tsoInfo.Transmit.Type);
}
OVS_LOG_TRACE("MSS %u packet len %u", mss,
packetLength);
if (tsoInfo.LsoV1Transmit.MSS) {
if (mss) {
OVS_LOG_TRACE("l4Offset %d", layers->l4Offset);
*newNbl = OvsTcpSegmentNBL(switchContext, curNbl, layers,
tsoInfo.LsoV1Transmit.MSS, headRoom);
mss, headRoom);
if (*newNbl == NULL) {
OVS_LOG_ERROR("Unable to segment NBL");
return NDIS_STATUS_FAILURE;
Expand Down
20 changes: 14 additions & 6 deletions datapath/linux/compat/stt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,12 +1586,6 @@ static void stt_cleanup(struct net *net)
sn->n_tunnels--;
if (sn->n_tunnels)
goto out;
#ifdef HAVE_NF_REGISTER_NET_HOOK
nf_unregister_net_hook(net, &nf_hook_ops);
#else
nf_unregister_hook(&nf_hook_ops);
#endif

out:
n_tunnels--;
if (n_tunnels)
Expand Down Expand Up @@ -1668,6 +1662,7 @@ static int stt_stop(struct net_device *dev)
struct net *net = stt_dev->net;

list_del_rcu(&stt_dev->up_next);
synchronize_net();
tcp_sock_release(stt_dev->sock);
stt_dev->sock = NULL;
stt_cleanup(net);
Expand Down Expand Up @@ -1869,6 +1864,14 @@ static void stt_exit_net(struct net *net)
struct net_device *dev, *aux;
LIST_HEAD(list);

#ifdef HAVE_NF_REGISTER_NET_HOOK
/* Ideally this should be done from stt_stop(), But on some kernels
* nf-unreg operation needs RTNL-lock, which can cause deallock.
* So it is done from here. */
if (!list_empty(&nf_hook_ops.list))
nf_unregister_net_hook(net, &nf_hook_ops);
#endif

rtnl_lock();

/* gather any stt devices that were moved into this ns */
Expand Down Expand Up @@ -1908,6 +1911,7 @@ int stt_init_module(void)
if (rc)
goto out2;

INIT_LIST_HEAD(&nf_hook_ops.list);
pr_info("STT tunneling driver\n");
return 0;
out2:
Expand All @@ -1918,6 +1922,10 @@ int stt_init_module(void)

void stt_cleanup_module(void)
{
#ifndef HAVE_NF_REGISTER_NET_HOOK
if (!list_empty(&nf_hook_ops.list))
nf_unregister_hook(&nf_hook_ops);
#endif
rtnl_link_unregister(&stt_link_ops);
unregister_pernet_subsys(&stt_net_ops);
}
Expand Down
3 changes: 3 additions & 0 deletions debian/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ EXTRA_DIST += \
debian/ifupdown.sh \
debian/source/format

FLAKE8_PYFILES += \
debian/ovs-monitor-ipsec

check-debian-changelog-version:
@DEB_VERSION=`echo '$(VERSION)' | sed 's/pre/~pre/'`; \
if $(FGREP) '($(DEB_VERSION)' $(srcdir)/debian/changelog >/dev/null; \
Expand Down
7 changes: 3 additions & 4 deletions debian/ovs-monitor-ipsec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import sys

import ovs.dirs
from ovs.db import error
from ovs.db import types
import ovs.util
import ovs.daemon
import ovs.db.idl
Expand Down Expand Up @@ -210,9 +209,9 @@ path certificate "%s";
if host in self.psk_hosts:
raise error.Error("host %s already defined for psk" % host)

if vals["certificate"] == None:
if vals["certificate"] is None:
raise error.Error("'certificate' not defined for %s" % host)
elif vals["private_key"] == None:
elif vals["private_key"] is None:
# Assume the private key is stored in the same PEM file as
# the certificate. We make a copy of "vals" so that we don't
# modify the original "vals", which would cause the script
Expand Down Expand Up @@ -372,7 +371,7 @@ def update_ipsec(ipsec, interfaces, new_interfaces):

try:
ipsec.add_entry(vals["local_ip"], vals["remote_ip"], vals)
except error.Error, msg:
except error.Error as msg:
vlog.warn("skipping ipsec config for %s: %s" % (name, msg))


Expand Down
3 changes: 2 additions & 1 deletion lib/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ EXTRA_DIST += \
lib/dh1024.pem \
lib/dh2048.pem \
lib/dh4096.pem \
lib/dirs.c.in
lib/dirs.c.in \
lib/db-ctl-base.xml

MAN_FRAGMENTS += \
lib/common.man \
Expand Down
Loading

0 comments on commit 5e3a2a1

Please sign in to comment.