Re: [ovs-dev] [PATCH v1 1/5] datapath-windows: Netlink additional APIs.

2014-10-01 Thread Nithin Raju
On Sep 29, 2014, at 3:34 PM, Ankur Sharma wrote: > +VOID > +NlMsgAlignSize(const PNL_MSG_HDR nlh) > +{ > +nlh->nlmsgLen = NLMSG_ALIGN(nlh->nlmsgLen); One question I have here is what if nlmsgLen ends up being more than the nlBufLen after adjusting for alignment? Thanks, -- Nithin ___

[ovs-dev] [PATCH] bfd.at: Fix intermittent failure of test - flap_count.

2014-10-01 Thread Alex Wang
ovs-vsctl commands like 'ovs-vsctl list Interface p1' use the 'monitor' RPC method, which causes ovsdb sending updates to the command session when changes are committed to the monitored table. Since ovs-vsctl commands are short-lived, there is chance that ovs-vsctl terminates the connection to ovs

Re: [ovs-dev] [PATCH v1 3/5] datapath-windows: Flow Dump handler

2014-10-01 Thread Nithin Raju
On Sep 29, 2014, at 3:34 PM, Ankur Sharma wrote: > In this patch we have added basic changes for > handler registeration for FLOW_GET command. > > Signed-off-by: Ankur Sharma LG. Acked-by: Nithin Raju ___ dev mailing list dev@openvswitch.org http

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

2014-10-01 Thread Alex Wang
OVS implements specific keywords like udp_src/udp_dst to match on L4 header port in OpenFlow flows. However, these keywords are not documented in the ovs-ofctl manpage. This commit fixes it. VMware-BZ: #1333815 Signed-off-by: Alex Wang --- utilities/ovs-ofctl.8.in | 14 ++ 1 fil

Re: [ovs-dev] [PATCH v1 2/5] datapath-windows: Added the API for getting unused space in nlbuf.

2014-10-01 Thread Nithin Raju
> diff --git a/datapath-windows/ovsext/Netlink/NetlinkBuf.c > b/datapath-windows/ovsext/Netlink/NetlinkBuf.c > index 918bddd..bc079ef 100644 > --- a/datapath-windows/ovsext/Netlink/NetlinkBuf.c > +++ b/datapath-windows/ovsext/Netlink/NetlinkBuf.c > @@ -291,7 +291,7 @@ NlBufAt(PNL_BUFFER nlBuf, UIN

Re: [ovs-dev] [PATCH v1 1/5] datapath-windows: Netlink additional APIs.

2014-10-01 Thread Nithin Raju
hi Ankur, Thanks for making the change. Looks good mostly, I had minor comments. I'll ack the v2. On Sep 29, 2014, at 3:34 PM, Ankur Sharma wrote: > In this patch we have added following new APIs. > > NlMsgAlignSize => Aligns the size of netlink message. > NlMsgSetSize => Sets the value of nlm

Re: [ovs-dev] [PATCH] RFC: Add support for connection tracking.

2014-10-01 Thread Justin Pettit
On Wed, Sep 17, 2014 at 4:12 PM, Madhu Challa wrote: > > I got a chance to try out your code with the example flows and measure raw > packet throughput with and without connection tracking. The code works and > the performance numbers look pretty good. > Sorry that I missed this message earlier.

Re: [ovs-dev] [PATCH 1/5] datapath: Use central function to free sw_flow_actions

2014-10-01 Thread Justin Pettit
Thomas, is there a reason not to consider this patch as-is right now? It seems like a straight-forward code cleanup with no direct association with the later patches. --Justin On Fri, Sep 26, 2014 at 3:00 PM, Thomas Graf wrote: > Signed-off-by: Thomas Graf > --- > datapath/datapath.c |

Re: [ovs-dev] [PATCH 1/3] lib/ovs-atomic-i586: Faster 64-bit atomics on 32-bit builds with SSE.

2014-10-01 Thread Jarno Rajahalme
On Sep 26, 2014, at 11:20 AM, Ben Pfaff wrote: > On Wed, Sep 24, 2014 at 11:24:00AM -0700, Jarno Rajahalme wrote: >> Aligned 64-bit memory accesses in i586 are atomic. By using an SSE >> register we can make such memory accesses in one instruction without >> bus-locking. Need to compile with -

[ovs-dev] [PATCH 5/7] lib/cmap: Return number of nodes from functions modifying the cmap.

2014-10-01 Thread Jarno Rajahalme
We already update the count field as the last step of these functions, so returning the current count is very cheap. Callers that care about the count become a bit more efficient, as they avoid extra non-inlineable function call. Signed-off-by: Jarno Rajahalme --- lib/cmap.c | 25

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

2014-10-01 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. Signed-o

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

2014-10-01 Thread Jarno Rajahalme
Depending on the CPU, count_1bits() may be more or less expensive, so it is better to avoid unnecessary calls to it. When the map has consecutive 1-bits, those can be cleared without counting. Signed-off-by: Jarno Rajahalme --- lib/flow.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(

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

2014-10-01 Thread Jarno Rajahalme
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 layout as miniflow_extract, which does not try to compress zero-valued packet header fields. Signed-off-by: Jarno Rajahalme --

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

2014-10-01 Thread Jarno Rajahalme
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 --- lib/flow.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib/flow.c index a42895e..14a3350 100644 --- a/lib/flow.c

[ovs-dev] [PATCH 2/7] lib: Fix MPLS masking.

2014-10-01 Thread Jarno Rajahalme
Previously we masked labels not present in the incoming packet. Signed-off-by: Jarno Rajahalme --- lib/flow.c | 36 ++-- lib/meta-flow.c |4 ++-- lib/odp-util.c | 14 -- ofproto/ofproto-dpif-xlate.c

Re: [ovs-dev] [PATCH] cmap: ovsrcu postpone the cmap destroy.

2014-10-01 Thread Alex Wang
Thx for the reminding, I checked the branch-2.3 code, we use rwlock to protect the classifier add/remove/lookup on ofproto level and dpif-netdev level. So, I think we are fine there, Alex Wang, On Wed, Oct 1, 2014 at 1:10 PM, Ben Pfaff wrote: > Does it need to be backported? > > On Wed, Oct

Re: [ovs-dev] [datapath minor fixes 2/3] datapath: avoid double free routing entry in vxlan_port xmit

2014-10-01 Thread Andy Zhou
On Wed, Oct 1, 2014 at 1:38 PM, Jesse Gross wrote: > I agree that the memory handling is too fragile here. Maybe we should > just make people attach the dst before calling into tunneling routines > though. It might be easier considering the multiple entry points (i.e. > GRE calls iptunnel_xmit() d

Re: [ovs-dev] [datapath minor fixes 1/3] datapath: avoid hard code OVS_VPORT_TYPE_GENEVE

2014-10-01 Thread Pravin Shelar
On Wed, Oct 1, 2014 at 1:02 AM, Andy Zhou wrote: > OVS_VPORT_TYPE_GENEVE is currently hard coded to 6. This is not > necessary since slot 5 has not been taken yet. Drop the hard > coded value to before upstreaming GENEVE support to Linux kernel. > > Signed-off-by: Andy Zhou looks good. Acked-by:

Re: [ovs-dev] [datapath minor fixes 3/3] datapath: serializing GENEVE options based on flow key's tun_flags

2014-10-01 Thread Andy Zhou
Ah, I missed the don't card case. Thanks for pointing it out. I will drop the patch. On Wed, Oct 1, 2014 at 1:48 PM, Jesse Gross wrote: > On Wed, Oct 1, 2014 at 1:02 AM, Andy Zhou wrote: >> TUNNEL_OPTIONS_PRESENT should always be checked against the tun_flgs >> bits in a flow key, for both flow

Re: [ovs-dev] [datapath minor fixes 3/3] datapath: serializing GENEVE options based on flow key's tun_flags

2014-10-01 Thread Jesse Gross
On Wed, Oct 1, 2014 at 1:02 AM, Andy Zhou wrote: > TUNNEL_OPTIONS_PRESENT should always be checked against the tun_flgs > bits in a flow key, for both flow and mask serialization. > > Signed-off-by: Andy Zhou I'm not sure that this is the right thing to do. In the case where you want to match on

Re: [ovs-dev] [datapath minor fixes 2/3] datapath: avoid double free routing entry in vxlan_port xmit

2014-10-01 Thread Jesse Gross
I agree that the memory handling is too fragile here. Maybe we should just make people attach the dst before calling into tunneling routines though. It might be easier considering the multiple entry points (i.e. GRE calls iptunnel_xmit() directly). Several callers are definitely expecting iptunnel

Re: [ovs-dev] [PATCH] datapath-windows: Incorrect assumption of the IRQL

2014-10-01 Thread Nithin Raju
> > -ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); > > OvsAcquireDatapathRead(datapath, &dpLockState, dispatch); > > We can pass NDIS_RWL_AT_DISPATCH_LEVEL instead of 'dispatch', and let the > ASSERT be. > > SV: Here, I will leave the use of the 'dispatch' variable, due to

Re: [ovs-dev] [datapath minor fixes 2/3] datapath: avoid double free routing entry in vxlan_port xmit

2014-10-01 Thread Andy Zhou
It turns out rout entry will not be attached to skb until iptunnel_xmit, which does not return negative value. So there is no bug here. I will drop this patch, and modify the upstream vport-geneve.c accordingly. It is pretty subtle that the correctness of free depends on the implementation detail

Re: [ovs-dev] [PATCH] cmap: ovsrcu postpone the cmap destroy.

2014-10-01 Thread Ben Pfaff
Does it need to be backported? On Wed, Oct 01, 2014 at 01:03:11PM -0700, Alex Wang wrote: > Thx for the review, applied to master,~ > > On Wed, Oct 1, 2014 at 12:52 PM, Ben Pfaff wrote: > > > On Wed, Oct 01, 2014 at 12:03:30PM -0700, Alex Wang wrote: > > > Currently, the cmap_destroy() directly

Re: [ovs-dev] [PATCH] cmap: ovsrcu postpone the cmap destroy.

2014-10-01 Thread Alex Wang
Thx for the review, applied to master,~ On Wed, Oct 1, 2014 at 12:52 PM, Ben Pfaff wrote: > On Wed, Oct 01, 2014 at 12:03:30PM -0700, Alex Wang wrote: > > Currently, the cmap_destroy() directly frees the cmap memory. > > Some callers of cmap_destroy() (e.g. destroy_subtable()) still > > allows o

Re: [ovs-dev] [PATCH] cmap: ovsrcu postpone the cmap destroy.

2014-10-01 Thread Ben Pfaff
On Wed, Oct 01, 2014 at 12:03:30PM -0700, Alex Wang wrote: > Currently, the cmap_destroy() directly frees the cmap memory. > Some callers of cmap_destroy() (e.g. destroy_subtable()) still > allows other threads (e.g. pmd threads) accessing the cmap at > the same time (e.g. via classifier_lookup_min

[ovs-dev] [PATCH] stream-tcp: Change the connection name for pwindows.

2014-10-01 Thread Gurucharan Shetty
As of now, when someone passes a punix:foo/bar as a connection type in Windows, we create a TCP server using 127.0.0.1 and save the kernel assigned port number in the file foo/bar. The connection name as obtained through pstream_get_name() would be ptcp:127.0.0.1:$PORT. This was okay if pstream_get

Re: [ovs-dev] [PATCH] ofproto: Do not postpone closing the mgmt socket

2014-10-01 Thread Ben Pfaff
On Wed, Oct 01, 2014 at 11:54:09AM -0700, Daniele Di Proietto wrote: > When the bridge datapath_type is changed, ofproto is destroyed and immediately > recreated. This involves closing and reopening the mgmt socket. If the > destruction of the 'connmgr' is postponed, a race condition might happen,

Re: [ovs-dev] [PATCH] datapath-windows: Incorrect assumption of the IRQL

2014-10-01 Thread Sorin Vinturis
Hi Nithin, Thanks for your review. Please see my comments inline. -Original Message- From: Nithin Raju [mailto:nit...@vmware.com] Sent: Wednesday, October 1, 2014 8:55 PM To: Sorin Vinturis Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] datapath-windows: Incorrect assumption of t

[ovs-dev] [PATCH] ofproto: Do not postpone closing the mgmt socket

2014-10-01 Thread Daniele Di Proietto
When the bridge datapath_type is changed, ofproto is destroyed and immediately recreated. This involves closing and reopening the mgmt socket. If the destruction of the 'connmgr' is postponed, a race condition might happen, where we first recreate the socket and then try to destroy it. Reported-by

[ovs-dev] [PATCH] cmap: ovsrcu postpone the cmap destroy.

2014-10-01 Thread Alex Wang
Currently, the cmap_destroy() directly frees the cmap memory. Some callers of cmap_destroy() (e.g. destroy_subtable()) still allows other threads (e.g. pmd threads) accessing the cmap at the same time (e.g. via classifier_lookup_miniflow_batch()), which could cause segfault. To fix the above issue

[ovs-dev] [PATCH] ovs-vswitchd.at: Add test for switch over to another ovs-vswitchd.

2014-10-01 Thread Alex Wang
Test the switch over to inactive ovs-vswitchd process when user kill the currently active ovs-vswitchd. Signed-off-by: Alex Wang --- tests/ovs-vswitchd.at | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/ovs-vswitchd.at b/tests/ovs-vswitchd.a

Re: [ovs-dev] OVS on Hyper-V: Items to discuss for 10/1 IRC meeting

2014-10-01 Thread Nithin Raju
Sending out meeting minutes for future reference. Participants: Alin Serdean, Sorin Vinturis, Nithin Raju. On Sep 30, 2014, at 6:54 PM, Nithin Raju wrote: > hi Alin/Sorin, > There were the items we had to discuss: > > 1. Netlink task status: vport, flow, events, packet. Discussed status. High

Re: [ovs-dev] [PATCH] datapath-windows: Incorrect assumption of the IRQL

2014-10-01 Thread Nithin Raju
hi Sorin, I had minor comments. Pls. see inline. > #define NETLINK_FAMILY_NAME_LEN 48 > > +#ifndef IFNAMSIZ > +#define IFNAMSIZ 16 > +#endif This is defined in OvsDpInterface.h. We can avoid an extra definition. See commit - f92156ae2c86cf1b7c2076f2bca88b6fa10ec632. > + > > /* > * Netlink me

Re: [ovs-dev] [datapath minor fixes 2/3] datapath: avoid double free routing entry in vxlan_port xmit

2014-10-01 Thread Jesse Gross
On Wed, Oct 1, 2014 at 1:02 AM, Andy Zhou wrote: > Route entry will be free on error by vport when freeing skb. > additional error check and free after xmit() will cause double free. > > Signed-off-by: Andy Zhou I'm not sure that the route entry is attached to the skb in all cases. If it's not t

Re: [ovs-dev] [PATCHv6 11/14] datapath: Add support for unique flow identifiers.

2014-10-01 Thread Pravin Shelar
On Tue, Sep 30, 2014 at 10:09 PM, Joe Stringer wrote: > On 1 October 2014 11:59, Joe Stringer wrote: >> >> >> >> On 1 October 2014 11:55, Pravin Shelar wrote: >>> >>> On Tue, Sep 30, 2014 at 3:15 PM, Joe Stringer >>> wrote: >>> > >>> > >>> > On 1 October 2014 06:56, Pravin Shelar wrote: >>> >>

[ovs-dev] [PATCH] datapath-windows: Incorrect assumption of the IRQL

2014-10-01 Thread Sorin Vinturis
Acquiring a spin lock raises the IRQL level to DISPATCH_LEVEL. But in many places of the code, while holding a spin lock, there are useless checks for the current IRQL against DISPATCH_LEVEL. Also, the dispatch flag is not correctly set when calling NdisAcquireRWLockXXX() functions, which causes an

Re: [ovs-dev] [PATCH v2] README: Adding github markup and travis-ci build status to github readme page.

2014-10-01 Thread Pritesh Kothari (pritkoth)
On Oct 1, 2014, at 8:40 AM, Ben Pfaff wrote: > On Tue, Sep 30, 2014 at 11:23:46PM -0700, Pritesh Kothari wrote: >> Signed-off-by: Pritesh Kothari >> --- >> v2: >> * Changed html to mardown syntax instead. >> * Fix references to README in various places. >> * Fix whitespace issues. > > Thanks.

Re: [ovs-dev] [PATCH] configure: Disable strict aliasing.

2014-10-01 Thread Ben Pfaff
Thanks, I applied this to master. On Tue, Sep 30, 2014 at 06:00:03PM -0700, Jarno Rajahalme wrote: > I buy that, > > Acked-by: Jarno Rajahalme > > > On Sep 30, 2014, at 5:03 PM, Ben Pfaff wrote: > > > > The C standard allows compilers to do type-based alias analysis, which > > means that the

Re: [ovs-dev] [PATCH v2] README: Adding github markup and travis-ci build status to github readme page.

2014-10-01 Thread Ben Pfaff
On Tue, Sep 30, 2014 at 11:23:46PM -0700, Pritesh Kothari wrote: > Signed-off-by: Pritesh Kothari > --- > v2: > * Changed html to mardown syntax instead. > * Fix references to README in various places. > * Fix whitespace issues. Thanks. It looks nicer like this. I found a few more references to

Re: [ovs-dev] [PATCH 1/3] auto-attach: Initial support for Auto-Attach standard

2014-10-01 Thread Ben Pfaff
On Wed, Oct 01, 2014 at 02:42:52PM +, Flynn, Dennis R (Dennis) wrote: > This commit provides the initial delivery of support for the Auto-Attach > standard to Open vSwitch. This standard describes a compact method of using > IEEE 802.1AB Link Layer Discovery Protocol (LLDP) with a IEEE 802.1aq

[ovs-dev] [PATCH 3/3] auto-attach: Add auto-attach support to bridge layer and command set

2014-10-01 Thread Flynn, Dennis R (Dennis)
This is the final commit in the series of commits that deliver initial support for Auto-Attach. Specifically this commit delivers auto-attach support to the OVS bridge layer as well as the new auto-attach commands. The OVSDB schema is modified to define the new auto-attach entries. The man pages a

[ovs-dev] [PATCH 2/3] auto-attach: Add auto-attach support to ofproto layer

2014-10-01 Thread Flynn, Dennis R (Dennis)
diff --git a/lib/odp-util.h b/lib/odp-util.h index 11b54dd..61b71b1 100644 --- a/lib/odp-util.h +++ b/lib/odp-util.h @@ -40,6 +40,7 @@ struct pkt_metadata; SPR(SLOW_BFD,"bfd","Consists of BFD packets") \ SPR(SLOW_LACP, "lacp", "Consists of LACP packets")

[ovs-dev] [PATCH 0/3] auto-attach: Add support for IETF Auto Attach standard

2014-10-01 Thread Flynn, Dennis R (Dennis)
This patch sequence provides OVS support for the IETF Auto-Attach SPBM draft standard. This standard describes a compact method of using IEEE 802.1AB Link Layer Discovery Protocol (LLDP) together with a IEEE 802.1aq Shortest Path Bridging (SPB) network to automatically attach network devices to in

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

2014-10-01 Thread David Verbeiren
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 ring netdevs, the provided queue id (= PMD thread core id) in ne

Re: [ovs-dev] [PATCH] ofproto: flush groups and meters in ofproto_flush__

2014-10-01 Thread Gur Stavi
Hi Joe, I re sent the patch via my private email to avoid the legal warning. The diff was generated with 'svn diff' based on change from the OVS 2.3.0 tar ball. I tested that meters get cleared. My project does not deal with groups. I added a flush for them per Ben's request but I could not test

[ovs-dev] [PATCH] ofproto: flush groups and meters in ofproto_flush__

2014-10-01 Thread Gur Stavi
In fail-open mode on disconnect from controller rules are flushed. It makes sense to flush groups and meters as well. Signed-off-by: Gur Stavi --- Original issue was discussed here: https://www.mail-archive.com/discuss@openvswitch.org/msg10930.html Resending to avoid email client auto sig

Re: [ovs-dev] [PATCH] ofproto: flush groups and meters in ofproto_flush__

2014-10-01 Thread Joe Stringer
Hi Gur, looks straightforward. I have a few broad feedback points though: If you haven't read it yet, please take a look at the CONTRIBUTING file in the top of the source tree. I'm not sure what format this patch is in, but git won't accept it in my setup. I suspect it's due to the footer message

[ovs-dev] [datapath minor fixes 3/3] datapath: serializing GENEVE options based on flow key's tun_flags

2014-10-01 Thread Andy Zhou
TUNNEL_OPTIONS_PRESENT should always be checked against the tun_flgs bits in a flow key, for both flow and mask serialization. Signed-off-by: Andy Zhou --- datapath/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.

[ovs-dev] [datapath minor fixes 1/3] datapath: avoid hard code OVS_VPORT_TYPE_GENEVE

2014-10-01 Thread Andy Zhou
OVS_VPORT_TYPE_GENEVE is currently hard coded to 6. This is not necessary since slot 5 has not been taken yet. Drop the hard coded value to before upstreaming GENEVE support to Linux kernel. Signed-off-by: Andy Zhou --- datapath/linux/compat/include/linux/openvswitch.h | 2 +- 1 file changed, 1

[ovs-dev] [datapath minor fixes 2/3] datapath: avoid double free routing entry in vxlan_port xmit

2014-10-01 Thread Andy Zhou
Route entry will be free on error by vport when freeing skb. additional error check and free after xmit() will cause double free. Signed-off-by: Andy Zhou --- datapath/vport-vxlan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c index 8689853

[ovs-dev] [datapath minor fixes 0/3] datapath minor fixes

2014-10-01 Thread Andy Zhou
A few small issues found in preparing for GENEVE support upstreaming *** BLURB HERE *** Andy Zhou (3): datapath: avoid hard code OVS_VPORT_TYPE_GENEVE datapath: avoid double free routing entry in vxlan_port xmit datapath: serializing GENEVE options based on flow key's tun_flags datapath/f

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

2014-10-01 Thread Joe Stringer
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 leave a straggler probe > flow in the datapath. > I checked on this, and

Re: [ovs-dev] [PATCH] ovs-vswitchd.at: Fix "start additional ovs-vswitchd process" test

2014-10-01 Thread YAMAMOTO Takashi
> Thanks for fixing this. > > Acked-by: Joe Stringer applied, thank you. YAMAMOTO Takashi ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev