[ovs-dev] [PATCH] ofproto-dpif: Correct endian problem in recv_upcalls()

2013-10-01 Thread Simon Horman
Use nl_attr_get_u32() instead of nl_attr_get_be32() to parse nla so that the decoded value which is passed to mhash_add() is host byte order as mhash_add() expects. This resolves a minor regression introduced by 10e576406c7444ef (ofproto-dpif: Move special upcall handling into

[ovs-dev] [PATCH v2.41 2/5] ofp-actions: Add separate OpenFlow 1.3 action parser

2013-10-01 Thread Simon Horman
From: Joe Stringer j...@wand.net.nz This patch adds new ofpact_from_openflow13() and ofpacts_from_openflow13() functions parallel to the existing ofpact handling code. In the OpenFlow 1.3 version, push_mpls is handled differently, but all other actions are handled by the existing code. In the

[ovs-dev] [PATCH v2.41 3/5] lib: Support pushing of MPLS LSE before or after VLAN tag

2013-10-01 Thread Simon Horman
From: Joe Stringer j...@wand.net.nz This patch modifies the push_mpls behaviour to allow pushing of an MPLS LSE either before any VLAN tag that may be present. Pushing the MPLS LSE before any VLAN tag that is present is the behaviour specified in OpenFlow 1.3. Pushing the MPLS LSE after the any

[ovs-dev] [PATCH v2.41 4/5] datapath: Break out deacceleration portion of vlan_push

2013-10-01 Thread Simon Horman
Break out deacceleration portion of vlan_push into vlan_put so that it may be re-used by mpls_push. For both vlan_push and mpls_push if there is an accelerated VLAN tag present then it should be deaccelerated, adding it to the data of the skb, before the new tag is added. Signed-off-by: Simon

[ovs-dev] [PATCH v2.41 0/5] MPLS actions and matches

2013-10-01 Thread Simon Horman
Hi, This series implements MPLS actions and matches based on work by Ravi K, Leo Alterman, Yamahata-san and Joe Stringer. This series provides two changes * Patches 1 - 3 Provide user-space support for the VLAN/MPLS tag insertion order up to and including OpenFlow 1.2, and the different

[ovs-dev] [PATCH v2.41 1/5] odp: Allow VLAN actions after MPLS actions

2013-10-01 Thread Simon Horman
From: Joe Stringer j...@wand.net.nz OpenFlow 1.1 and 1.2, and 1.3 differ in their handling of MPLS actions in the presence of VLAN tags. To allow correct behaviour to be committed in each situation, this patch adds a second round of VLAN tag action handling to commit_odp_actions(), which occurs

[ovs-dev] [PATCH v2.41 5/5] datapath: Add basic MPLS support to kernel

2013-10-01 Thread Simon Horman
Allow datapath to recognize and extract MPLS labels into flow keys and execute actions which push, pop, and set labels on packets. Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer. Cc: Ravi K rke...@gmail.com Cc: Leo Alterman lalter...@nicira.com Cc: Isaku Yamahata

Re: [ovs-dev] latest git from branch-2.0 failed to build

2013-10-01 Thread Vasiliy Tolstov
On Oct 1, 2013 12:25 AM, Ben Pfaff b...@nicira.com wrote: On Mon, Sep 30, 2013 at 08:50:50AM +0400, Vasiliy Tolstov wrote: Hi, all. I'm try to build deb package for openvswitch 2.0. Now build fails:

Re: [ovs-dev] [PATCH] ofproto-dpif: Correct endian problem in recv_upcalls()

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 03:15:22PM +0900, Simon Horman wrote: Use nl_attr_get_u32() instead of nl_attr_get_be32() to parse nla so that the decoded value which is passed to mhash_add() is host byte order as mhash_add() expects. This resolves a minor regression introduced by 10e576406c7444ef

[ovs-dev] [PATCH] datapath: Fix vxlan gso with vlan.

2013-10-01 Thread Pravin B Shelar
To use ovs-gso-compatibility we need to record inner skb offset. In case of vxlan it is done before vlan header is pushed which gives wrong inner packet to ovs-gso. Following patch reset skb offsets after inner skb is completely built. Signed-off-by: Pravin B Shelar pshe...@nicira.com ---

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Ben Pfaff
On Mon, Sep 30, 2013 at 07:27:07PM -0700, Duffie Cooley wrote: From: Duffie Cooley dcoo...@nicira.com This is a fix for a request to make sure that the openvswitch status command in rhel based distros gives a useful exit status. That was fixed in commit

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Sep 30, 2013, at 5:46 PM, Jesse Gross wrote: On Fri, Sep 20, 2013 at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: This patch adds support for Network Service Headers (nsh) over VXLAN as mentioned in [1]. Here changes are made to datapath to add nsh headers whenever a vxlan port with

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Gurucharan Shetty
On Mon, Sep 30, 2013 at 7:27 PM, Duffie Cooley dcoo...@nicira.com wrote: From: Duffie Cooley dcoo...@nicira.com This is a fix for a request to make sure that the openvswitch status command in rhel based distros gives a useful exit status. That was fixed in commit

Re: [ovs-dev] [PATCH V2 3/3] ofproto-dpif-monitor: Move ofproto-dpif-monitor to a single thread.

2013-10-01 Thread Alex Wang
On Mon, Sep 30, 2013 at 3:16 PM, Ethan Jackson et...@nicira.com wrote: Why do we need the bfd-last_tx change? Should it be in a different patch with a commit message explaining it? I'll send a separate patch for it. As discussed off list, the monitor_seq thing is a layering violation.

Re: [ovs-dev] [PATCH V2 3/3] ofproto-dpif-monitor: Move ofproto-dpif-monitor to a single thread.

2013-10-01 Thread Alex Wang
On Tue, Oct 1, 2013 at 10:38 AM, Alex Wang al...@nicira.com wrote: I don't really like the function name monitor_handler(). It's not really handling anything in the same sense that the miss_handler is. I think we should rename the function interface_monitor(), and

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Jarno Rajahalme
On Oct 1, 2013, at 10:07 AM, Pritesh Kothari (pritkoth) pritk...@cisco.com wrote: On Sep 30, 2013, at 5:46 PM, Jesse Gross wrote: On Fri, Sep 20, 2013 at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: This patch adds support for Network Service Headers (nsh) over VXLAN as mentioned

Re: [ovs-dev] [PATCH] datapath: Fix vxlan gso with vlan.

2013-10-01 Thread Jesse Gross
On Tue, Oct 1, 2013 at 8:24 AM, Pravin B Shelar pshe...@nicira.com wrote: To use ovs-gso-compatibility we need to record inner skb offset. In case of vxlan it is done before vlan header is pushed which gives wrong inner packet to ovs-gso. Following patch reset skb offsets after inner skb is

Re: [ovs-dev] [PATCH V2 3/3] ofproto-dpif-monitor: Move ofproto-dpif-monitor to a single thread.

2013-10-01 Thread Ethan Jackson
I still feel it is not very clear to name it interface_monitor while the module is called ofproto_dpif_monitor. Can I use monitor_main()? and just set the name to monitor. The set_subprogram_name cannot exceeds 16 char's Fine with me. Ethan ___

Re: [ovs-dev] [PATCH V2 3/3] ofproto-dpif-monitor: Move ofproto-dpif-monitor to a single thread.

2013-10-01 Thread Ethan Jackson
Yes, I originally worried about the behavior of creating a thread while holding the xlate_rwlock monitor_rwlock. After check with Ben, I'm good to modify it. Why can't you simply release the lock before creating the thread? Ethan ___ dev mailing

Re: [ovs-dev] [PATCH] datapath: Fix vxlan gso with vlan.

2013-10-01 Thread Pravin Shelar
On Tue, Oct 1, 2013 at 11:12 AM, Jesse Gross je...@nicira.com wrote: On Tue, Oct 1, 2013 at 8:24 AM, Pravin B Shelar pshe...@nicira.com wrote: To use ovs-gso-compatibility we need to record inner skb offset. In case of vxlan it is done before vlan header is pushed which gives wrong inner

Re: [ovs-dev] [PATCH V2 3/3] ofproto-dpif-monitor: Move ofproto-dpif-monitor to a single thread.

2013-10-01 Thread Alex Wang
As discussed off list, there can be deadlock when starting/terminating monitor thread while holding monitor_rwlock. So, I'll go back and check thread creation/termination in ofproto-dpif.c On Tue, Oct 1, 2013 at 11:17 AM, Ethan Jackson et...@nicira.com wrote: Yes, I originally worried about

Re: [ovs-dev] [PATCH] ipfix: implement flow caching and aggregation in exporter

2013-10-01 Thread Neil Mckee
Just a comment: one of the architectural differences between IPFIX and sFlow is the location of the flow-cache: with sFlow the cache is implemented in external software on a central server, which can then easily export IPFIX if required (while also providing real-time network-wide

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Gurucharan Shetty
This patch works for me, but it is a little hacky. diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index 1684ddc..b0cdaf2 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -51,7 +51,13 @@ ovs_ctl () { ;; *) echo `date -u`:$@

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Jesse Gross
On Tue, Oct 1, 2013 at 10:07 AM, Pritesh Kothari (pritkoth) pritk...@cisco.com wrote: On Sep 30, 2013, at 5:46 PM, Jesse Gross wrote: One other thing - would you mind using your full name in the signed-off-by line? i generally prefer just my first name, but if its needed i can use my full

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Oct 1, 2013, at 12:08 PM, Jesse Gross wrote: On Tue, Oct 1, 2013 at 10:07 AM, Pritesh Kothari (pritkoth) pritk...@cisco.com wrote: On Sep 30, 2013, at 5:46 PM, Jesse Gross wrote: One other thing - would you mind using your full name in the signed-off-by line? i generally prefer just

Re: [ovs-dev] [PATCH v2 1/2] Widen TCP flags handling.

2013-10-01 Thread Jesse Gross
On Fri, Sep 27, 2013 at 3:04 PM, Ben Pfaff b...@nicira.com wrote: On Wed, Sep 25, 2013 at 09:42:28AM -0700, Jarno Rajahalme wrote: Widen TCP flags handling from 7 bits (uint8_t) to 12 bits (uint16_t). The kernel interface remains at 8 bits, which makes no functional difference now, as none of

[ovs-dev] [PATCH 3/5] timeval: Add time-warp sequence number.

2013-10-01 Thread Alex Wang
This commit adds an extern sequence number 'timewarp_seq' in timeval, so that threads other than main thread can wait on this sequence number and be waken up when time is warped. Signed-off-by: Alex Wang al...@nicira.com --- lib/timeval.c |8 lib/timeval.h |3 +++ 2 files

[ovs-dev] [PATCH 2/5] ofproto-dpif: Make stats update thread safe.

2013-10-01 Thread Alex Wang
This commit makes the update of 'stats' member in ofproto_dpif struct thread safe. Signed-off-by: Alex Wang al...@nicira.com --- ofproto/ofproto-dpif.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 6420b60..15c4dd3 100644 ---

[ovs-dev] [PATCH 0/5] Introduce ofproto-dpif-monitor.

2013-10-01 Thread Alex Wang
This series of patches implements the multi-threading bfd/cfm in ofproto-dpif-monitor module. This module is in charge of the execution of periodic functions (like bfd_run, cfm_run, bfd_send_packets). Alex Wang (5): ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module. ofproto-dpif:

[ovs-dev] [PATCH 5/5] ofproto-dpif-monitor: Run ofproto-dpif-monitor in a thread.

2013-10-01 Thread Alex Wang
This commit moves the ofproto-dpif-monitor module into a dedicated thread. This helps eliminate the burden of main thread having to wake up very frequently for periodic interface monitoring (bfd, cfm). Also, this commit greatly increases the number of bfd/cfm sessions that can be supported by

[ovs-dev] [PATCH 4/5] ofproto-dpif-monitor: Add ofproto-dpif-monitor module.

2013-10-01 Thread Alex Wang
This commit adds a new module ofproto-dpif-monitor in ofproto directory. This module is in charge of executing the periodic functions of monitoring code (e.g. bfd and cfm). Signed-off-by: Alex Wang al...@nicira.com --- ofproto/automake.mk|2 + ofproto/ofproto-dpif-monitor.c |

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Oct 1, 2013, at 11:03 AM, Jarno Rajahalme wrote: On Oct 1, 2013, at 10:07 AM, Pritesh Kothari (pritkoth) pritk...@cisco.com wrote: On Sep 30, 2013, at 5:46 PM, Jesse Gross wrote: On Fri, Sep 20, 2013 at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: This patch adds support

Re: [ovs-dev] [PATCH v2 2/2] TCP flags matching support.

2013-10-01 Thread Jesse Gross
On Wed, Sep 25, 2013 at 9:42 AM, Jarno Rajahalme jrajaha...@nicira.com wrote: diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h index 09c26b5..2642ca5 100644 --- a/include/linux/openvswitch.h +++ b/include/linux/openvswitch.h @@ -291,6 +291,8 @@ enum ovs_key_attr {

[ovs-dev] [PATCH v4 3/3] datapath: Simplify mega-flow APIs.

2013-10-01 Thread Pravin B Shelar
Hides mega-flow implementation in flow_table.c rather than datapath.c. This also helps next patch. Signed-off-by: Pravin B Shelar pshe...@nicira.com --- v4: Fixes dues to name changes. v3: No change. v2: No change. --- datapath/datapath.c | 27 +++--- datapath/flow_table.c | 138

Re: [ovs-dev] [PATCH v3 4/4] datapath: Scalable locking.

2013-10-01 Thread Pravin Shelar
On Mon, Sep 30, 2013 at 2:27 PM, Jesse Gross je...@nicira.com wrote: Some very quick high level things while I look at this: On Mon, Sep 30, 2013 at 1:01 PM, Pravin B Shelar pshe...@nicira.com wrote: Following patch breaks down ovs_mutex into multiple locks. This patch specifically targets

[ovs-dev] [PATCH v4 2/3] datapath: Move mega-flow list out of rehashing struct.

2013-10-01 Thread Pravin B Shelar
ovs-flow rehash does not touch mega flow list. Following patch moves it dp struct datapath. Avoid one extra indirection for accessing mega-flow list head on every packet receive. Signed-off-by: Pravin B Shelar pshe...@nicira.com --- v4: rename hash_table to table_instance. other fixes according

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: This patch adds support for Network Service Headers (nsh) over VXLAN as mentioned in [1]. Here changes are made to datapath to add nsh headers whenever a vxlan port with destination port as 9030 is created. IANA port

Re: [ovs-dev] [PATCH 2/8] nsh: userland support for network service headers

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: NSH service path (nsp) can be set/unset while creating the port as well nsp can be matched on incoming packets. Signed-off-by: pritesh pritesh.koth...@cisco.com ... +++ b/lib/meta-flow.c @@ -694,7 +694,24 @@ static

Re: [ovs-dev] [PATCH 3/8] nsh: support for setting nsp, action set_nsp=value

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for setting nsp using an action namely set_nsp. It works similar to set_tunnel in vxlan/gre tunnel and can be used to set the outgoing nsh service path id. Should tell here that NXM_NX_NSP is also defined, which

Re: [ovs-dev] [PATCH 4/8] nsh: datapath support for network service index

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Here, datapath support for setting nsh service index (nsi) is added. nsi can now be set on outgoing packet depending on port settings or set_nsi action. Signed-off-by: pritesh pritesh.koth...@cisco.com ... diff --git

Re: [ovs-dev] [PATCH 5/8] nsh: userland support for network service index

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for nsh service index (nsi) is added, mainly incoming nsi in a flow can be matched and appropriate action can be taken on the flow based on it. Signed-off-by: pritesh pritesh.koth...@cisco.com ... diff

Re: [ovs-dev] [PATCH 6/8] nsh: support for setting nsi, action set_nsi=value

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for setting nsi using an action namely set_nsi. It works similar to set_tunnel in vxlan/gre tunnel and can be used to set the outgoing nsh service index (nsi). Again, a new action is not necessary, load, move,

Re: [ovs-dev] [PATCH] datapath: Fix vxlan gso with vlan.

2013-10-01 Thread Pravin Shelar
I pushed patch to master and branch-2.0. On Tue, Oct 1, 2013 at 11:12 AM, Jesse Gross je...@nicira.com wrote: On Tue, Oct 1, 2013 at 8:24 AM, Pravin B Shelar pshe...@nicira.com wrote: To use ovs-gso-compatibility we need to record inner skb offset. In case of vxlan it is done before vlan

Re: [ovs-dev] [PATCH 7/8] nsh: support for setting nsh contexts

2013-10-01 Thread Jarno Rajahalme
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for setting the nsh network and service contexts is added here. The support is added only for adding context while the port is created. I understand that this may be an intermediate step, but how are these useful as

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Duffie Cooley
What about this? referenced from here. http://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another/70675#70675 diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index 1684ddc..5286e12 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Ben Pfaff
That is pretty horrible. I was trying to construct something similar manually, but you finished it off. I suggest adding spaces between the initial s, to avoid this pitfall described at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18: If a character

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Paul Ingram
Why the redirect from descriptor 4? :: psi On Oct 1, 2013, at 3:13 PM, Duffie Cooley dcoo...@nicira.com wrote: What about this? referenced from here. http://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another/70675#70675 diff --git

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 01:36:11PM -0700, Alex Wang wrote: This commit moves the main logic of send_packet() function into the ofproto-dpif-xlate module. Also, modification is made to guarantee the thread safety of ofproto-dpif-xlate module. Signed-off-by: Alex Wang al...@nicira.com

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ethan Jackson
xlate_send_packet() locks xlate_rwlock before it looks up the xport, but at the end it unlocks xlate_rwlock before it dereferences xport-xbridge-dpif. Is the latter dereference safe, that is, does anything guarantee that 'xport' and 'xbridge' aren't destroyed? No that's definitely not safe.

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 03:41:17PM -0700, Ethan Jackson wrote: xlate_send_packet() locks xlate_rwlock before it looks up the xport, but at the end it unlocks xlate_rwlock before it dereferences xport-xbridge-dpif. Is the latter dereference safe, that is, does anything guarantee that

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ethan Jackson
Technically I don't think it is because the dpif could be destroyed as soon as the xlate_rwlock is released. In practice this seems pretty unlikely. If we wanted to do that we'd have to ref count the dpif, which may not be a bad idea anyway. Ethan On Tue, Oct 1, 2013 at 3:45 PM, Ben Pfaff

Re: [ovs-dev] [PATCH 2/5] ofproto-dpif: Make stats update thread safe.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 01:36:12PM -0700, Alex Wang wrote: This commit makes the update of 'stats' member in ofproto_dpif struct thread safe. Signed-off-by: Alex Wang al...@nicira.com Should this also annotate the 'stats' member as OVS_GUARDED? Thanks, Ben.

Re: [ovs-dev] [PATCH 2/5] ofproto-dpif: Make stats update thread safe.

2013-10-01 Thread Alex Wang
Yes, I'll add it, Thanks On Tue, Oct 1, 2013 at 3:49 PM, Ben Pfaff b...@nicira.com wrote: On Tue, Oct 01, 2013 at 01:36:12PM -0700, Alex Wang wrote: This commit makes the update of 'stats' member in ofproto_dpif struct thread safe. Signed-off-by: Alex Wang al...@nicira.com Should

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Alex Wang
I agree with Ethan, in the worst case, xport could be destroyed when dereferenced. I can add reference counter to dpif. Should I do that? On Tue, Oct 1, 2013 at 3:47 PM, Ethan Jackson et...@nicira.com wrote: Technically I don't think it is because the dpif could be destroyed as soon as the

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 03:57:59PM -0700, Alex Wang wrote: I can add reference counter to dpif. Should I do that? Can we just unlock later? ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ben Pfaff
The logic that I was using is that either send_packet() is being called from some thread other than the main one, in which case the dpif is not being destroyed (because we would kill those threads before destroying the dpif) or from the main thread, in which case the dpif is not being destroyed

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ethan Jackson
Can we just unlock later? +1 let's just go for simple now. If it actually turns out to matter we can change it, but since we're only holding the read lock I doubt it will matter. Ethan ___ dev mailing list dev@openvswitch.org

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Duffie Cooley
From the reference. Lets examine that step by step. |( ( ( ( someprog; #part6 echo $? 3#part5 ) | filter 4 #part4 ) 31 #part3 ) | stdintoexitstatus#part2 ) 41 #part1| From bottom up: 1. A subshell is created

Re: [ovs-dev] [PATCH v2.41 5/5] datapath: Add basic MPLS support to kernel

2013-10-01 Thread Jesse Gross
On Mon, Sep 30, 2013 at 11:47 PM, Simon Horman ho...@verge.net.au wrote: diff --git a/datapath/actions.c b/datapath/actions.c index d961e5d..bfab9ec 100644 --- a/datapath/actions.c +++ b/datapath/actions.c +/* Push MPLS after the ethernet header. */ +static int push_mpls(struct sk_buff *skb,

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Alex Wang
To make sure I understand it right. You means: The main thread must delete all bridges (removing cfm/bfd on all ports, = remove the monitor thread) before removing the dpif. Do i understand it right? If so, I think dpif = xport-xbridge-dpif inside the lock is thread-safe. On Tue, Oct 1, 2013

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 04:09:17PM -0700, Alex Wang wrote: To make sure I understand it right. You means: The main thread must delete all bridges (removing cfm/bfd on all ports, = remove the monitor thread) before removing the dpif. Do i understand it right? Yes. If so, I think dpif =

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Paul Ingram
OK, but I don't see the redirect to descriptor 4 in the real code (it's obviously there in the example). :: psi On Oct 1, 2013, at 3:58 PM, Duffie Cooley dcoo...@nicira.com wrote: From the reference. Lets examine that step by step. ( ( ( ( someprog; #part6 echo $? 3

Re: [ovs-dev] [PATCH 3/5] timeval: Add time-warp sequence number.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 01:36:13PM -0700, Alex Wang wrote: This commit adds an extern sequence number 'timewarp_seq' in timeval, so that threads other than main thread can wait on this sequence number and be waken up when time is warped. Signed-off-by: Alex Wang al...@nicira.com Could

Re: [ovs-dev] [PATCH 3/4] ofproto: Define official OpenFlow port number.

2013-10-01 Thread Justin Pettit
On Sep 24, 2013, at 9:09 PM, Ben Pfaff b...@nicira.com wrote: On Tue, Sep 24, 2013 at 04:41:43PM -0700, Justin Pettit wrote: On Sep 24, 2013, at 2:11 PM, Ben Pfaff b...@nicira.com wrote: On Mon, Sep 23, 2013 at 02:36:39PM -0700, Justin Pettit wrote: Signed-off-by: Justin Pettit

Re: [ovs-dev] [PATCH 3/5] timeval: Add time-warp sequence number.

2013-10-01 Thread Alex Wang
Thanks Ben for the review, Could timeval export a function e.g. timewarp_wait() rather than a variable here? It would be even better if threads didn't have to explicitly wait on this. Maybe timeval or the poll loop should automatically wake up all threads when time warping happens. Yes,

Re: [ovs-dev] [PATCH 4/5] ofproto-dpif-monitor: Add ofproto-dpif-monitor module.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 01:36:14PM -0700, Alex Wang wrote: This commit adds a new module ofproto-dpif-monitor in ofproto directory. This module is in charge of executing the periodic functions of monitoring code (e.g. bfd and cfm). Signed-off-by: Alex Wang al...@nicira.com The comment here

Re: [ovs-dev] [PATCH v2.41 5/5] datapath: Add basic MPLS support to kernel

2013-10-01 Thread Simon Horman
On Tue, Oct 01, 2013 at 04:02:17PM -0700, Jesse Gross wrote: On Mon, Sep 30, 2013 at 11:47 PM, Simon Horman ho...@verge.net.au wrote: diff --git a/datapath/actions.c b/datapath/actions.c index d961e5d..bfab9ec 100644 --- a/datapath/actions.c +++ b/datapath/actions.c +/* Push MPLS after

Re: [ovs-dev] [PATCH v2.41 5/5] datapath: Add basic MPLS support to kernel

2013-10-01 Thread Jesse Gross
On Tue, Oct 1, 2013 at 5:40 PM, Simon Horman ho...@verge.net.au wrote: On Tue, Oct 01, 2013 at 04:02:17PM -0700, Jesse Gross wrote: On Mon, Sep 30, 2013 at 11:47 PM, Simon Horman ho...@verge.net.au wrote: @@ -545,6 +662,14 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ben Pfaff
On Tue, Oct 01, 2013 at 04:00:25PM -0700, Ethan Jackson wrote: Can we just unlock later? +1 let's just go for simple now. If it actually turns out to matter we can change it, but since we're only holding the read lock I doubt it will matter. Yeah, like I said I was trying to explore the

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.

2013-10-01 Thread Ethan Jackson
Yeah I still vote for simple. Even if it works today, it's less obviously correct and make break in future. Ethan On Tue, Oct 1, 2013 at 6:29 PM, Ben Pfaff b...@nicira.com wrote: On Tue, Oct 01, 2013 at 04:00:25PM -0700, Ethan Jackson wrote: Can we just unlock later? +1 let's just go for

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Pritesh Kothari (pritkoth)
btw, first and foremost, thanks for the review, i greatly appreciate it :) diff --git a/datapath/flow.c b/datapath/flow.c index 29122af..4f47a48 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -1235,6 +1235,7 @@ int ovs_ipv4_tun_from_nlattr(const struct nlattr *attr, int rem;

Re: [ovs-dev] [PATCH 2/8] nsh: userland support for network service headers

2013-10-01 Thread Pritesh Kothari (pritkoth)
+{ +MFF_NSP, nsp, NULL, +sizeof(ovs_be32), 24, +MFM_FULLY, +MFS_HEXADECIMAL, +MFP_NONE, +false, +0, NULL, +0, NULL, +OFPUTIL_P_OF10_NXM_ANY, +OFPUTIL_P_OF10_NXM_ANY, These should be:

Re: [ovs-dev] [PATCH 3/8] nsh: support for setting nsp, action set_nsp=value

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for setting nsp using an action namely set_nsp. It works similar to set_tunnel in vxlan/gre tunnel and can be used to set the outgoing nsh service path id. Should tell here that NXM_NX_NSP is also defined, which

Re: [ovs-dev] [PATCH 4/8] nsh: datapath support for network service index

2013-10-01 Thread Pritesh Kothari (pritkoth)
diff --git a/datapath/flow.c b/datapath/flow.c index 4f47a48..4335d67 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -46,6 +46,8 @@ #include vlan.h +#define NSH_M_NSI 0x00FF + Is this the same as NSH_M_NSI currently defined in nsh.h? static struct kmem_cache

Re: [ovs-dev] [PATCH 5/8] nsh: userland support for network service index

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Oct 1, 2013, at 3:07 PM, Jarno Rajahalme wrote: On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for nsh service index (nsi) is added, mainly incoming nsi in a flow can be matched and appropriate action can be taken on the flow based on it.

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Jarno Rajahalme
On Oct 1, 2013, at 6:36 PM, Pritesh Kothari (pritkoth) pritk...@cisco.com wrote: Also, the usual treatment of reserved bits is ignore on reception, rather than dropping. hmm. i didn't quite get what you are saying here, vxlan_vni and svc_path both use upper 24bits and their

Re: [ovs-dev] [PATCH 1/8] nsh: datapath support for network service headers

2013-10-01 Thread Pritesh Kothari (pritkoth)
vxlan.c:118: if (vxh-vx_flags != htonl(VXLAN_FLAGS) || (vxh-vx_vni htonl(0xff))) { or if (unlikely(nsh-b.svc_path htonl(NSH_M_NSI))) { // NSH_M_NSI == 0x00ff which is same as 0xff above? am i missing something here? I did not check if the NSH spec tells to reject packets with

Re: [ovs-dev] [PATCH 6/8] nsh: support for setting nsi, action set_nsi=value

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Oct 1, 2013, at 3:09 PM, Jarno Rajahalme wrote: On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for setting nsi using an action namely set_nsi. It works similar to set_tunnel in vxlan/gre tunnel and can be used to set the outgoing nsh service index (nsi).

Re: [ovs-dev] [PATCH 7/8] nsh: support for setting nsh contexts

2013-10-01 Thread Pritesh Kothari (pritkoth)
On Oct 1, 2013, at 3:13 PM, Jarno Rajahalme wrote: On Sep 20, 2013, at 1:04 AM, pritesh pritesh.koth...@cisco.com wrote: Support for setting the nsh network and service contexts is added here. The support is added only for adding context while the port is created. I understand that

[ovs-dev] [PATCH] util: use gcc builtins to better check array sizes

2013-10-01 Thread Flavio Leitner
GCC provides two useful builtin functions that can help to improve array size checking during compilation. This patch contains no functional changes, but it makes it easier to detect mistakes. Signed-off-by: Flavio Leitner f...@redhat.com --- lib/util.h | 17 - 1 file changed,