Re: [ovs-dev] [v8 2/2] datapath: Implement recirc action without recursion

2014-09-05 Thread Andy Zhou
Thanks. Pushed to master with suggested changes. On Fri, Sep 5, 2014 at 4:23 PM, Pravin Shelar wrote: > On Fri, Sep 5, 2014 at 2:52 PM, Andy Zhou wrote: >> Since kernel stack is limited in size, it is not wise to using >> recursive function with large stack frames. >> >> This patch provides an a

[ovs-dev] [PATCH 2/2] dpif-netdev: Store miniflow length in exact match cache

2014-09-05 Thread Daniele Di Proietto
This optimization is done to avoid calling count_1bits(), which, if the popcnt istruction, is not available might is slow. popcnt may not be available because: - We are running on old hardware - (more likely) We're using a generic build (i.e. packaged OVS from a distro), not tuned for the specif

[ovs-dev] [PATCH 1/2] dpif-netdev: Introduce netdev_flow_key_* functions

2014-09-05 Thread Daniele Di Proietto
netdev_flow_key is a miniflow with the following constraints: 1) It is used only inside dpif-netdev.c. 2) It always has inline values. 3) It contains only miniflows created by miniflow_extract(). Therefore, by using these new functions instead of the miniflow_* ones, we get the following (perform

Re: [ovs-dev] [v8 2/2] datapath: Implement recirc action without recursion

2014-09-05 Thread Pravin Shelar
On Fri, Sep 5, 2014 at 2:52 PM, Andy Zhou wrote: > Since kernel stack is limited in size, it is not wise to using > recursive function with large stack frames. > > This patch provides an alternative implementation of recirc action > without using recursion. > > A per CPU fixed sized, 'deferred act

[ovs-dev] [PATCH v5 10/13] lib/odp-util: Reduce duplicated code.

2014-09-05 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/odp-util.c | 217 1 file changed, 94 insertions(+), 123 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 3c398ce..967ed27 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2483,23 +

[ovs-dev] [PATCH v5 01/13] lib/odp: Masked set action execution and printing.

2014-09-05 Thread Jarno Rajahalme
Add a new action type OVS_ACTION_ATTR_SET_MASKED, and support for parsing, printing, and committing them. Masked set actions add a mask, immediately following the netlink attribute data, within the netlink attribute itself. Thus the key attribute size for a masked set action is exactly double of

[ovs-dev] [PATCH v5 11/13] datapath: Allow masks for set actions.

2014-09-05 Thread Jarno Rajahalme
Masked set action allows more megaflow wildcarding. Masked set action is now supported for all writeable key types, except for the tunnel key. The set tunnel action is an exception as any input tunnel info is cleared before action processing starts, so there is no tunnel info to mask. The kernel

[ovs-dev] [PATCH v5 13/13] datapath: Relax match_validate.

2014-09-05 Thread Jarno Rajahalme
When userspace inserts masked flows, it is not necessary to demand that flows matching in a known ethertype also must have the corresponding key, as a missing key will be automatically wildcarded. For example, if a drop flow dropping all UDP packets is installed, this patch allows the userspace ap

[ovs-dev] [PATCH v5 12/13] datapath: Relax flow set-up time validations.

2014-09-05 Thread Jarno Rajahalme
Allow setting of fields without matching on the same fields. Field existence check is done on set action execution time instead, using the extracted flow key. Signed-off-by: Jarno Rajahalme --- datapath/actions.c | 21 - datapath/flow_netlink.c | 46 +++-

[ovs-dev] [PATCH v5 07/13] ofproto: Probe for masked set action support.

2014-09-05 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme Reviewed-by: YAMAMOTO Takashi Acked-by: Ben Pfaff --- v5: rebase, no other changes. ofproto/ofproto-dpif-xlate.c | 18 + ofproto/ofproto-dpif-xlate.h |3 ++- ofproto/ofproto-dpif.c | 58 +- 3 files

[ovs-dev] [PATCH v5 04/13] lib: Unify flags parsing and formatting.

2014-09-05 Thread Jarno Rajahalme
Use the "+-" syntax more uniformly when printing masked flags, and use the syntax of delimited 1-flags also for formatting fully masked TCP flags. The "+-" syntax only deals with masked flags, but if there are many of those, the printout becomes long and confusing. Typically there are many flags

[ovs-dev] [PATCH v5 06/13] lib/odp-util: Skip ignored fields when parsing and formatting.

2014-09-05 Thread Jarno Rajahalme
When a whole field of a key value is ignored, skip it when formatting the key, and allow it to be left out when parsing the key from a string. However, when the unmasked bits have non-zero values (as in keys received from a datapath), or when the 'verbose' formatting is requested those are still f

[ovs-dev] [PATCH v5 02/13] lib/util: Change is_all_zeros and is_all_ones to take a void *.

2014-09-05 Thread Jarno Rajahalme
is_all_zeros() and is_all_ones() operate on bytes, but just like with memset, it is easier to use if the first argument is a void *. Signed-off-by: Jarno Rajahalme --- lib/meta-flow.c | 14 +++--- lib/odp-util.c |7 +++ lib/util.c |6 -- lib/util.h |4 ++-

[ovs-dev] [PATCH v5 03/13] lib/odp-util: Refine odp_mask_attr_is_exact().

2014-09-05 Thread Jarno Rajahalme
Some attributes are exact matches even when all bits are not ones. Make odp_mask_attr_is_exact() to return true if the mask is set for all the bits we actually care about. Signed-off-by: Jarno Rajahalme --- lib/odp-util.c | 42 +++--- 1 file changed, 27 inse

[ovs-dev] [PATCH v5 08/13] lib/odp: Use masked set actions.

2014-09-05 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- v5: Using pattern with less code duplication suggested by Ben. lib/odp-util.c | 487 ++ lib/odp-util.h |5 +- ofproto/ofproto-dpif-xlate.c | 15 +- tests/ofproto-dpif.at| 66 ++

[ovs-dev] [PATCH v5 05/13] lib/odp-util: Add tunnel tp_src, tp_dst parsing and formatting.

2014-09-05 Thread Jarno Rajahalme
tp_src and tp_dst fields were recently added to struct flow_tnl, but parsing and printing was missing. Signed-off-by: Jarno Rajahalme --- lib/odp-util.c | 38 -- tests/bfd.at|6 ++-- tests/odp.at| 16 +-- tests/tunnel.at | 82 +++

[ovs-dev] [PATCH v5 09/13] lib/odp-util: Fix mapping to Netlink frag mask.

2014-09-05 Thread Jarno Rajahalme
The frag member in the Netlink interface is an uint8_t enumeration type, not a bitrfield, so it should always be either fully masked or not masked at all. Signed-off-by: Jarno Rajahalme --- lib/odp-util.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/

Re: [ovs-dev] [PATCH v4 4/4] datapath: Allow masks for set actions.

2014-09-05 Thread Jarno Rajahalme
Jesse, I’ll send a new patch series soon, but here are the fixes to the comments below for your viewing pleasure: Jarno diff --git a/datapath/actions.c b/datapath/actions.c index 0cb7c9e..243b672 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -510,7 +510,7 @@ static int set_ipv4(

Re: [ovs-dev] [PATCH v4 4/4] datapath: Allow masks for set actions.

2014-09-05 Thread Jarno Rajahalme
On Sep 5, 2014, at 2:26 PM, Jarno Rajahalme wrote: > > On Sep 5, 2014, at 2:12 PM, Jarno Rajahalme wrote: > case OVS_KEY_ATTR_IPV4: >>> [...] - if (ipv4_key->ipv4_frag != flow_key->ip.frag) - return -EINVAL; +

Re: [ovs-dev] [PATCH 4/4] ovs-numa: Add module description.

2014-09-05 Thread Alex Wang
Thanks, applied all to master On Fri, Sep 5, 2014 at 2:20 PM, Pravin Shelar wrote: > On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > > Add a short description of the module and its assumption. > > > > Signed-off-by: Alex Wang > > > LGTM > Acked-by: Pravin B Shelar > __

[ovs-dev] [v8 1/2] datapath: Remove recirc stack depth limit check

2014-09-05 Thread Andy Zhou
Future patches will change the recirc action implementation to not using recursion. The stack depth detection is no longer necessary. Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar --- datapath/actions.c | 63 - datapath/datapath.c | 6 +

[ovs-dev] [v8 2/2] datapath: Implement recirc action without recursion

2014-09-05 Thread Andy Zhou
Since kernel stack is limited in size, it is not wise to using recursive function with large stack frames. This patch provides an alternative implementation of recirc action without using recursion. A per CPU fixed sized, 'deferred action FIFO', is used to store either recirc or sample actions en

Re: [ovs-dev] [PATCH 2/4] ovs-numa: Relax the ovs_numa_*() input argument check.

2014-09-05 Thread Alex Wang
Thx for pointing it out, I'll make a note in the comment. On Fri, Sep 5, 2014 at 2:19 PM, Pravin Shelar wrote: > On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > > Many of the ovs_numa_*() functions abort the program when the > > input cpu socket or core id is invalid. This commit relaxes >

Re: [ovs-dev] [PATCH v4 4/4] datapath: Allow masks for set actions.

2014-09-05 Thread Jarno Rajahalme
On Sep 5, 2014, at 2:12 PM, Jarno Rajahalme wrote: >>> >>> case OVS_KEY_ATTR_IPV4: >> [...] >>> - if (ipv4_key->ipv4_frag != flow_key->ip.frag) >>> - return -EINVAL; >>> + /* Non-writeable fields. */ >>> + if

[ovs-dev] [ovs-dev 2/3] ovs-dev.py: Support additional optimization flags.

2014-09-05 Thread Ethan Jackson
They may or may not make a difference, but there's no reason not to support passing them. Signed-off-by: Ethan Jackson --- utilities/ovs-dev.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index e454e18..3686391 10075

[ovs-dev] [ovs-dev 3/3] ovs-dev.py: Support running the clang binaries.

2014-09-05 Thread Ethan Jackson
They have slightly different support characteristics, so it's nice to easily switch between them for testing. Signed-off-by: Ethan Jackson --- utilities/ovs-dev.py | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py

[ovs-dev] [ovs-dev 1/3] ovs-dev.py: Add aggressive compile optimization options.

2014-09-05 Thread Ethan Jackson
These options don't make sense when building portable code, but when using the dev script, OVS is built on the same system it's run on. They make a small difference in the OVS DPDK testing, hence their addition. Signed-off-by: Ethan Jackson --- utilities/ovs-dev.py | 6 +++--- 1 file changed, 3

Re: [ovs-dev] [PATCH 3/4] ovs-numa: Add function for getting numa node id from core id.

2014-09-05 Thread Pravin Shelar
On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > Signed-off-by: Alex Wang LGTM Acked-by: Pravin B Shelar ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 4/4] ovs-numa: Add module description.

2014-09-05 Thread Pravin Shelar
On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > Add a short description of the module and its assumption. > > Signed-off-by: Alex Wang LGTM Acked-by: Pravin B Shelar ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/

Re: [ovs-dev] [PATCH 2/4] ovs-numa: Relax the ovs_numa_*() input argument check.

2014-09-05 Thread Pravin Shelar
On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > Many of the ovs_numa_*() functions abort the program when the > input cpu socket or core id is invalid. This commit relaxes > the input check and makes these functions return OVS_*_UNSPEC > when the check fails. > > Signed-off-by: Alex Wang Due

Re: [ovs-dev] [PATCH 1/4] ovs-numa: Replace name 'cpu_socket' with 'numa_node'.

2014-09-05 Thread Pravin Shelar
On Thu, Sep 4, 2014 at 3:17 PM, Alex Wang wrote: > 'numa' and 'socket' are currently used interchangeably in ovs-numa. > But they are not always equivalent as some platform can have multiple > sockets on a numa node. To avoid confusion, this commit renames all > the 'cpu_socket' to 'numa_node'. >

Re: [ovs-dev] [PATCH v4 4/4] datapath: Allow masks for set actions.

2014-09-05 Thread Jarno Rajahalme
On Aug 11, 2014, at 5:39 PM, Jesse Gross wrote: > On Mon, Aug 11, 2014 at 9:15 AM, Jarno Rajahalme > wrote: >> Masked set action allows more megaflow wildcarding. Masked set action >> is now supported for all writeable key types, except for the tunnel >> key. >> >> The set tunnel action is a

Re: [ovs-dev] [RFC] Proposal for enhanced select groups

2014-09-05 Thread Jesse Gross
On Thu, Sep 4, 2014 at 12:28 AM, Simon Horman wrote: > On Tue, Sep 02, 2014 at 07:20:30PM -0700, Pravin Shelar wrote: >> On Tue, Sep 2, 2014 at 6:55 PM, Jesse Gross wrote: >> > On Mon, Sep 1, 2014 at 1:10 AM, Simon Horman >> > wrote: >> >> On Thu, Aug 28, 2014 at 10:12:49AM +0900, Simon Horman

Re: [ovs-dev] [PATCH v3] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Eitan Eliahu
Acked-by: Alin Gabriel Serdean Acked-by: Ankur Sharma -Original Message- From: Eitan Eliahu [mailto:elia...@vmware.com] Sent: Friday, September 05, 2014 7:39 PM To: dev@openvswitch.org Cc: Eitan Eliahu Subject: [PATCH v3] Windows NetLink Socket - Support for asynchronous event notifica

[ovs-dev] [PATCH v3] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Eitan Eliahu
We keep an outstanding, out of band, I/O request in the driver at all time. Once an event generated the driver queues the event message, completes the pending I/O and unblocks the calling thread through setting the event in the overlapped structure n the NL socket. The thread will read all all eve

Re: [ovs-dev] [PATCH v2] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Eitan Eliahu
Hi Alin, I'm sorry I don't follow you on this one. Which style issue you refer to? I would like to fix it before checking in. Thanks, Eitan -Original Message- From: Alin Serdean [mailto:aserd...@cloudbasesolutions.com] Sent: Friday, September 05, 2014 11:03 AM To: Eitan Eliahu; dev@ope

Re: [ovs-dev] [PATCH v2] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Alin Serdean
Hi Eitan Beside some style issue in: +#ifdef _WIN32 +/* Pend an I/O request in the driver. The driver completes the I/O whenever +* an event or a packet is ready to be read. Once the I/O is completed +* the overlapped structure event associated with the pending I/O will be set +*/ Acked-by: Alin

Re: [ovs-dev] [PATCH v4 3/4] lib/odp: Use masked set actions.

2014-09-05 Thread Jarno Rajahalme
On Aug 12, 2014, at 3:45 PM, Ben Pfaff wrote: > On Mon, Aug 11, 2014 at 09:15:00AM -0700, Jarno Rajahalme wrote: >> Signed-off-by: Jarno Rajahalme > > The amount of redundancy in the code at this point is starting to give > me a headache. How about a pattern like this (provided as an > increm

Re: [ovs-dev] [PATCH v2] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Ankur Sharma
Hi Alin, Thanks for review. Acked-by: Ankur Sharma Regards, Ankur From: dev on behalf of Eitan Eliahu Sent: Friday, September 5, 2014 4:48 PM To: dev@openvswitch.org Subject: [ovs-dev] [PATCH v2] Windows NetLink Socket - Support for asynchronous

[ovs-dev] [PATCH v2] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Eitan Eliahu
We keep an outstanding, out of band, I/O request in the driver at all time. Once an event generated the driver queues the event message, completes the pending I/O and unblocks the calling thread through setting the event in the overlapped structure n the NL socket. The thread will read all all eve

Re: [ovs-dev] [PATCH v1] Windows NetLink Socket - Support for asynchronous event notification

2014-09-05 Thread Eitan Eliahu
Hi Alin, thanks a lot for the review. On the device name for the create file system call we need to use the following definition from the interface header file: #define OVS_DEVICE_NAME_USER TEXT(".\\OpenvSwitchDevice") This is its purpose. There is no GetLastError() for Linux. Good catch! I

Re: [ovs-dev] [patch net-next RFC 10/12] openvswitch: add support for datapath hardware offload

2014-09-05 Thread Jamal Hadi Salim
On 09/05/14 03:02, Scott Feldman wrote: On Thu, Sep 04, 2014 at 09:30:45AM -0700, Scott Feldman wrote: Correct, for the particular switch implementation we’re working with. Do you have L2/3 working with this interface on said switch? I am interested. cheers, jamal ___

Re: [ovs-dev] [patch net-next RFC 10/12] openvswitch: add support for datapath hardware offload

2014-09-05 Thread Scott Feldman
On Sep 4, 2014, at 9:08 PM, Simon Horman wrote: > On Thu, Sep 04, 2014 at 09:30:45AM -0700, Scott Feldman wrote: >> >> On Sep 4, 2014, at 2:04 AM, Simon Horman wrote: >> >>> >>> >>> [snip] >>> >>> In relation to ports and datapaths it seems to me that the API that >>> has been developed ac