Ben Pfaff | 30 Oct 23:36 2014

[PATCH v2 1/3] classifier: Change type used for priorities from 'unsigned int' to 'int'.

OpenFlow has priorities in the 16-bit unsigned range, from 0 to 65535.
In the classifier, it is sometimes useful to be able to have values below
and above this range.  With the 'unsigned int' type used for priorities
until now, there were no values below the range, so some code worked
around it by converting priorities to 64-bit signed integers.  This didn't
seem so great to me given that a plain 'int' also had the needed range.
This commit therefore changes the type used for priorities to int.

The interesting parts of this change are in pvector.h and classifier.c,
where one can see the elimination of the use of int64_t.

Signed-off-by: Ben Pfaff <blp <at> nicira.com>
---
v1->v2: Switch priority type to 'int', instead of trying to change all the
  "greater than"s to "greater than or equals" and in later patches doing a
  lot of awkward +1s.
---
 lib/classifier-private.h   |    5 ++---
 lib/classifier.c           |   24 ++++++++++--------------
 lib/classifier.h           |    9 ++++-----
 lib/match.c                |   11 +++++------
 lib/match.h                |    9 ++++-----
 lib/ofp-util.h             |    2 +-
 lib/pvector.c              |   12 +++++++-----
 lib/pvector.h              |   14 ++++++++------
 ofproto/in-band.c          |    4 ++--
 ofproto/ofproto-provider.h |    6 ++----
 ofproto/ofproto.c          |   13 ++++++-------
 tests/test-classifier.c    |   29 ++++++++++++++---------------
 utilities/ovs-ofctl.c      |    6 +++---
(Continue reading)

Eitan Eliahu | 31 Oct 06:34 2014

[PATCH] WMI Script Support for setting Hyper-V friendly port name from NOVA driver

Added a function Set-VMNetworkAdapterOVSPortDirect() to be called from
NOVA driver to set a name on the port of the first VNIC for the specified VM.

Usage example:
Set-VMNetworkAdapterOVSPortDirect -OVSPortName ovs-port-5 -VMName NoOS

To confirm that the name was set:
Get-VMNetworkAdapterByOVSPort  -OVSPortName ovs-port-5

Signed-off-by: Eitan Eliahu <eliahue <at> vmware.com>
---
 datapath-windows/misc/OVS.psm1 | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/datapath-windows/misc/OVS.psm1 b/datapath-windows/misc/OVS.psm1
index b83b263..0f4f8c8 100644
--- a/datapath-windows/misc/OVS.psm1
+++ b/datapath-windows/misc/OVS.psm1
 <at>  <at>  -152,3 +152,27  <at>  <at>  function Check-WMIReturnValue($retVal)
         }
     }
 }
+
+function Set-VMNetworkAdapterOVSPortDirect
+{
+    [CmdletBinding()]
+    param
+    (
+        [parameter(Mandatory=$true)]
+        [string]$vmName,
(Continue reading)

Nithin Raju | 30 Oct 21:54 2014

[PATCH 1/3 v3] datapath-windows: nuke USE_NEW_VPORT_ADD_WORKFLOW

We were using USE_NEW_VPORT_ADD_WORKFLOW while transitioning from old
workflow for adding ports. We don't need it anymore.

Signed-off-by: Nithin Raju <nithin <at> vmware.com>
Acked-by: Eitan Eliahu <eliahue <at> vmware.com>
---
 datapath-windows/ovsext/Vport.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index d951d08..b28336b 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
 <at>  <at>  -1179,11 +1179,6  <at>  <at>  OvsConvertIfCountedStrToAnsiStr(PIF_COUNTED_STRING wStr,
 }

 
-/*
- * XXX: Get rid of USE_NEW_VPORT_ADD_WORKFLOW while checking in the code for
- * new vport add workflow, or set USE_NEW_VPORT_ADD_WORKFLOW to 1.
- */
-#define USE_NEW_VPORT_ADD_WORKFLOW 1
 NTSTATUS
 OvsGetExtInfoIoctl(POVS_VPORT_GET vportGet,
                    POVS_VPORT_EXT_INFO extInfo)
 <at>  <at>  -1199,12 +1194,7  <at>  <at>  OvsGetExtInfoIoctl(POVS_VPORT_GET vportGet,
                           NDIS_RWL_AT_DISPATCH_LEVEL);
     if (vportGet->portNo == 0) {
         StringCbLengthA(vportGet->name, OVS_MAX_PORT_NAME_LENGTH - 1, &len);
-#if USE_NEW_VPORT_ADD_WORKFLOW == 0
(Continue reading)

Joe Stringer | 30 Oct 21:48 2014

[branch-2.3] ofproto: Take locks before calling classifier_count().

Commit 635e5bf55b (ofproto: Warn about excessive rule counts in OpenFlow
tables.) introduced an access of classifier_count() without taking the
corresponding locks first.

Found by clang.

Signed-off-by: Joe Stringer <joestringer <at> nicira.com>
---
Maybe this is not problematic, but clang refuses to compile without a
fix like this. The code on master has changed considerably and just
turns off threadsafety annotations in classifier_count(). I'm not sure
if the same fix is applicable for branch-2.3.
---
 ofproto/ofproto.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 7563cfd..98ed75d 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
 <at>  <at>  -1478,6 +1478,9  <at>  <at>  ofproto_run(struct ofproto *p)
                 continue;
             }

+            ovs_mutex_lock(&ofproto_mutex);
+            fat_rwlock_rdlock(&table->cls.rwlock);
+
             if (classifier_count(&table->cls) > 100000) {
                 static struct vlog_rate_limit count_rl =
                     VLOG_RATE_LIMIT_INIT(1, 1);
(Continue reading)

Nithin Raju | 30 Oct 21:17 2014

[PATCH] datapath-windows: don't leak NBLs with multiple NBs

Currently, if we receive an NBL with multiple NBs from NDIS, we just
ASSERT() and not do anything. The right thing to do obviously is to
process the NBL. This is a work in progress.

In the meantime, we should complete the NBL and not just leak it.

Signed-off-by: Nithin Raju <nithin <at> vmware.com>
---
 datapath-windows/ovsext/PacketIO.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/datapath-windows/ovsext/PacketIO.c b/datapath-windows/ovsext/PacketIO.c
index 5223125..1af391b 100644
--- a/datapath-windows/ovsext/PacketIO.c
+++ b/datapath-windows/ovsext/PacketIO.c
 <at>  <at>  -218,7 +218,12  <at>  <at>  OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext,
         curNb = NET_BUFFER_LIST_FIRST_NB(curNbl);
         if (curNb->Next != NULL) {
             /* XXX: This case is not handled yet. */
-            ASSERT(FALSE);
+            RtlInitUnicodeString(&filterReason,
+                L"Dropping NBLs with multiple NBs");
+            OvsStartNBLIngressError(switchContext, curNbl,
+                                    sendCompleteFlags, &filterReason,
+                                    NDIS_STATUS_RESOURCES);
+            continue;
         } else {
             POVS_BUFFER_CONTEXT ctx;
             OvsFlow *flow;
--

-- 
(Continue reading)

Nithin Raju | 30 Oct 21:14 2014

[PATCH 1/3 v2] datapath-windows: nuke USE_NEW_VPORT_ADD_WORKFLOW

We were using USE_NEW_VPORT_ADD_WORKFLOW while transitioning from old
workflow for adding ports. We don't need it anymore.

Signed-off-by: Nithin Raju <nithin <at> vmware.com>
Acked-by: Eitan Eliahu <eliahue <at> vmware.com>
---
 datapath-windows/ovsext/Vport.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index d951d08..b28336b 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
 <at>  <at>  -1179,11 +1179,6  <at>  <at>  OvsConvertIfCountedStrToAnsiStr(PIF_COUNTED_STRING wStr,
 }

 
-/*
- * XXX: Get rid of USE_NEW_VPORT_ADD_WORKFLOW while checking in the code for
- * new vport add workflow, or set USE_NEW_VPORT_ADD_WORKFLOW to 1.
- */
-#define USE_NEW_VPORT_ADD_WORKFLOW 1
 NTSTATUS
 OvsGetExtInfoIoctl(POVS_VPORT_GET vportGet,
                    POVS_VPORT_EXT_INFO extInfo)
 <at>  <at>  -1199,12 +1194,7  <at>  <at>  OvsGetExtInfoIoctl(POVS_VPORT_GET vportGet,
                           NDIS_RWL_AT_DISPATCH_LEVEL);
     if (vportGet->portNo == 0) {
         StringCbLengthA(vportGet->name, OVS_MAX_PORT_NAME_LENGTH - 1, &len);
-#if USE_NEW_VPORT_ADD_WORKFLOW == 0
(Continue reading)

Ben Pfaff | 30 Oct 18:38 2014

[PATCH] netdev-linux: Avoid depending on kernel definition of rtnl_link_stats64.

We have to define our own with some kernel headers, so we might as well do
it everywhere, especially since there seems to be a problem with detecting
the presence of the definition with at least some kernels.

Reported-by: Wang Sheng-Hui <shhuiw <at> gmail.com>
Signed-off-by: Ben Pfaff <blp <at> nicira.com>
---
 configure.ac       |    2 --
 lib/netdev-linux.c |   13 ++++++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index a8a530a..62224b9 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -67,8 +67,6  <at>  <at>  AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]])
 AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec],
   [], [], [[#include <sys/stat.h>]])
 AC_CHECK_MEMBERS([struct ifreq.ifr_flagshigh], [], [], [[#include <net/if.h>]])
-AC_CHECK_TYPES([struct rtnl_link_stats64], [], [],
-  [[#include <linux/if_link.h>]])
 AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r])
 AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h stdatomic.h])
 AC_CHECK_HEADERS([net/if_mib.h], [], [], [[#include <sys/types.h>
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index ff7c274..d19220b 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
 <at>  <at>  -138,9 +138,17  <at>  <at>  struct tpacket_auxdata {
     uint16_t tp_vlan_tpid;
(Continue reading)

Alex Wang | 30 Oct 17:37 2014

[PATCH] ovs-sandbox: Fix 'make sandbox' failure.

Commit 542cc9bb(doc: Convert docs to Markdown language) changes
the file name in root directory which causes the file exist check
fails in make sandbox.  This commit fixes the issue.

Signed-off-by: Alex Wang <alexw <at> nicira.com>
---
 tutorial/ovs-sandbox |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index 21066d1..45bb234 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
 <at>  <at>  -136,7 +136,7  <at>  <at>  if $built; then
     case $srcdir in
         '')
             srcdir=$builddir
-            if test ! -e "$srcdir"/WHY-OVS; then
+            if test ! -e "$srcdir"/WHY-OVS.md; then
                 srcdir=`cd $builddir/.. && pwd`
             fi
             ;;
--

-- 
1.7.9.5

_______________________________________________
dev mailing list
dev <at> openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
(Continue reading)

Sorin Vinturis | 30 Oct 15:32 2014

[PATCH] datapath-windows: Avoid BSOD when switch context is NULL

In my tests I came around a BSOD that happened when trying to
access pidHashLock from the gOvsSwitchContext, which was NULL.
The stop happened in OvsAcquirePidHashLock function.

Signed-off-by: Sorin Vinturis <svinturis <at> cloudbasesolutions.com>

---
 datapath-windows/ovsext/BufferMgmt.c |  8 ++++++--
 datapath-windows/ovsext/Datapath.c   |  5 ++++-
 datapath-windows/ovsext/Tunnel.c     |  3 ++-
 datapath-windows/ovsext/User.c       | 30 +++++++++++++++++++++---------
 4 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/datapath-windows/ovsext/BufferMgmt.c b/datapath-windows/ovsext/BufferMgmt.c
index e0377c1..1a68575 100644
--- a/datapath-windows/ovsext/BufferMgmt.c
+++ b/datapath-windows/ovsext/BufferMgmt.c
 <at>  <at>  -474,15 +474,19  <at>  <at>  OvsAllocateVariableSizeNBL(PVOID ovsContext,
 {
     PNET_BUFFER_LIST nbl = NULL;
     POVS_SWITCH_CONTEXT context = (POVS_SWITCH_CONTEXT)ovsContext;
-    POVS_NBL_POOL ovsPool = &context->ovsPool;
+    POVS_NBL_POOL ovsPool = NULL;
     POVS_BUFFER_CONTEXT ctx;
     UINT32 realSize;
     PMDL mdl;
     NDIS_STATUS status;
     PNDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO info;
-    if (size == 0) {
+
(Continue reading)

Thomas Graf | 30 Oct 13:04 2014

[PATCH v2] doc: Add more cross references between docs

Suggested-by: Lori Jakab <lojakab <at> cisco.com>
Signed-off-by: Thomas Graf <tgraf <at> noironetworks.com>
---
- Use reference section at end of document to allow adding references
  by simpling surrounding file names with [] as suggested by Lori.

 CONTRIBUTING.md      | 10 ++++++----
 FAQ.md               | 18 +++++++++++-------
 INSTALL.DPDK.md      |  8 +++++---
 INSTALL.Debian.md    |  3 ++-
 INSTALL.Docker.md    | 10 ++++++----
 INSTALL.Fedora.md    |  4 +++-
 INSTALL.KVM.md       | 11 ++++++-----
 INSTALL.Libvirt.md   |  6 ++++--
 INSTALL.NetBSD.md    |  8 ++++++--
 INSTALL.RHEL.md      | 11 +++++++----
 INSTALL.SSL.md       |  6 ++++--
 INSTALL.XenServer.md |  8 +++++---
 INSTALL.md           | 34 ++++++++++++++++++++++------------
 INSTALL.userspace.md |  4 +++-
 OPENFLOW-1.1+.md     |  9 ++++++---
 PORTING.md           |  6 ++++--
 README.md            | 40 +++++++++++++++++++++++++---------------
 TODO.md              | 22 +++++++++++++---------
 tutorial/ovs-sandbox |  2 +-
 19 files changed, 139 insertions(+), 81 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b434e78..23c5410 100644
--- a/CONTRIBUTING.md
(Continue reading)

Thomas Graf | 30 Oct 11:26 2014

[PATCH] doc: Add more cross references between docs

Signed-off-by: Thomas Graf <tgraf <at> noironetworks.com>
---
 FAQ.md               | 10 +++++-----
 INSTALL.Libvirt.md   |  6 +++---
 INSTALL.NetBSD.md    |  3 ++-
 INSTALL.SSL.md       |  4 ++--
 INSTALL.md           | 16 ++++++++--------
 INSTALL.userspace.md |  6 +++---
 OPENFLOW-1.1+.md     |  4 ++--
 README.md            |  8 ++++----
 TODO.md              | 14 ++++++++------
 tutorial/ovs-sandbox |  2 +-
 10 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/FAQ.md b/FAQ.md
index 01228eb..464b01d 100644
--- a/FAQ.md
+++ b/FAQ.md
 <at>  <at>  -1237,11 +1237,11  <at>  <at>  A: The following table lists the versions of OpenFlow supported by
    (Open vSwitch 2.2 had an experimental implementation of OpenFlow
    1.4 that could cause crashes.  We don't recommend enabling it.)

-   OPENFLOW-1.1+ in the Open vSwitch source tree tracks support for
-   OpenFlow 1.1 and later features.  When support for OpenFlow 1.4 and
-   1.5 is solidly implemented, Open vSwitch will enable those version
-   by default.  Also, the OpenFlow 1.5 specification is still under
-   development and thus subject to change.
+   [OPENFLOW-1.1+](OPENFLOW-1.1+.md) in the Open vSwitch source tree
+   tracks support for OpenFlow 1.1 and later features.  When support
+   for OpenFlow 1.4 and 1.5 is solidly implemented, Open vSwitch will
(Continue reading)


Gmane