Ben Pfaff | 25 Oct 01:17 2014

[PATCH] classifier: Correct comment in classifier_lookup().

Signed-off-by: Ben Pfaff <blp <at> nicira.com>
---
 lib/classifier.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/classifier.c b/lib/classifier.c
index 8dc89d9..b62624e 100644
--- a/lib/classifier.c
+++ b/lib/classifier.c
 <at>  <at>  -946,7 +946,7  <at>  <at>  classifier_lookup(const struct classifier *cls, const struct flow *flow,
                                   hash_metadata(flow->metadata)));
     tags = partition ? partition->tags : TAG_ARBITRARY;

-    /* Initialize trie contexts for match_find_wc(). */
+    /* Initialize trie contexts for find_match_wc(). */
     for (int i = 0; i < cls->n_tries; i++) {
         trie_ctx_init(&trie_ctx[i], &cls->tries[i]);
     }
--

-- 
1.7.10.4

_______________________________________________
dev mailing list
dev <at> openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
Jarno Rajahalme | 24 Oct 22:36 2014

[PATCH 0/7] Lockless and robust classifier iteration.

This series enhances the lib/classifier to allow lockless iteration
that is also robust against concurrent modifications of arbitrary
classifier rules.  This makes it possible to use a classifier without
any additional synchronization in some use cases.

Iteration is typically not in performance critical code paths, so this
should have no effect on performance, but this makes the code cleaner
and more robust.

Jarno Rajahalme (7):
  lib/ofproto: Remove obsolete FIXME comment.
  lib/ofproto: Add comments about races in ofproto_flush().
  lib/ovs-rcu: Support static initialization.
  lib/rculist: New RCU-iterator, single-writer doubly-linked list.
  tests/test-classifier: Properly use ovsrcu_postpone.
  lib/classifier: Lockless and robust classifier iteration.
  lib/classifier: Constify cls_subtable fields.

 lib/automake.mk              |    2 +
 lib/classifier-private.h     |   84 ++++--
 lib/classifier.c             |  641 ++++++++++++++++++++----------------------
 lib/classifier.h             |   83 +++---
 lib/flow.c                   |    4 +-
 lib/ovs-rcu.h                |    4 +-
 lib/pvector.h                |    7 +
 lib/rculist.c                |   27 ++
 lib/rculist.h                |  404 ++++++++++++++++++++++++++
 ofproto/connmgr.c            |    2 +-
 ofproto/fail-open.h          |    2 +-
 ofproto/ofproto-dpif-xlate.c |    2 +-
(Continue reading)

Nithin Raju | 24 Oct 22:02 2014

[PATCH] lib/netdev-windows.c: fixes in update flags and copying MAC address

The .update_flags function in netdev-windows was dummy. But we need to
return the existing flags for link status to be shown as up in the
confdb.

There was a bug in copying the MAC address.

We fix these two issues in this patch.

Signed-off-by: Nithin Raju <nithin <at> vmware.com>
Co-Authored-by: Ankur Sharma <ankursharma <at> vmware.com>
---
 lib/netdev-windows.c |   50 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c
index 75380e4..465f0c5 100644
--- a/lib/netdev-windows.c
+++ b/lib/netdev-windows.c
 <at>  <at>  -74,7 +74,6  <at>  <at>  struct netdev_windows_netdev_info {
     uint32_t ifi_flags;
 };

-static int refresh_port_status(struct netdev_windows *netdev);
 static int query_netdev(const char *devname,
                         struct netdev_windows_netdev_info *reply,
                         struct ofpbuf **bufp);
 <at>  <at>  -133,6 +132,22  <at>  <at>  netdev_windows_alloc(void)
     return netdev ? &netdev->up : NULL;
 }

(Continue reading)

Ankur Sharma | 24 Oct 20:54 2014

Re: [PATCH] datapath-windows: Allow encapsulation if source is bridge-internal port

Acked-by: Ankur Sharma <ankursharma <at> vmware.com>
________________________________________
From: Nithin Raju
Sent: Friday, October 24, 2014 11:52 AM
To: Ankur Sharma
Subject: FW: [PATCH] datapath-windows: Allow encapsulation if source is bridge-internal port

For Ack-ing.

Get the patch file from:
/dbc/pa-dbc1122/nithin/nithin-ovs-int-1/tmp/patches/vport-allow-tunnel-for-cfm.patch

Thanks!
-- Nithin

> -----Original Message-----
> From: Nithin Raju [mailto:nithin <at> vmware.com]
> Sent: Friday, October 24, 2014 11:41 AM
> To: dev <at> openvswitch.org
> Cc: Nithin Raju
> Subject: [PATCH] datapath-windows: Allow encapsulation if source is bridge-
> internal port
>
> It has been observed that when userspace generates and executes that packet,
> the source port of such a packet is set to the bridge-internal port.
> Currently, we allow encapsulation only if the source port is a VIF port or no
> port. We relax the check in this patch.
>
> Signed-off-by: Nithin Raju <nithin <at> vmware.com>
> ---
(Continue reading)

Nithin Raju | 24 Oct 20:41 2014

[PATCH] datapath-windows: Allow encapsulation if source is bridge-internal port

It has been observed that when userspace generates and executes that
packet, the source port of such a packet is set to the bridge-internal
port. Currently, we allow encapsulation only if the source port is a VIF
port or no port. We relax the check in this patch.

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

diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
index 14d1f8f..dfa5ecb 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
 <at>  <at>  -266,8 +266,10  <at>  <at>  OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
         /*
          * Tx:
          * The destination port is a tunnel port. Encapsulation must be
-         * performed only on packets that originate from a VIF port or from
-         * userspace (default port)
+         * performed only on packets that originate from:
+         * - a VIF port
+         * - a bridge-internal port (packets generated from userspace)
+         * - no port.
          *
          * If the packet will not be encapsulated, consume the tunnel context
          * by clearing it.
 <at>  <at>  -277,7 +279,9  <at>  <at>  OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
             POVS_VPORT_ENTRY vport = OvsFindVportByPortNo(
                 ovsFwdCtx->switchContext, ovsFwdCtx->srcVportNo);
(Continue reading)

Eitan Eliahu | 25 Oct 02:46 2014

[PATCH v2] datapath-windows:Remove user mode instance from pid hash on process termination

The instance should be removed from pid-hash when vswitchd.exe terminates so
the driver won't access it during packet miss (causing BSOD)

Signed-off-by: Eitan Eliahu <eliahue <at> vmware.com>
Acked-by: Sorin Vinturis <svinturis <at> cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin <at> vmware.com>
---
 datapath-windows/ovsext/User.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/datapath-windows/ovsext/User.c b/datapath-windows/ovsext/User.c
index 501dc12..fc27f7d 100644
--- a/datapath-windows/ovsext/User.c
+++ b/datapath-windows/ovsext/User.c
 <at>  <at>  -98,6 +98,7  <at>  <at>  OvsCleanupPacketQueue(POVS_OPEN_INSTANCE instance)
     LIST_ENTRY tmp;
     PIRP irp = NULL;

+    ASSERT(instance);
     InitializeListHead(&tmp);
     queue = (POVS_USER_PACKET_QUEUE)instance->packetQueue;
     if (queue) {
 <at>  <at>  -139,6 +140,11  <at>  <at>  OvsCleanupPacketQueue(POVS_OPEN_INSTANCE instance)
     if (queue) {
         OvsFreeMemory(queue);
     }
+
+    /* Remove the instance from pidHashArray */
+    OvsAcquirePidHashLock();
+    OvsDelPidInstance(gOvsSwitchContext, instance->pid);
(Continue reading)

Nithin Raju | 24 Oct 18:13 2014

Re: [PATCH] datapath-windows:Remove user mode instance from pid hash on process termination

> -----Original Message-----
> From: Eitan Eliahu [mailto:eliahue <at> vmware.com]
> Sent: Thursday, October 23, 2014 11:04 PM
> To: Nithin Raju
> Cc: Eitan Eliahu
> Subject: [PATCH] datapath-windows:Remove user mode instance from pid hash on
> process termination
> 
> The instance should be removed from pid-hash when vswitchd.exe terminates so
> the driver won't access it during packet miss (causing BSOD)
> 
> Signed-off-by: Eitan Eliahu <eliahue <at> vmware.com>

As we dicussed offline, this needs rebasing after Ankur's patches. LG otherwise.

Acked-by: Nithin Raju <nithin <at> vmware.com>

Thanks!
-- Nithin
_______________________________________________
dev mailing list
dev <at> openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
Nithin Raju | 24 Oct 17:14 2014

[PATCH] lib/netlink-socket.c: fix a couple of compilation warnings

Reported-by: Gurucharan Shetty <gshetty <at> nicira.com>
Signed-off-by: Nithin Raju <nithin <at> vmware.com>
---
 lib/netlink-socket.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 3b77b43..c9ec5d7 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
 <at>  <at>  -1180,7 +1180,7  <at>  <at>  nl_dump_done(struct nl_dump *dump)
  * the overlapped structure event associated with the pending I/O will be set
  */
 static int
-pend_io_request(const struct nl_sock *sock)
+pend_io_request(struct nl_sock *sock)
 {
     struct ofpbuf request;
     uint64_t request_stub[128];
 <at>  <at>  -1229,13 +1229,14  <at>  <at>  done:
 #endif  /* _WIN32 */

 /* Causes poll_block() to wake up when any of the specified 'events' (which is
- * a OR'd combination of POLLIN, POLLOUT, etc.) occur on 'sock'. */
+ * a OR'd combination of POLLIN, POLLOUT, etc.) occur on 'sock'.
+ * On Windows, 'sock' is not treated as const, and may be modified. */
 void
 nl_sock_wait(const struct nl_sock *sock, short int events)
 {
 #ifdef _WIN32
(Continue reading)

Returned mail | 24 Oct 10:39 2014

Message could not be delivered

Message could not be delivered

_______________________________________________
dev mailing list
dev <at> openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
Sorin Vinturis | 24 Oct 10:33 2014

[PATCH v2] datapath-windows: Fixed vport search functions

In OvsStartNBLIngress() function the vport is searched using the
OvsFindVportByPortIdAndNicIndex(), which browse the vports list to
find the appropriate vport, but also checks the externalVport and
internalVport vports from the switchContext. The searched vport
matches with the externalVport from the switch context. Later in the
code, the OvsCreateAndAddPackets() is called, which in turn calls
OvsCreateQueueNlPacket(), passing along the portNo on the stack, and
the vport is identified using the OvsFindVportByPortNo().

The problem I have found is that the OvsFindVportByPortNo() browse
through the vports list to find the searched vport, but does not check
the internalVport and externalVport vports from the switchContext.
Thus, the vport, identified by the OvsFindVportByPortIdAndNicIndex()
as being the externalVport, is not correctly identified using the
OvsFindVportByPortNo().

This patch adds the check against the externalVport and internalVport
also in the OvsFindVportByPortNo().

Signed-off-by: Sorin Vinturis <svinturis <at> cloudbasesolutions.com>
---
 datapath-windows/ovsext/Vport.c | 65 ++++++++++++++++++++++++-----------------
 1 file changed, 39 insertions(+), 26 deletions(-)

diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index 0522cfd..9c9355a 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
 <at>  <at>  -465,18 +465,29  <at>  <at>  POVS_VPORT_ENTRY
 OvsFindVportByPortNo(POVS_SWITCH_CONTEXT switchContext,
(Continue reading)

Simon Horman | 24 Oct 07:59 2014

[PATCH] ofproto: Only allow indirect groups with one bucket

OpenFlow 1.1 - 1.4 specify that indirect groups should
opperate on the "one defined bucket in the group". OpenFlow
1.2 - 1.4 also state "This group only supports a single bucket."

This patch enforces the single bucket limitation for indirect groups
when decoding group mod messages. A test is also added to exercise
this change.

Signed-off-by: Simon Horman <simon.horman <at> netronome.com>
---
 lib/ofp-util.c   | 14 ++++++++++++++
 tests/ofproto.at | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index d765d03..573f38a 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
 <at>  <at>  -7420,6 +7420,20  <at>  <at>  ofputil_decode_group_mod(const struct ofp_header *oh,
         return err;
     }

+    switch (gm->type) {
+    case OFPGT11_INDIRECT:
+        if (!list_is_singleton(&gm->buckets)) {
+            return OFPERR_OFPGMFC_INVALID_GROUP;
+        }
+        break;
+    case OFPGT11_ALL:
+    case OFPGT11_SELECT:
(Continue reading)


Gmane