Re: [ovs-dev] [PATCH/RFC] datapath: offload hooks

2014-10-07 Thread Stephen Hemminger
On Wed, 8 Oct 2014 09:40:51 +0900 Simon Horman wrote: > + > +struct ovs_offload_ops { > + /* Flow offload functions */ > + /* Called when a flow entry is added to the flow table */ > + void (*flow_new)(struct sw_flow *); > + /* Called when a flow entry is modified */ > + voi

Re: [ovs-dev] [PATCH/RFC] datapath: offload hooks

2014-10-07 Thread Stephen Hemminger
On Wed, 8 Oct 2014 09:40:51 +0900 Simon Horman wrote: > +struct ovs_offload_ops { > + /* Flow offload functions */ > + /* Called when a flow entry is added to the flow table */ > + void (*flow_new)(struct sw_flow *); > + /* Called when a flow entry is modified */ > + void (*

[ovs-dev] [PATCH] datapath-windows: add support for OVS_DP_CMD_NEW netlink command

2014-10-07 Thread Nithin Raju
In this change, we add support for the 'OVS_DP_CMD_NEW' netlink command in the kernel. We don't really support creation of a new datapath. If the name of the userspace is the same as the single datapath we support, we return EEXIST. This code is required to bootstrap ovs-vswitchd which makes the f

Re: [ovs-dev] [PATCH v2] lib/netlink-socket.c: always pass the output buffer in a transaction

2014-10-07 Thread Eitan Eliahu
Hi Nithin, Thanks for addressing the transactional error issue. Are we sure we want to make another copy for the Reply just for getting the transactional error on a different buffer? Can we use the stack buffer only if the caller does not provide enough space for the transactional error message?

Re: [ovs-dev] [PATCH] lib/netlink.c: return the min/max payload size for NL_A_BE* types explicitly

2014-10-07 Thread Wang Sheng-Hui
On 2014年10月07日 23:28, Ben Pfaff wrote: > On Tue, Oct 07, 2014 at 08:36:44PM +0800, Wang Sheng-Hui wrote: >> In min_attr_len and max_attr_len, it assumes the value equality between >> NL_A_U* and NL_A_BE* types. Here return the attr len for NL_A_BE* types >> explicitly. >> >> Signed-off-by: Wang S

Re: [ovs-dev] [PATCH] lib/netdev-windows.c: Make the init function dummy

2014-10-07 Thread Nithin Raju
On Oct 7, 2014, at 4:59 PM, Gurucharan Shetty wrote: > On Tue, Oct 7, 2014 at 4:35 PM, Nithin Raju wrote: >> The init function must be dummy for the unit tests to pass. The >> unit tests don't require the kernel datpaath to be loaded, and >> without the kernel datapath, any calls netlink calls

[ovs-dev] [PATCH v2] lib/netdev-windows.c: nuke the init function

2014-10-07 Thread Nithin Raju
The init function is not allowed to call into the kernel datapath while running unit tests since the kernel datapath is not loaded. Instead of making the function dummy, it is better to not have it at all. Signed-off-by: Nithin Raju Reported-by: Gurucharan Shetty --- lib/netdev-windows.c | 14

Re: [ovs-dev] [PATCH] vswitch.ovsschema: Correct schema version number.

2014-10-07 Thread Ben Pfaff
No problem. Applied. On Tue, Oct 07, 2014 at 04:58:42PM -0700, Andy Zhou wrote: > LGTM. Sorry for using the wrong version. > > Acked-by: Andy Zhou > > On Tue, Oct 7, 2014 at 4:54 PM, Ben Pfaff wrote: > > Commit 3e5aeeb581faf7 (bridge: Keep bond active slave selection across OVS > > restart)

Re: [ovs-dev] [PATCH] lib/netdev-windows.c: Make the init function dummy

2014-10-07 Thread Gurucharan Shetty
On Tue, Oct 7, 2014 at 4:35 PM, Nithin Raju wrote: > The init function must be dummy for the unit tests to pass. The > unit tests don't require the kernel datpaath to be loaded, and > without the kernel datapath, any calls netlink calls will fail. > > Signed-off-by: Nithin Raju > Reported-by: Gur

Re: [ovs-dev] [PATCH] vswitch.ovsschema: Correct schema version number.

2014-10-07 Thread Andy Zhou
LGTM. Sorry for using the wrong version. Acked-by: Andy Zhou On Tue, Oct 7, 2014 at 4:54 PM, Ben Pfaff wrote: > Commit 3e5aeeb581faf7 (bridge: Keep bond active slave selection across OVS > restart) updated the OVS schema number from 7.9.0 to 8.0.0. However, > the major version number should o

Re: [ovs-dev] [PATCH v2 06/12] ofp-actions: Support OF1.5 (draft) masked Set-Field, merge with reg_load.

2014-10-07 Thread Ben Pfaff
On Mon, Oct 06, 2014 at 12:41:03PM +0900, YAMAMOTO Takashi wrote: > > OpenFlow 1.5 (draft) extends the OFPAT_SET_FIELD action originally > > introduced in OpenFlow 1.2 so that it can set not just entire fields but > > any subset of bits within a field as well. This commit adds support for > > that

[ovs-dev] [PATCH] vswitch.ovsschema: Correct schema version number.

2014-10-07 Thread Ben Pfaff
Commit 3e5aeeb581faf7 (bridge: Keep bond active slave selection across OVS restart) updated the OVS schema number from 7.9.0 to 8.0.0. However, the major version number should only be incremented for incompatible schema changes, ones that are likely to break software that interacts with the schema

Re: [ovs-dev] [PATCH] ovs-ofctl: Clarify the tp_src, tp_dst.

2014-10-07 Thread Alex Wang
On Tue, Oct 7, 2014 at 1:30 PM, Ben Pfaff wrote: > [adding the list back] > > I think that that is somewhat separate from the documentation. I > think that the documentation should probably focus on the > protocol-specific field names these days, and document tp_src and > tp_dst as obsolete. I

[ovs-dev] [PATCH] lib/netdev-windows.c: Make the init function dummy

2014-10-07 Thread Nithin Raju
The init function must be dummy for the unit tests to pass. The unit tests don't require the kernel datpaath to be loaded, and without the kernel datapath, any calls netlink calls will fail. Signed-off-by: Nithin Raju Reported-by: Gurucharan Shetty --- lib/netdev-windows.c | 13 -

Re: [ovs-dev] [PATCH v2 06/12] ofp-actions: Support OF1.5 (draft) masked Set-Field, merge with reg_load.

2014-10-07 Thread Ben Pfaff
On Mon, Oct 06, 2014 at 11:26:09AM -0700, Jarno Rajahalme wrote: > > On Sep 30, 2014, at 5:47 PM, Ben Pfaff wrote: > > > OpenFlow 1.5 (draft) extends the OFPAT_SET_FIELD action originally > > introduced in OpenFlow 1.2 so that it can set not just entire fields but > > any subset of bits within a

Re: [ovs-dev] [PATCH] ovs-ofctl: Document protocol-specific forms as preferred over tp_src/tp_dst.

2014-10-07 Thread Alex Wang
Thx Ben for clearing this up, Please see my comments below: > +.IP \fBtcp_src=\fIport\fR > +.IQ \fBtcp_dst=\fIport\fR > +.IQ \fBudp_src=\fIport\fR > +.IQ \fBudp_dst=\fIport\fR > +.IQ \fBsctp_src=\fIport\fR > +.IQ \fBsctp_dst=\fIport\fR > +Matches a TCP, UDP, or SCTP source or destination port \f

Re: [ovs-dev] [PATCH 2/3] ofproto-dpif: Check frags only once.

2014-10-07 Thread Jarno Rajahalme
On Oct 6, 2014, at 3:17 PM, Ben Pfaff wrote: > On Thu, Oct 02, 2014 at 09:20:32AM -0700, Jarno Rajahalme wrote: >> >> On Sep 26, 2014, at 11:33 AM, Ben Pfaff wrote: >> >>> On Wed, Sep 24, 2014 at 11:24:01AM -0700, Jarno Rajahalme wrote: Earlier I have seen the frags checking suspiciously

Re: [ovs-dev] [PATCH v2 05/12] ofp-actions: Better support OXM in Copy-Field action.

2014-10-07 Thread Ben Pfaff
On Mon, Oct 06, 2014 at 12:00:30PM +0900, YAMAMOTO Takashi wrote: > > The OpenFlow 1.5 (draft) Copy-Field action has two OXM headers, one after > > the other. Until now, Open vSwitch has implemented these as a pair of > > ovs_be32 members, which meant that only 32-bit OXM could be supported. This

Re: [ovs-dev] [PATCH 12/14] datapath-windows: Add netlink command vport delete

2014-10-07 Thread Alin Serdean
Good catch Nithin thank you for folding it up! Thanks, Alin. -Mesaj original- De la: Nithin Raju [mailto:nit...@vmware.com] Trimis: Wednesday, October 8, 2014 12:29 AM Către: Samuel Ghinet; dev@openvswitch.org Cc: Alin Serdean; Eitan Eliahu; Ankur Sharma Subiect: RE: [PATCH 12/14] datapa

Re: [ovs-dev] [PATCH v2 01/12] meta-flow: Autogenerate mf_field data structures.

2014-10-07 Thread Ben Pfaff
On Mon, Oct 06, 2014 at 11:53:02AM +0900, YAMAMOTO Takashi wrote: > > This is a first step toward improving the abstraction of OXM and NXM in the > > tree. As an immediate improvement, this commit removes all of the > > definitions of the OXM and NXM constants from the top-level header files, > >

Re: [ovs-dev] [PATCH v2 01/12] meta-flow: Autogenerate mf_field data structures.

2014-10-07 Thread Ben Pfaff
On Mon, Oct 06, 2014 at 10:48:15AM -0700, Jarno Rajahalme wrote: > > On Sep 30, 2014, at 5:47 PM, Ben Pfaff wrote: > > > This is a first step toward improving the abstraction of OXM and NXM in the > > tree. As an immediate improvement, this commit removes all of the > > definitions of the OXM a

[ovs-dev] [PATCH v2] lib/netlink-socket.c: always pass the output buffer in a transaction

2014-10-07 Thread Nithin Raju
We need to pass down the output buffer so that the kernel can return transaction status - error or otherwise. Also, we were processing the output buffer only when when 'txn->reply != NULL' ie when the caller specified an ofpbuf for the reply. In this patch, the code has been updated to process the

Re: [ovs-dev] [PATCH 4/7] lib/flow: Add miniflow_extract_from_flow

2014-10-07 Thread Ben Pfaff
On Tue, Oct 07, 2014 at 02:51:59PM -0700, Jarno Rajahalme wrote: > > On Oct 6, 2014, at 3:01 PM, Ben Pfaff wrote: > > > On Wed, Oct 01, 2014 at 04:02:34PM -0700, Jarno Rajahalme wrote: > >> miniflow_extract_from_flow() is faster than miniflow_init(), since it > >> does not scan the fields not si

Re: [ovs-dev] [PATCH 4/7] lib/flow: Add miniflow_extract_from_flow

2014-10-07 Thread Jarno Rajahalme
On Oct 6, 2014, at 3:01 PM, Ben Pfaff wrote: > On Wed, Oct 01, 2014 at 04:02:34PM -0700, Jarno Rajahalme wrote: >> miniflow_extract_from_flow() is faster than miniflow_init(), since it >> does not scan the fields not significant for the packet type. More >> importantly, it produces the same layo

Re: [ovs-dev] [PATCH 3/7] lib/flow: Do not try to compress IPv6 flow label in miniflow_extract().

2014-10-07 Thread Jarno Rajahalme
On Oct 6, 2014, at 2:57 PM, Ben Pfaff wrote: > On Wed, Oct 01, 2014 at 04:02:33PM -0700, Jarno Rajahalme wrote: >> Working with netdev_flow_keys is simpler when the key has the fields >> present even when they are all-zeroes. >> >> Signed-off-by: Jarno Rajahalme > > I don't understand the com

Re: [ovs-dev] [PATCH v2] lib/bitmap: Faster bitmap functions.

2014-10-07 Thread Jarno Rajahalme
Pushed to master with Co-authored-by relationship, Jarno On Oct 6, 2014, at 3:54 PM, Ben Pfaff wrote: > On Fri, Oct 03, 2014 at 01:22:07PM -0700, Jarno Rajahalme wrote: >> Replace bitwise loops with a single operation, inline all bitmap >> functions. Inlining allows the compiler to remove un

[ovs-dev] [PATCH v2] lib/dpif-netdev: Integrate megaflow classifier.

2014-10-07 Thread Jarno Rajahalme
flow inserts and removals are simplified: - No need for classifier internal mutex, as dpif-netdev already has a 'flow_mutex'. - Number of memory allocations/frees can be halved. Lookup code path is a bit more effcient as well, as we can rely on netdev_flow_key always having inline data. This w

Re: [ovs-dev] [PATCH 12/14] datapath-windows: Add netlink command vport delete

2014-10-07 Thread Nithin Raju
> +if (vport->hvDeleted || OvsIsTunnelVportType(vport->ovsType)) { > +/* > + * The associated hyper-v switch port is not in created state, or, > + * there is no hyper-v switch port counterpart (for logical ports). > + * This means that this datapath port is not m

Re: [ovs-dev] [PATCH] stream-tcp: Call setsockopt TCP_NODELAY after TCP is connected for Windows.

2014-10-07 Thread Ben Pfaff
On Thu, Oct 02, 2014 at 08:16:56AM -0700, Gurucharan Shetty wrote: > On Windows platform, TCP_NODELAY can only be set when TCP is established. > The current code does not create any problems while running unit tests > (because connections get established immediately) but is observed while > connect

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix DPDK rings broken by multi queue

2014-10-07 Thread Pravin Shelar
On Wed, Oct 1, 2014 at 5:36 AM, David Verbeiren wrote: > DPDK rings don't need one TX queue per PMD thread and don't support multiple > queues (set_multiq function is undefined). To fix operation with DPDK rings, > this patch ignores EOPNOTSUPP error on netdev_set_multiq() and ignores, for > DPDK

[ovs-dev] Bug#763428: openvswitch-switch: openvswitch doesn't work anymore since kernel 3.16 update

2014-10-07 Thread Ben Pfaff
On Tue, Sep 30, 2014 at 10:20:31AM +0200, Mehdi Abaakouk wrote: > Package: openvswitch-switch > Version: 2.3.0+git20140819-2 > Severity: important > Since the update of kernel in jessie to 3.16, my openvswitch setups > won't work anymore, I have to keep the kernel 3.14 to have > openvswitch workin

Re: [ovs-dev] [PATCHv6 13/14] dpif: Minimize memory copy for revalidation.

2014-10-07 Thread Ben Pfaff
On Wed, Oct 01, 2014 at 08:44:58PM +1300, Joe Stringer wrote: > On 30 September 2014 10:24, Ben Pfaff wrote: > > > I suspect that check_recirc() and check_uid() should pass > > DPIF_FP_MODIFY as well as DPIF_FP_CREATE, just in case a previous run > > of OVS was killed at just the right time to le

Re: [ovs-dev] [PATCH] ovs-vsctl: Allow modifying "immutable" columns if we just created the row.

2014-10-07 Thread Ben Pfaff
On Fri, Sep 26, 2014 at 04:01:13PM -0700, Ben Pfaff wrote: > OVSDB has the concept of "immutable" columns, which are columns whose > values are fixed once a row is inserted. Until now, ovs-vsctl has not > allowed these columns to be modified at all. However, this is a little too > strict, because

Re: [ovs-dev] [PATCH] ovs-ofctl: Clarify the tp_src, tp_dst.

2014-10-07 Thread Ben Pfaff
[adding the list back] I think that that is somewhat separate from the documentation. I think that the documentation should probably focus on the protocol-specific field names these days, and document tp_src and tp_dst as obsolete. I sent out a patch: http://openvswitch.org/pipermail/dev

[ovs-dev] [PATCH] ovs-ofctl: Document protocol-specific forms as preferred over tp_src/tp_dst.

2014-10-07 Thread Ben Pfaff
The generic form doesn't work in "learn" actions. Reported-by: Alex Wang Signed-off-by: Ben Pfaff --- utilities/ovs-ofctl.8.in | 61 +++--- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.

Re: [ovs-dev] [PATCH 6/7] lib/flow: Reduce calls to count_1bits().

2014-10-07 Thread Ben Pfaff
Thanks. I applied this change. On Mon, Oct 06, 2014 at 04:01:57PM -0700, Jarno Rajahalme wrote: > Ben, > > This is much cleaner, thanks! > > Acked-by: Jarno Rajahalme > > > On Oct 6, 2014, at 2:17 PM, Ben Pfaff wrote: > > > On Wed, Oct 01, 2014 at 04:02:36PM -0700, Jarno Rajahalme wrote: >

Re: [ovs-dev] [PATCH] BFD: Decreasing minimal transmit and receive interval

2014-10-07 Thread Ben Pfaff
On Tue, Oct 07, 2014 at 03:04:13PM +, Niels van Adrichem wrote: > I found the BFD transmit interval was lowerbounded by the default value > without warning, although documentation does not consider a lowerbound. > Testing has been performed with transmit and receive intervals as low as 1 > ms

Re: [ovs-dev] linux-next: Tree for Oct 7 (openvswitch)

2014-10-07 Thread Andy Zhou
This issue should have been fixed with commit 7c5df8fa1921450d2210db9928f43cf4f414982c Fix a openvswitch compilation error when CONFIG_INET is not set: = In file included from include/net/geneve.h:4:0, from

Re: [ovs-dev] [PATCH] dpif-netdev: reduce netdev_flow_key size

2014-10-07 Thread Jarno Rajahalme
Oops, seems like a long weekend :-) Pushed to master, Jarno On Sep 19, 2014, at 5:04 PM, Jarno Rajahalme wrote: > Thanks Daniele! > > Acked-by: Jarno Rajahalme > > I’ll push this on Monday, have a nice weekend :-) > > Jarno > > On Sep 19, 2014, at 4:30 PM, Daniele Di Proietto > wrote

Re: [ovs-dev] linux-next: Tree for Oct 7 (openvswitch)

2014-10-07 Thread Randy Dunlap
On 10/07/14 01:44, Stephen Rothwell wrote: > Hi all, > > Changes since 20141003: > on i386 or x86_64: In file included from ../include/net/geneve.h:4:0, from ../net/openvswitch/flow_netlink.c:45: ../include/net/udp_tunnel.h: In function 'udp_tunnel_handle_offloads': ../include/

Re: [ovs-dev] [PATCH] lib/netlink.c: return the min/max payload size for NL_A_BE* types explicitly

2014-10-07 Thread Ben Pfaff
On Tue, Oct 07, 2014 at 08:36:44PM +0800, Wang Sheng-Hui wrote: > In min_attr_len and max_attr_len, it assumes the value equality between > NL_A_U* and NL_A_BE* types. Here return the attr len for NL_A_BE* types > explicitly. > > Signed-off-by: Wang Sheng-Hui Please do a test build before you po

[ovs-dev] [PATCH] BFD: Decreasing minimal transmit and receive interval

2014-10-07 Thread Niels van Adrichem
I found the BFD transmit interval was lowerbounded by the default value without warning, although documentation does not consider a lowerbound. Testing has been performed with transmit and receive intervals as low as 1 ms, and although CPU overhead was effected (especially with multiple BFD sessi

[ovs-dev] [PATCH] lib/netlink.c: return the min/max payload size for NL_A_BE* types explicitly

2014-10-07 Thread Wang Sheng-Hui
In min_attr_len and max_attr_len, it assumes the value equality between NL_A_U* and NL_A_BE* types. Here return the attr len for NL_A_BE* types explicitly. Signed-off-by: Wang Sheng-Hui --- lib/netlink.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/