[ovs-dev] [PATCH] ofproto-dpif: keep slow path flow time stamp up-to-date

2013-11-21 Thread Andy Zhou
Noting updating slow path subfacet's time stamp can cause their datapath flows deleted periodically. For example, CFM datapath flow have usespace actions that are handled in dpif slow path. They are deleted and recreated periodically without the fix. This bug are not obvious during normal operatio

Re: [ovs-dev] [PATCH] Update subfacet stats for slow path flow

2013-11-21 Thread Andy Zhou
Thanks Guolin for exposing the issue. Very good catch! I looked into the test case failure, but did not find anything wrong those tests. It turns out the root cause was those slow path flows' timestamp did not get updated, causing them to be deleted about every 10 seconds. The patch updated both

Re: [ovs-dev] [PATCH 2/4] connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.

2013-11-21 Thread ZhengLingyun
Oh, sorry. I updated the code from master a few days ago. Now I updae the code again. The OVS works in userspace, following is the output: 2013-11-22T03:40:26Z|3|bridge|INFO|bridge br0: added interface br0 on port 65534 2013-11-22T03:40:26Z|4|dpif_linux|ERR|Generic Netlink family 'ovs

Re: [ovs-dev] [PATCH] datapath: gre: Fix kernel 3.11 compatibility.

2013-11-21 Thread Jesse Gross
On Wed, Nov 20, 2013 at 9:50 AM, Pravin B Shelar wrote: > On 3.11 kernel, gre module exports IP_GRE demux API, ovs needs > to use it to register for GRE protocol handler. > > Reported-by: Nithin Nayak Sujir > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___

Re: [ovs-dev] [PATCH 2/4] connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.

2013-11-21 Thread Ben Pfaff
What version of OVS is this? On Fri, Nov 22, 2013 at 10:42:20AM +0800, ZhengLingyun wrote: > I set OVS connect to a non-existent controller 10.1.1.1, the controller will > fall into fail-open mode. > Then I delete the controller, the OVS will abort: > > > > > 2013-11-22T01:25:40Z|00010|connm

Re: [ovs-dev] [PATCH 2/4] connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.

2013-11-21 Thread ZhengLingyun
I set OVS connect to a non-existent controller 10.1.1.1, the controller will fall into fail-open mode. Then I delete the controller, the OVS will abort: 2013-11-22T01:25:40Z|00010|connmgr|INFO|br0: added primary controller "tcp:10.1.1.1:6632" 2013-11-22T01:25:40Z|00011|rconn|INFO|br0<->tcp:1

Re: [ovs-dev] Windows port status

2013-11-21 Thread Ben Pfaff
On Fri, Nov 22, 2013 at 02:23:11AM +, Alin Serdean wrote: > Bellow the whole patch required for the PRI_ZU macro: PRI_ZU is a bad name because it doesn't follow the existing pattern. The name PRIuSIZE fits the pattern, so that is what I would suggest. The existing PRI* macros only include a t

[ovs-dev] 你好:BROycxnhtD

2013-11-21 Thread nrtadvqfcj
   ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] Windows port status

2013-11-21 Thread Alin Serdean
Bellow the whole patch required for the PRI_ZU macro: diff --git a/CodingStyle b/CodingStyle index 2f24ee3..a9417de 100644 --- a/CodingStyle +++ b/CodingStyle @@ -394,7 +394,7 @@ from . integer types. Use the PRId, PRIu, and PRIx macros from for formatting them with printf() and related functi

[ovs-dev] [PATCH] ofproto-dpif-upcall: Improve upcall handling fairness.

2013-11-21 Thread Alex Wang
This commit improves the upcall dispatching fairness by introduing a 2-stage scheme. And the two stages are run by two threads, 'dispatcher' and 'distributor', respectively. At the first stage, the dispatcher thread will read upcalls from kernel and put the upcalls into the fair queues based on t

Re: [ovs-dev] [PATCH] ofproto: Set-Field VLAN_VID should not check OFPVID_PRESENT

2013-11-21 Thread Ben Pfaff
This was a big problem at the ONF plugfest a few weeks ago. None of the switches and controllers agreed on whether OFPVID_PRESENT should be optional or mandatory or forbidden. Perhaps a clarification to the standard is forthcoming. On Fri, Nov 22, 2013 at 01:35:40AM +0100, Marco Canini wrote: >

Re: [ovs-dev] [PATCH v3 2/2] Classifier: Track address prefixes.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 02:25:31PM -0800, Jarno Rajahalme wrote: > Add a prefix tree (trie) structure for tracking the used address > space, enabling skipping classifier tables containing longer masks > than necessary for an address field value in a flow being classified. > This enables less unwild

[ovs-dev] [PATCH] FAQ: Explain how to add QoS features to Open vSwitch.

2013-11-21 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- FAQ | 13 + 1 file changed, 13 insertions(+) diff --git a/FAQ b/FAQ index 2912ae3..a57362e 100644 --- a/FAQ +++ b/FAQ @@ -723,6 +723,19 @@ A: Did you install OpenFlow flows that use your queues? This is the Refer to the previous question for an

Re: [ovs-dev] [PATCH] sparse: Include stdlib.h to ensure NULL is defined.

2013-11-21 Thread Ben Pfaff
On Fri, Nov 22, 2013 at 09:26:43AM +0900, Simon Horman wrote: > On Thu, Nov 21, 2013 at 09:01:12AM -0800, Ben Pfaff wrote: > > On Thu, Nov 21, 2013 at 12:17:51PM +0900, Simon Horman wrote: > > > Include stdlib.h in include/sparse/sys/socket.h to ensure > > > that NULL is defined and thus avoid the

Re: [ovs-dev] [PATCH] ofproto: Set-Field VLAN_VID should not check OFPVID_PRESENT

2013-11-21 Thread Marco Canini
Ah, I had missed 1.3.3. Based on that, my patch is wrong. I had checked on 1.2, 1.3.2 and 1.4.0 and none of them contains that information. So, yes, that text is missing in 1.4. On Fri, Nov 22, 2013 at 1:12 AM, Jarno Rajahalme wrote: > > On Nov 21, 2013, at 3:47 PM, Marco Canini wrote: > > > C

Re: [ovs-dev] [PATCH] sparse: Include stdlib.h to ensure NULL is defined.

2013-11-21 Thread Simon Horman
On Thu, Nov 21, 2013 at 09:01:12AM -0800, Ben Pfaff wrote: > On Thu, Nov 21, 2013 at 12:17:51PM +0900, Simon Horman wrote: > > Include stdlib.h in include/sparse/sys/socket.h to ensure > > that NULL is defined and thus avoid the following sparse warning. > > > > ./include/sparse/sys/socket.h:74:15

Re: [ovs-dev] openflow-1.2.h: Fix definition of OXM_OF_PBB_ISID.

2013-11-21 Thread Jarno Rajahalme
Acked-by: Jarno Rajahalme On Oct 8, 2013, at 13:42 PM, Ben Pfaff wrote: > The ONF header file shows this as a 3-byte field. > > Reported-by: YAMAMOTO Takashi > Signed-off-by: Ben Pfaff > > --- > include/openflow/openflow-1.2.h |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [ovs-dev] [PATCH] ofproto: Set-Field VLAN_VID should not check OFPVID_PRESENT

2013-11-21 Thread Jarno Rajahalme
On Nov 21, 2013, at 3:47 PM, Marco Canini wrote: > Currently set_field_from_openflow is checking that the OFPVID_PRESENT bit is > set for a set VLAN_VID action to be valid. > I am reading the OF specs 1.2, 1.3 and 1.4, and I cannot see any mentioning > of OFPVID_PRESENT being required in this

Re: [ovs-dev] [PATCH net-next 7/8] openvswitch: Drop user features if old user space attempted to create datapath

2013-11-21 Thread Jesse Gross
On Thu, Nov 21, 2013 at 2:20 PM, Thomas Graf wrote: > On 11/21/13 at 06:23pm, Ben Hutchings wrote: >> On Thu, 2013-11-21 at 19:13 +0100, Thomas Graf wrote: >> > + >> > +/** >> > + * V2: >> >> This is not kernel-doc format so don't use '/**'. > > I was hoping kernel-doc would pick it up but it does

[ovs-dev] [PATCH] ofproto: Set-Field VLAN_VID should not check OFPVID_PRESENT

2013-11-21 Thread Marco Canini
Currently set_field_from_openflow is checking that the OFPVID_PRESENT bit is set for a set VLAN_VID action to be valid. I am reading the OF specs 1.2, 1.3 and 1.4, and I cannot see any mentioning of OFPVID_PRESENT being required in this context. OFPVID_PRESENT is used as a special VLAN_VID value fo

[ovs-dev] [PATCH v4 1/2] lib/util: Add clz32() and clz64().

2013-11-21 Thread Jarno Rajahalme
Count leading zeroes using builtin if available. Signed-off-by: Jarno Rajahalme --- v4: renamed clz as clz32, and raw_clz as raw_clz64. lib/util.c| 25 + lib/util.h| 21 + tests/library.at |1 + tests/test-util.c | 53 ++

Re: [ovs-dev] [PATCH v3 1/2] lib/util: Add clz() and clz64().

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 03:15:18PM -0800, Jarno Rajahalme wrote: > > On Nov 21, 2013, at 2:48 PM, Ben Pfaff wrote: > > > On Thu, Nov 21, 2013 at 02:25:30PM -0800, Jarno Rajahalme wrote: > >> Count leading zeroes using builtins if available. > >> > >> Signed-off-by: Jarno Rajahalme > > > > Cou

Re: [ovs-dev] [PATCH v3 1/2] lib/util: Add clz() and clz64().

2013-11-21 Thread Jarno Rajahalme
On Nov 21, 2013, at 2:48 PM, Ben Pfaff wrote: > On Thu, Nov 21, 2013 at 02:25:30PM -0800, Jarno Rajahalme wrote: >> Count leading zeroes using builtins if available. >> >> Signed-off-by: Jarno Rajahalme > > Could we rename raw_clz() to raw_clz64()? clz is a function that > doesn't make sense

[ovs-dev] [PATCH] rconn: Update comments on is_admitted_msg().

2013-11-21 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/rconn.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/rconn.c b/lib/rconn.c index f7f90f7..6c96fe0 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -1349,6 +1349,17 @@ is_connected_state(enum state state) return (state &

Re: [ovs-dev] [PATCH 1/3] dpif: Allow execute to modify the packet.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 02:36:59PM -0800, Jarno Rajahalme wrote: > > On Nov 21, 2013, at 1:55 PM, Ben Pfaff wrote: > > > On Fri, Nov 15, 2013 at 03:12:18PM -0800, Jarno Rajahalme wrote: > >> Allowing the packet to be modified by execution allows less data > >> copying for userspace action execut

Re: [ovs-dev] [PATCH v3 1/2] lib/util: Add clz() and clz64().

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 02:25:30PM -0800, Jarno Rajahalme wrote: > Count leading zeroes using builtins if available. > > Signed-off-by: Jarno Rajahalme Could we rename raw_clz() to raw_clz64()? clz is a function that doesn't make sense without a defined length. > +static inline int > +raw_clz(

Re: [ovs-dev] [PATCH 9/9] ofp-actions: add func to get inst name by OpenFlow instruction type directly.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:36PM +0800, Alexander Wu wrote: > V3: > First commit. Add translate function from OpenFlow enum to OVS-internal > enum. > > Signed-off-by: Alexander Wu I don't understand why the last patch in the series would add a function that doesn't get used. ___

Re: [ovs-dev] [PATCH 8/9] AT: Add tests for OFPMP_TABLE_FEATURES.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:35PM +0800, Alexander Wu wrote: > V3: > Update printable messages: instruction/action/oxm/next_table. > Update action features, now the actions are correct. > > V2: > Fix type of NEXT_TABLE_MISS > > V1: > Implement the at for OFPMP_TABLE_FEATURES. > (I've t

Re: [ovs-dev] [PATCH 5/9] ofp-print: Implement the function to print OFPMP_TABLE_FEATURES

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:32PM +0800, Alexander Wu wrote: > V3: > Modify type of element_size and print error if 0. > Fix CodingStyle. > Change print of next_tables msg, change enums to OFPUTIL_*. > Make all print human-readable. > > V2: > Change calls from ofputil. > Fix CodingSty

Re: [ovs-dev] [PATCH 7/9] rconn: Allow OFPMP_TABLE_FEATURES openflow messages.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:34PM +0800, Alexander Wu wrote: > V3: > No change. > > V2: > No change. > > V1: > Make the enums allowed > > Signed-off-by: Alexander Wu > Reviewed-by: Simon Horman This misjudges the purpose of this function. It does not deliver an "allow" or "drop" verdi

Re: [ovs-dev] [PATCH 1/3] dpif: Allow execute to modify the packet.

2013-11-21 Thread Jarno Rajahalme
On Nov 21, 2013, at 1:55 PM, Ben Pfaff wrote: > On Fri, Nov 15, 2013 at 03:12:18PM -0800, Jarno Rajahalme wrote: >> Allowing the packet to be modified by execution allows less data >> copying for userspace action execution. Some users of the >> dpif_execute already expect that the packet may be

Re: [ovs-dev] [PATCH 3/9] ofproto-provider: Add/Modify headers for OFPMP_TABLE_FEATURES in ofproto

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:30PM +0800, Alexander Wu wrote: > V3: > Add description for table-features get/set struct. > > V2: > No change. > > V1: > Add table_feature structs in ofproto && oftable to initialize. > The struct in ofproto is used to get > The struct in oftable is used t

[ovs-dev] [PATCH v3 1/2] lib/util: Add clz() and clz64().

2013-11-21 Thread Jarno Rajahalme
Count leading zeroes using builtins if available. Signed-off-by: Jarno Rajahalme --- lib/util.c| 25 + lib/util.h| 26 ++ tests/library.at |1 + tests/test-util.c | 53 +

Re: [ovs-dev] [PATCH net-next 7/8] openvswitch: Drop user features if old user space attempted to create datapath

2013-11-21 Thread Thomas Graf
On 11/21/13 at 06:23pm, Ben Hutchings wrote: > On Thu, 2013-11-21 at 19:13 +0100, Thomas Graf wrote: > > + > > +/** > > + * V2: > > This is not kernel-doc format so don't use '/**'. I was hoping kernel-doc would pick it up but it doesn't. I'll convert it. > > + if (info->genlhdr->versi

Re: [ovs-dev] [PATCH 2/9] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:29PM +0800, Alexander Wu wrote: > V3: > 1. Update names of functions/macros to make them meaningful. > 2. Fix codingstyle. > 3. Remove useless logic/struct/function. > 4. Make printable messages more friendly. > 5. Add OVS_ACTIONS macro to display all action

Re: [ovs-dev] [PATCH 1/9] ofp-msgs: Fix limits of OFPMP_TABLE_FEATURES.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:04:28PM +0800, Alexander Wu wrote: > V3: > No change. > > V2: > No change. > > V1: > Fix the limits to right ones. > > Signed-off-by: Alexander Wu > Reviewed-by: Simon Horman Applied to master, thanks! ___ dev mailin

Re: [ovs-dev] [PATCH 1/3] dpif: Allow execute to modify the packet.

2013-11-21 Thread Ben Pfaff
On Fri, Nov 15, 2013 at 03:12:18PM -0800, Jarno Rajahalme wrote: > Allowing the packet to be modified by execution allows less data > copying for userspace action execution. Some users of the > dpif_execute already expect that the packet may be modified. This > patch makes this behavior uniform a

Re: [ovs-dev] [PATCH 2/4] ofproto: Add enum ofp_table_config

2013-11-21 Thread Ben Pfaff
On Wed, Nov 13, 2013 at 03:28:39PM +0900, Simon Horman wrote: > On Tue, Nov 12, 2013 at 09:58:09PM -0800, Ben Pfaff wrote: > > On Tue, Nov 12, 2013 at 05:52:37PM -0800, Jarno Rajahalme wrote: > > > > > > > > > > On Nov 12, 2013, at 8:47 AM, Ben Pfaff wrote: > > > > > > > >> On Tue, Nov 12, 2013

Re: [ovs-dev] [PATCHv2 2/5] ofproto-dpif: Don't poll ports when nothing changes

2013-11-21 Thread Ben Pfaff
Maybe a new file in lib. On Thu, Nov 21, 2013 at 11:33:04AM -0800, Joe Stringer wrote: > Do you have any preference for where this lives? > > On 20 November 2013 14:45, Ben Pfaff wrote: > > On Wed, Nov 20, 2013 at 01:50:42PM -0800, Joe Stringer wrote: > >> On 20 November 2013 11:15, Ben Pfaff w

Re: [ovs-dev] [PATCH openvswitch] linux: Signal datapath that unaligned Netlink message can be received

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 10:49:00PM +0400, Sergei Shtylyov wrote: > On 21-11-2013 22:15, Thomas Graf wrote: > > >Following commit (''netlink: Do not enforce alignment of last Netlink > >attribute''), signal the ability to receive unaligned Netlink messages > >to the datapath to enable utilization o

Re: [ovs-dev] [PATCHv2 2/5] ofproto-dpif: Don't poll ports when nothing changes

2013-11-21 Thread Joe Stringer
Do you have any preference for where this lives? On 20 November 2013 14:45, Ben Pfaff wrote: > On Wed, Nov 20, 2013 at 01:50:42PM -0800, Joe Stringer wrote: >> On 20 November 2013 11:15, Ben Pfaff wrote: >> > I think that it is a little surprising to use a netdev sequence number >> > to track ch

Re: [ovs-dev] [PATCH] debian: Don't recreate bridges during manual restart.

2013-11-21 Thread Gurucharan Shetty
On Wed, Nov 20, 2013 at 3:26 PM, Ben Pfaff wrote: > On Wed, Nov 20, 2013 at 01:52:59PM -0800, Gurucharan Shetty wrote: >> Open vSwitch bridges and ports can be configured through >> the /etc/network/interfaces script. During system startup, >> Open vSwitch startup script reads the interfaces file

Re: [ovs-dev] [PATCH openvswitch] linux: Signal datapath that unaligned Netlink message can be received

2013-11-21 Thread Sergei Shtylyov
Hello. On 21-11-2013 22:15, Thomas Graf wrote: Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal the ability to receive unaligned Netlink messages to the datapath to enable utilization of zerocopy optimizations. Signed-off-by: Thomas Graf [...] di

Re: [ovs-dev] [PATCHv2 5/5] bridge: Only update instant_stats for active protocols

2013-11-21 Thread Joe Stringer
Indeed, I need to be more careful to ensure my implementation patches match my test observations. I'm not fully convinced of the need for a patch like this; My current plan is to tidy up the rest of the series, and do some further experiments before sending a separate follow-up for this. On 20 No

Re: [ovs-dev] [PATCH net-next 7/8] openvswitch: Drop user features if old user space attempted to create datapath

2013-11-21 Thread Ben Hutchings
On Thu, 2013-11-21 at 19:13 +0100, Thomas Graf wrote: > Drop user features if an outdated user space instance that does not > understand the concept of user_features attempted to create a new > datapath. > > Signed-off-by: Thomas Graf > Reviewed-by: Daniel Borkmann > --- > include/uapi/linux/op

[ovs-dev] [PATCH] Update subfacet stats for slow path flow

2013-11-21 Thread gyang
From: Guolin Yang The slow path stats are not updated which cause slow path flow to be deleted periodically. This patch update the slow path flow as fast path flow so that the flow will not be aged out. Another option is update the subfacet for slow path when packet is received and that is origi

[ovs-dev] [PATCH openvswitch] linux: Signal datapath that unaligned Netlink message can be received

2013-11-21 Thread Thomas Graf
Following commit (''netlink: Do not enforce alignment of last Netlink attribute''), signal the ability to receive unaligned Netlink messages to the datapath to enable utilization of zerocopy optimizations. Signed-off-by: Thomas Graf --- include/linux/openvswitch.h | 15 ++- lib/dpif-

Re: [ovs-dev] [PATCH] sparse: Include stdlib.h to ensure NULL is defined.

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 12:17:51PM +0900, Simon Horman wrote: > Include stdlib.h in include/sparse/sys/socket.h to ensure > that NULL is defined and thus avoid the following sparse warning. > > ./include/sparse/sys/socket.h:74:15: error: undefined identifier 'NULL' > > Signed-off-by: Simon Horman

[ovs-dev] [PATCH openvswitch] netlink: Implement & enable memory mapped netlink i/o

2013-11-21 Thread Thomas Graf
Based on the initial patch by Cong Wang posted a couple of months ago. This is the user space counterpart needed for the kernel patch '[PATCH net-next 3/8] openvswitch: Enable memory mapped Netlink i/o' Allows the kernel to construct Netlink messages on memory mapped buffers and thus avoids copyi

Re: [ovs-dev] Datpath in openVswitch

2013-11-21 Thread Ben Pfaff
On Thu, Nov 21, 2013 at 05:29:34AM +, Vivek Kumar (EPG) wrote: > data flow means Ethernet net packet traversing, so my doubt is: > > 1) After the packet receiving from Ethernet driver packet will traverse in > kernel space or in user space. > 2) This rule is applicable for all packet or fi

[ovs-dev] [PATCH net-next 8/8] openvswitch: Use skb_zerocopy() for upcall

2013-11-21 Thread Thomas Graf
Use of skb_zerocopy() can avoids the expensive call to memcpy() when copying the packet data into the Netlink skb. Completes checksum through skb_checksum_help() if needed. Zerocopy is only performed if user space supported unaligned Netlink messages. memory mapped netlink i/o is preferred over ze

[ovs-dev] [PATCH net-next 4/8] net: Export skb_zerocopy() to zerocopy from one skb to another

2013-11-21 Thread Thomas Graf
Make the skb zerocopy logic written for nfnetlink queue available for use by other modules. Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/linux/skbuff.h | 3 ++ net/core/skbuff.c| 85 net/netfilter/nfn

[ovs-dev] [PATCH net-next 3/8] openvswitch: Enable memory mapped Netlink i/o

2013-11-21 Thread Thomas Graf
Use memory mapped Netlink i/o for all unicast openvswitch communication if a ring has been set up. Benchmark * pktgen -> ovs internal port * 5M pkts, 5M flows * 4 threads, 8 cores Before: Result: OK: 67418743(c67108212+d310530) usec, 500 (9000byte,0frags) 74163pps 5339Mb/sec (53397360

[ovs-dev] [PATCH net-next 6/8] openvswitch: Allow update of dp with OVS_DP_CMD_NEW if NLM_F_REPLACE is set

2013-11-21 Thread Thomas Graf
Consolidates ovs_dp_cmd_new() and ovs_dp_cmd_set() to simplify handling and avoid code duplication. Allows user space to specify NLM_F_REPLACE with OVS_DP_CMD_NEW and overwrite the settings such as the user features of an existing datapath. Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann

[ovs-dev] [PATCH net-next 5/8] openvswitch: Allow user space to announce ability to accept unaligned Netlink messages

2013-11-21 Thread Thomas Graf
Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 4 net/openvswitch/datapath.c | 14 ++ net/openvswitch/datapath.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/

[ovs-dev] [PATCH net-next 7/8] openvswitch: Drop user features if old user space attempted to create datapath

2013-11-21 Thread Thomas Graf
Drop user features if an outdated user space instance that does not understand the concept of user_features attempted to create a new datapath. Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- include/uapi/linux/openvswitch.h | 11 ++- net/openvswitch/datapath.c | 10 ++

[ovs-dev] [PATCH net-next 1/8] genl: Add genlmsg_new_unicast() for unicast message allocation

2013-11-21 Thread Thomas Graf
Allocates a new sk_buff large enough to cover the specified payload plus required Netlink headers. Will check receiving socket for memory mapped i/o capability and use it if enabled. Will fall back to non-mapped skb if message size exceeds the frame size of the ring. Signed-of-by: Thomas Graf Rev

[ovs-dev] [PATCH net-next 0/8 v6] Open vSwitch upcall optimiziations

2013-11-21 Thread Thomas Graf
Reposting this before the merge window as it will go through Jesse's tree. Given jumbo frames, the capacity of the slow path is improved by a factor of 2.5x. V6: - Added memory mapped netlink i/o support - Drop user_features if old user space not aware of user features reuses an existi

[ovs-dev] [PATCH net-next 2/8] netlink: Avoid netlink mmap alloc if msg size exceeds frame size

2013-11-21 Thread Thomas Graf
An insufficent ring frame size configuration can lead to an unnecessary skb allocation for every Netlink message. Check frame size before taking the queue lock and allocating the skb and re-check with lock to be safe. Signed-off-by: Thomas Graf Reviewed-by: Daniel Borkmann --- net/netlink/af_ne

Re: [ovs-dev] No git tag for v2.0.0 ?

2013-11-21 Thread Ben Pfaff
On Wed, Nov 20, 2013 at 03:17:43PM -0800, Ben Pfaff wrote: > On Wed, Nov 20, 2013 at 01:17:11PM -0800, Bill Sommerfeld wrote: > > Unlike all the other releases I checked, I don't see a published tag > > in the git repo for openvswitch 2.0.0. > > > > I'm guessing this is a minor oversight and not i

Re: [ovs-dev] [PATCH v2 3/8] ofproto-provider: Add/Modify headers for OFPMP_TABLE_FEATURES in ofproto

2013-11-21 Thread Alexander Wu
Many thanks for review! On 13/11/2013 16:08, Simon Horman wrote: I think it would be quite helpful if you added some text describing the relationship between tf and otf: a) in the changelog b) above otf c) above tf On Wed, Nov 06, 2013 at 10:45:52PM +0800, Alexander Wu wrote: V2: No chang

Re: [ovs-dev] [PATCH v2 6/8] ofctl: Add ovs-ofctl dump-table-features.

2013-11-21 Thread Alexander Wu
Many thanks for review! On 13/11/2013 16:24, Simon Horman wrote: On Wed, Nov 06, 2013 at 10:46:10PM +0800, Alexander Wu wrote: V2: No change V1: Now the cli we implement is very crude. Maybe it could display better. Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- u

Re: [ovs-dev] [PATCH v2 1/8] ofp-msgs: Fix limits of OFPMP_TABLE_FEATURES.

2013-11-21 Thread Alexander Wu
Many thanks for review! On 13/11/2013 15:12, Simon Horman wrote: On Wed, Nov 06, 2013 at 10:45:26PM +0800, Alexander Wu wrote: V2: No change. V1: Fix the limits to right ones. Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- lib/ofp-msgs.h |4 ++-- 1 files changed

Re: [ovs-dev] [PATCH v2 7/8] rconn: Allow OFPMP_TABLE_FEATURES openflow messages.

2013-11-21 Thread Alexander Wu
Many thanks for review! On 13/11/2013 16:25, Simon Horman wrote: On Wed, Nov 06, 2013 at 10:46:12PM +0800, Alexander Wu wrote: V2: No change. V1: Make the enums allowed Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- lib/rconn.c |4 ++-- 1 files changed, 2 insert

Re: [ovs-dev] [PATCH v2 5/8] ofp-print: Implement the function to print OFPMP_TABLE_FEATURES

2013-11-21 Thread Alexander Wu
On 13/11/2013 16:24, Simon Horman wrote: On Wed, Nov 06, 2013 at 10:46:07PM +0800, Alexander Wu wrote: V2: Change calls of ofputil. Fix CodingStyle accoring to Simon Horman's suggestions. V1: Add function to print OFPMP_TABLE_FEATURES. But now the print is crude and dirty. Fix i

Re: [ovs-dev] [PATCH v2 4/8] ofproto: Add init/destroy funcs and handle OFPMP_TABLE_FEATURES msgs.

2013-11-21 Thread Alexander Wu
On 13/11/2013 16:21, Simon Horman wrote: On Wed, Nov 06, 2013 at 10:46:04PM +0800, Alexander Wu wrote: V2: 1. fix function align, align to 79 bytes, fix BE64 to UINT64, etc. 2. fix n_tables_miss init type. 3. Change calls from ofputil. Simon Horman suggestions: 1. Fix CodingStyle,

Re: [ovs-dev] [PATCH v2 2/8] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-11-21 Thread Alexander Wu
On 13/11/2013 16:21, Simon Horman wrote: On Wed, Nov 06, 2013 at 10:45:31PM +0800, Alexander Wu wrote: V2: Restructure implement of OFPMP_TABLE_FEATURES Change decode_*_raw to normalized pull functions 1. add macros and funcs to en/decode table features 2. restructure OFPMP_TABLE_F

[ovs-dev] [PATCH 8/9] AT: Add tests for OFPMP_TABLE_FEATURES.

2013-11-21 Thread Alexander Wu
V3: Update printable messages: instruction/action/oxm/next_table. Update action features, now the actions are correct. V2: Fix type of NEXT_TABLE_MISS V1: Implement the at for OFPMP_TABLE_FEATURES. (I've tested it via NOX-OF1.3 too.) Signed-off-by: Alexander Wu --- tests/ofp-print.at

[ovs-dev] [PATCH 3/9] ofproto-provider: Add/Modify headers for OFPMP_TABLE_FEATURES in ofproto

2013-11-21 Thread Alexander Wu
V3: Add description for table-features get/set struct. V2: No change. V1: Add table_feature structs in ofproto && oftable to initialize. The struct in ofproto is used to get The struct in oftable is used to set (set is not implement yet) Signed-off-by: Alexander Wu --- ofproto/ofprot

[ovs-dev] [PATCH 9/9] ofp-actions: add func to get inst name by OpenFlow instruction type directly.

2013-11-21 Thread Alexander Wu
V3: First commit. Add translate function from OpenFlow enum to OVS-internal enum. Signed-off-by: Alexander Wu --- lib/ofp-actions.c | 16 lib/ofp-actions.h |3 +++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index

[ovs-dev] [PATCH 5/9] ofp-print: Implement the function to print OFPMP_TABLE_FEATURES

2013-11-21 Thread Alexander Wu
V3: Modify type of element_size and print error if 0. Fix CodingStyle. Change print of next_tables msg, change enums to OFPUTIL_*. Make all print human-readable. V2: Change calls from ofputil. Fix CodingStyle accoring to Simon Horman's suggestions. V1: Add function to print OFPMP_TA

[ovs-dev] [PATCH 6/9] ofctl: Add ovs-ofctl dump-table-features.

2013-11-21 Thread Alexander Wu
V3: No change. V2: No change V1: Now the cli we implement is very crude. Maybe it could display better. Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- utilities/ovs-ofctl.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/utilities/o

[ovs-dev] [PATCH 7/9] rconn: Allow OFPMP_TABLE_FEATURES openflow messages.

2013-11-21 Thread Alexander Wu
V3: No change. V2: No change. V1: Make the enums allowed Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- lib/rconn.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rconn.c b/lib/rconn.c index f7f90f7..0f72a99 100644 --- a/lib/rconn.c +++ b/lib/

[ovs-dev] [PATCH 4/9] ofproto: handle OFPMP_TABLE_FEATURES msgs and its lifecycle.

2013-11-21 Thread Alexander Wu
V3: 1. Delete variable OFPIT13_END, use OFPIT13_METER directly. 2. Fix implement, restructure with macro. 3. Add comments that describe table-features-set message is not implement yet. 4. Update calls from ofp-util. 5. Update comments of action-init. V2: 1. fix function align, ali

[ovs-dev] [PATCH 2/9] ofp-util: Implement OFPMP_TABLE_FEATURES en/decode

2013-11-21 Thread Alexander Wu
V3: 1. Update names of functions/macros to make them meaningful. 2. Fix codingstyle. 3. Remove useless logic/struct/function. 4. Make printable messages more friendly. 5. Add OVS_ACTIONS macro to display all action features. V2: Restructure implement of OFPMP_TABLE_FEATURES Change de

[ovs-dev] [PATCH 0/9] Implement OFPMP_TABLE_FEATURES GET

2013-11-21 Thread Alexander Wu
Alexander Wu (9): ofp-msgs: Fix limits of OFPMP_TABLE_FEATURES. ofp-util: Implement OFPMP_TABLE_FEATURES en/decode ofproto-provider: Add/Modify headers for OFPMP_TABLE_FEATURES in ofproto ofproto: handle OFPMP_TABLE_FEATURES msgs and its lifecycle. ofp-print: Implement the function to

[ovs-dev] [PATCH 1/9] ofp-msgs: Fix limits of OFPMP_TABLE_FEATURES.

2013-11-21 Thread Alexander Wu
V3: No change. V2: No change. V1: Fix the limits to right ones. Signed-off-by: Alexander Wu Reviewed-by: Simon Horman --- lib/ofp-msgs.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index c526a15..26fd6a3 100644 --- a/lib/of