Re: [ovs-dev] [PATCH] datapath: Fix tunnel source port selection for mega flow

2013-07-03 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jul 3, 2013, at 1:58 , ext Andy Zhou wrote: > diff --git a/datapath/tunnel.c b/datapath/tunnel.c > index 9102786..18c3622 100644 > --- a/datapath/tunnel.c > +++ b/datapath/tunnel.c > @@ -186,7 +186,9 @@ u16 ovs_tnl_get_src_port(struct sk_buff *skb) > int low; > int high; > uns

Re: [ovs-dev] [PATCH 2/2] datapath: Restructure vxlan tunneling.

2013-07-02 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jul 2, 2013, at 1:28 , ext Pravin B Shelar wrote: > diff --git a/datapath/linux/compat/include/net/vxlan.h > b/datapath/linux/compat/include/net/vxlan.h > new file mode 100644 > index 000..76e0ddb > --- /dev/null > +++ b/datapath/linux/compat/include/net/vxlan.h > @@ -0,0 +1,43 @@ > +#ifn

Re: [ovs-dev] [PATCH 5/5] v2: dpif: Meter framework.

2013-07-01 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 29, 2013, at 0:59 , ext Jesse Gross wrote: > On Fri, Jun 28, 2013 at 10:50 AM, Ben Pfaff wrote: >> On Thu, Jun 27, 2013 at 01:39:52AM +0300, Jarno Rajahalme wrote: >>> >>> Signed-off-by: Jarno Rajahalme >>> --- >>> v2: Remove resetting of provider meter id on failure in dpif_meter_set()

Re: [ovs-dev] [PATCH] [RFC] Add OpenFlow 1.3 protocol support for meters.

2013-07-01 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 29, 2013, at 1:05 , ext Jesse Gross wrote: > On Tue, Jun 25, 2013 at 1:08 AM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> I also tried to figure out how the group table should be implemented. I >> haven't done anything for it yet, but I'm rather convinced

Re: [ovs-dev] [PATCH 2/3] ofp-util: Fix usable protocols check for IPv6.

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 28, 2013, at 19:46 , ext Ben Pfaff wrote: > On Fri, Jun 28, 2013 at 07:44:04PM +0300, Jarno Rajahalme wrote: >> Any protocol version can match dl_type=0x86dd, but only NXM and OXM can match >> IPv6 addresses, or nd_target. >> Update unit tests to check for this. >> >> Signed-off-by: Jarno

Re: [ovs-dev] [meters 0/9] Revised meters patch 4/5 proposal

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 28, 2013, at 19:33 , ext Ben Pfaff wrote: > On Fri, Jun 28, 2013 at 04:28:40PM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On Jun 28, 2013, at 19:09 , ext Ben Pfaff wrote: >> >>> On Fri, Jun 28, 2013 at 07:17:09AM +, Rajahalme,

Re: [ovs-dev] [meters 0/9] Revised meters patch 4/5 proposal

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 28, 2013, at 19:09 , ext Ben Pfaff wrote: > On Fri, Jun 28, 2013 at 07:17:09AM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On Jun 28, 2013, at 1:19 , ext Ben Pfaff wrote: >>> ofproto: Use another method to find meter_id. >> >> OK, wi

Re: [ovs-dev] [PATCH] datapath: Resolve external module dependencies.

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Now "make modules_install" works for me too, thanks. Jarno On Jun 28, 2013, at 3:26 , ext Jesse Gross wrote: > The Open vSwitch kernel module now has dependencies on symbols > exported by other kernel modules (currently just for GRE). In > order for it to load, the dependencies must be correct

Re: [ovs-dev] [PATCH 3/5] odp-util: Fix converting masked VLAN from flow.

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 28, 2013, at 4:43 , ext Jesse Gross wrote: > It's a validation limitation: if you have a vlan packet then you need > to have an exact match on a corresponding EtherType. If you only want > to match on the Ethernet header then it's fully maskable. > On OpenFlow (& meta-flow etc.) ethertyp

Re: [ovs-dev] [PATCH 4/5] flow: Only un-wildcard relevant IP headers.

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 28, 2013, at 4:16 , ext Justin Pettit wrote: ... > diff --git a/lib/flow.c b/lib/flow.c > index a42fea1..1a5084b 100644 > --- a/lib/flow.c > +++ b/lib/flow.c > @@ -781,7 +781,8 @@ flow_hash_symmetric_l4(const struct flow *flow, uint32_t > basis) > > /* Masks the fields in 'wc' that are us

Re: [ovs-dev] [partition v2 3/3] classifier: Speed up lookup when metadata partitions the flow table.

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
I sent some comments (mostly about comments it seems) earlier you may want to revisit (or not): http://openvswitch.org/pipermail/dev/2013-May/027297.html Jarno On Jun 28, 2013, at 1:30 , ext Ben Pfaff wrote: > We have a controller that puts many rules with different metadata values > into the

Re: [ovs-dev] [meters 0/9] Revised meters patch 4/5 proposal

2013-06-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 28, 2013, at 1:19 , ext Ben Pfaff wrote: > I spent some time looking at and playing with patch 4/5 "v2: ofproto: > Implement OpenFlow 1.3 meter table." and decided that there was a fair bit > that I wanted to tweak. This series represent what I came up with: > > IMPORTANT: In this series

Re: [ovs-dev] [PATCH 3/5] ofp-util: Meter fixes.

2013-06-27 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 27, 2013, at 3:13 , ext Ben Pfaff wrote: > On Thu, Jun 27, 2013 at 01:39:50AM +0300, Jarno Rajahalme wrote: >> Validate claimed message length for meter stats in ofp-util.c. >> Clean up meters in ofp-util.h. >> Fix the impossible duration values in ofp-print.at. >> >> Signed-off-by: Jarno

Re: [ovs-dev] [PATCH 2/2] datapath: Resolve external module dependencies.

2013-06-27 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 26, 2013, at 21:39 , ext Jesse Gross wrote: >> >> OK, so you need to use the kernel version from the "with-linux" option given >> to configure then? >> I have configured with --with-linux=/lib/modules/`uname -r`/build so that >> happened to work for me. > > Would you mind taking a look

Re: [ovs-dev] [RFC PATCH 3/8] ofp-util: Support for OpenFlow 1.3 meters.

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 25, 2013, at 20:35 , ext Ben Pfaff wrote: > On Thu, Jun 20, 2013 at 05:26:18PM +0300, Jarno Rajahalme wrote: >> >> Signed-off-by: Jarno Rajahalme > > I'm applied this to master. I'm appending the incremental that I > folded in. Most of the changes are minor improvements (some just > s

Re: [ovs-dev] [RFC PATCH 8/8] ovs-ofctl: Add meter support.

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 25, 2013, at 22:41 , ext Ben Pfaff wrote: > On Thu, Jun 20, 2013 at 05:26:23PM +0300, Jarno Rajahalme wrote: >> Adds commands add-meter, mod-meter, del-meter, del-meters, dump-meter, >> dump-meters, meter-stats, and meter-features. >> >> Syntax is as follows: >> >> add-meter meter= (kbp

Re: [ovs-dev] [RFC PATCH 4/8] ofproto: Implement OpenFlow 1.3 meter table.

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 25, 2013, at 22:38 , ext Ben Pfaff wrote: ... > I'm not fond of the structure of the new ofpacts_check_ctx(). At a > minimum, I think that ofpacts_check() should be a trivial wrapper > around it (just change ofpacts_check_ctx() to ignore 'ctx' if it's > NULL). But the inversion of control

Re: [ovs-dev] [RFC PATCH 4/8] ofproto: Implement OpenFlow 1.3 meter table.

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Ben, On a related note, the patch that you already applied added a new ofp_flow_removed_reason code OFPRR_METER_DELETE (in openflow-common.h). I intended to have some discussion on it, but forgot to point it out. There is a corresponding OFPRR_GROUP_DELETE reason code, but the OF spec does not

Re: [ovs-dev] [PATCH 2/2] datapath: Resolve external module dependencies.

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 26, 2013, at 18:27 , ext Jesse Gross wrote: > On Wed, Jun 26, 2013 at 8:05 AM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On Jun 25, 2013, at 22:31 , ext Jesse Gross wrote: >> >>> The Open vSwitch kernel module now has dependencies on symbols >

Re: [ovs-dev] WARNING: "gre_add_protocol" [...] undefined!

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 26, 2013, at 0:47 , ext Roam Pune wrote: ... i got same error, but then i found a way around it using following command: $ sudo insmod datapath/linux/openvswitch.ko insmod: error inserting 'datapath/linux/openvswitch.ko': -1 Unknown symbol in module $ sudo modprobe gre $ sudo insmod data

Re: [ovs-dev] [PATCH 2/2] datapath: Resolve external module dependencies.

2013-06-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 25, 2013, at 22:31 , ext Jesse Gross wrote: > The Open vSwitch kernel module now has dependencies on symbols > exported by other kernel modules (currently just for GRE). In > order for it to load, the dependencies must be correctly resolved > ahead of time. This runs depmod as part of the

Re: [ovs-dev] [PATCH] datapath: Factor out common UDP tunnel handling code.

2013-06-25 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 7, 2013, at 21:55 , ext Pravin Shelar wrote: > On Tue, May 7, 2013 at 11:13 AM, Jarno Rajahalme > wrote: >> This reduces repeated code and makes it easier to add new UDP tunneling >> protocols. >> > This approach is different from what tunnel upstream patches does. > Since there is no li

Re: [ovs-dev] WARNING: "gre_add_protocol" [...] undefined!

2013-06-25 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Me too, on Debian 3.2.46-1 x86_64 GNU/Linux Jarno On Jun 24, 2013, at 20:09 , ext Ben Pfaff wrote: > [oops, sorry, re-sending because I screwed up the list address on the > first try] > > I'm getting the following warnings in my OVS master build tree (commit > ede77a461fb "datapath: Fix a ke

Re: [ovs-dev] [PATCH] [RFC] Add OpenFlow 1.3 protocol support for meters.

2013-06-25 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 25, 2013, at 1:22 , ext Ben Pfaff wrote: > What I really want to do is reconcile the two patch series, so that we > can get the best features from both. Your code is always solid in my > experience, so I'm kind of inclined to just review yours and apply it, > and then go through the Cente

Re: [ovs-dev] [RFC PATCH 2/8] ofpacts_check: Remove unnecessary flow copying.

2013-06-24 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 20, 2013, at 23:36 , ext Ben Pfaff wrote: > On Thu, Jun 20, 2013 at 05:26:17PM +0300, Jarno Rajahalme wrote: >> >> Signed-off-by: Jarno Rajahalme > > I have mixed feelings here. On one hand, it is nice to avoid a big > copy in some cases (rare cases really). But on the other hand I am

Re: [ovs-dev] [PATCH] hindex: New data structure for hashed multimaps.

2013-06-18 Thread Rajahalme, Jarno (NSN - FI/Espoo)
All looks good and tests pass. However, I'd probably add a comment on the hindex.mask (in hindex.h) stating that it has a number of lowest order bits set, others cleared. After realizing that reading the code became a bit easier.. I also changed the cookie indexing to use this and it also passes a

Re: [ovs-dev] [RFC PATCH 2/2] ofproto: Index flows by cookie.

2013-06-18 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 18, 2013, at 0:18 , ext Ben Pfaff wrote: > On Mon, Jun 17, 2013 at 11:45:49AM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> On Jun 17, 2013, at 3:55 , Jarno Rajahalme wrote: >> >>> The simplest way for an OpenFlow controller to refer to a (set of) f

Re: [ovs-dev] [RFC PATCH 2/2] ofproto: Index flows by cookie.

2013-06-17 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 17, 2013, at 3:55 , Jarno Rajahalme wrote: > The simplest way for an OpenFlow controller to refer to a (set of) flows > is by a controller-issued flow cookie. Make this fast by inserting > flows with non-zero cookies to a hmap, and use that when flows are > queried with a full cookie mask.

Re: [ovs-dev] [PATCH 00/11] ofproto-dpif: Cleanup, reduce copying struct flow.

2013-06-13 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 13, 2013, at 1:16 , ext Ben Pfaff wrote: > On Fri, May 31, 2013 at 02:35:10PM +0300, Jarno Rajahalme wrote: >> The code in ofproto-dpif.c became harder on the eye after the reorg of >> struct xlate. This series tries cleaning that up a bit, and while at it, >> identifying and reducing unne

Re: [ovs-dev] [PATCH 2/3] datapath: Mega flow implementation

2013-06-12 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 10, 2013, at 20:04 , ext Jesse Gross wrote: > +static bool __flow_cmp_key_mask(struct sw_flow *flow, u32 hash, u8 *key, + int key_start, int key_len, + struct sw_flow_mask *mfm) +{ + return (flo

Re: [ovs-dev] [PATCH V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 12, 2013, at 2:10 , ext Alex Wang wrote: > Thanks Ben, > > This makes sense. But one thing is that if we compare to "ofp_port_t" > variables, e.g. "flow->in_port.ofp_port >= OFPP_MAX", we must call this > function for both operands. this seems to make coding harder, really want to > kn

Re: [ovs-dev] [PATCH 2/3] datapath: Mega flow implementation

2013-06-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
07, 2013 at 08:28:20PM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> It is in lib/util.h: >> >> lib/util.h:#define DIV_ROUND_UP(X, Y) (((X) + ((Y) - 1)) / (Y)) >> lib/util.h:#define ROUND_UP(X, Y) (DIV_ROUND_UP(X, Y) * (Y)) >> >> Jarno >> >

Re: [ovs-dev] [PATCH 2/3] datapath: Mega flow implementation

2013-06-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
dup(x, y) ( \ { \ const typeof(y) __y = y;\ (((x) + (__y - 1)) / __y) * __y;\ } On Fri, Jun 7, 2013 at 7:19 AM, Rajahalme, Jarno (NSN - FI/Espoo) mailto:jarno.rajaha...@nsn.com>> wrote: On Jun 7, 2013, at 13:35 , ext Andy Zhou wrote: Is

Re: [ovs-dev] [PATCH 2/3] datapath: Mega flow implementation

2013-06-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 7, 2013, at 13:35 , ext Andy Zhou wrote: Is this the same as DIV_ROUND_UP? I did not use it because DIV_ROUND_UP gives the roundup of u32, I needed the roundup in bytes. However, I could rewrite this function using DIV_ROUND_UP. There is ROUND_UP doing that already.

Re: [ovs-dev] [xc_v2 4/4] ofproto-dpif: Track relevant fields for wildcarding and add xout cache.

2013-06-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 7, 2013, at 12:03 , ext Justin Pettit wrote: ... > diff --git a/lib/flow.c b/lib/flow.c > index 6476029..db4ce1d 100644 > --- a/lib/flow.c > +++ b/lib/flow.c > @@ -759,6 +759,32 @@ flow_hash_symmetric_l4(const struct flow *flow, uint32_t > basis) > return jhash_bytes(&fields, sizeof fi

Re: [ovs-dev] [xc 4/4] ofproto-dpif: Track relevant fields for wildcarding and add xout cache.

2013-06-06 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 7, 2013, at 0:02 , ext Ben Pfaff wrote: > handle_flow_miss_without_facet() previously translated the actions for > each packet. Now, it translates the actions once (or not at all, if > there's an xc already). Won't this prevent slow protocols (e.g. CFM, > LACP, BFD) from working properly

Re: [ovs-dev] [xc 4/4] ofproto-dpif: Track relevant fields for wildcarding and add xout cache.

2013-06-06 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jun 7, 2013, at 1:34 , ext Justin Pettit wrote: > On Jun 5, 2013, at 10:43 PM, Ben Pfaff wrote: >> I think that struct xout_cache could use a top-level comment >> explaining its purpose and how it generally fits in with the rest of >> the system. > > /* A cache of xlate_out (xout) translatio

Re: [ovs-dev] (no subject)

2013-05-31 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 31, 2013, at 11:23 , ext Jesse Gross wrote: > On Fri, May 31, 2013 at 4:53 PM, Fan Du wrote: >> [ovs-dev] [PATCH] Use EEXIST as return error when adding vport >> >> Hi, Jesse >> >> Those two patches attempts to use EEXIST as return error when trying >> to add an vport which is actually a

Re: [ovs-dev] [xlate 1.11 9/9] ofproto-dpif: Revamp xlate_actions() interface.

2013-05-30 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 30, 2013, at 0:24 , ext Ethan Jackson wrote: > +/* Context used by xlate_actions() and its callees. */ > +struct xlate_ctx { > +struct xlate_in *xin; > +struct xlate_out *xout; > > -struct ofpbuf *odp_actions; /* Datapath actions. */ > -tag_type tags; /* Tags

Re: [ovs-dev] [PATCH] LISP: update documentation for "null" ports

2013-05-27 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 27, 2013, at 12:35 , ext Lorand Jakab wrote: > Since commit 0ad90c8 it is possible to set tunnel destination IP address > in the flow. This allows creating a LISP "map-cache" in the flow table. > Update the LISP documentation to reflect these possibilities. > > Signed-off-by: Lorand Jaka

Re: [ovs-dev] skb_gso_segment() bad offloads warnings fixed?

2013-05-26 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 24, 2013, at 19:26 , ext Jesse Gross wrote: > On Thu, May 23, 2013 at 9:41 PM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On May 23, 2013, at 20:28 , ext Jesse Gross wrote: >>> The upstream commit is not really right - the check should depend on >&g

Re: [ovs-dev] [PATCH v10 4/4] Add packet recirculation

2013-05-24 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Simon, Here is some initial review of the ofproto-dpif.c changes, Jarno On May 24, 2013, at 10:18 , ext Simon Horman wrote: > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > index 49f0270..8b1ccac 100644 > --- a/ofproto/ofproto-dpif.c > +++ b/ofproto/ofproto-dpif.c > @@ -43,6 +

Re: [ovs-dev] [PATCH] Implement duration fields in OpenFlow 1.3 port stats.

2013-05-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Ben, Tested, works, and looks good. I can now see port duration in "ovs-ofctl -O OpenFlow13 dump-ports br0" :-) Jarno On May 24, 2013, at 2:56 , ext Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > --- > OPENFLOW-1.1+ |3 ++- > lib/ofp-print.c|6 ++ > lib/ofp

Re: [ovs-dev] [PATCH v3] gre: Restructure tunneling.

2013-05-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Pravin, Please find some review comments below, Jarno On May 23, 2013, at 23:01 , ext Pravin B Shelar wrote: ... > diff --git a/datapath/linux/compat/gre.c b/datapath/linux/compat/gre.c > new file mode 100644 > index 000..c352ff8 > --- /dev/null > +++ b/datapath/linux/compat/gre.c > @@ -0,

Re: [ovs-dev] [PATCH] lib/dpif-netdev.c: Remove redundant call to flow_extract

2013-05-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 23, 2013, at 21:21 , ext Alex Wang wrote: Hey Ben, Just found, I think there are cases that a whole packet is wanted. In function "dp_netdev_execute_actions()", there are calls to functions like "push_mpls()" and "pop__mpls()", which requires the packet header pointers (e.g. l2_5, l2 )

Re: [ovs-dev] skb_gso_segment() bad offloads warnings fixed?

2013-05-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 23, 2013, at 20:28 , ext Jesse Gross wrote: > The upstream commit is not really right - the check should depend on > the origin of the packet, not the location in the networking stack > processing it. Most of the time these are somewhat the same but > obviously when bridging, received packe

[ovs-dev] skb_gso_segment() bad offloads warnings fixed?

2013-05-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
>From 0aa52d88bdf6bc22fed80beb175a6dfe420dfabd Mon Sep 17 00:00:00 2001 From: Cong Wang mailto:amw...@redhat.com>> Date: Wed, 6 Feb 2013 14:40:36 -0800 Subject: [PATCH] datapath: adjust skb_gso_segment() for calling in rx path skb_gso_segment() is almost always called in tx path, except for openvs

Re: [ovs-dev] [PATCH] ofp-util: Make ofputil_port_from_ofp11() return OFPP_NONE on error.

2013-05-20 Thread Rajahalme, Jarno (NSN - FI/Espoo)
This good, and thanks for clarifying the policy on function output parameters. Jarno On May 20, 2013, at 21:31 , ext Ben Pfaff wrote: > This makes life easier for a few callers, and it agrees with a general > principle that a function should fill in its output parameters whether it > succeeds

Re: [ovs-dev] [flow_metadata 0/5] improve and use flow_metadata more widely

2013-05-19 Thread Rajahalme, Jarno (NSN - FI/Espoo)
lean toward #2, but the world won't end if we don't do it. > > How do you feel about the first three patches? They are independent > of this bigger decision. > > I need to look at the zeros issue too, I can't quite remember why we > decided we didn't need them

Re: [ovs-dev] [flow_metadata 0/5] improve and use flow_metadata more widely

2013-05-12 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Getting rid of mostly dummy function parameters and duplication is always nice, but I'd like it better if there was a way not to have to see the "md." everywhere (start to miss C++ here..). Also, since we care about the zeros at the end of struct flow, maybe we should have them in struct flow_tn

Re: [ovs-dev] [PATCH 3/3] ofproto-dpif: Simplify ofproto_receive().

2013-05-09 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Looks good on all three counts, Jarno On May 8, 2013, at 23:23 , ext Ben Pfaff wrote: > The tunnel and non-tunnel paths were pretty much the same anyway, so this > commit simplifies by merging them. > > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto-dpif.c | 80 +--

Re: [ovs-dev] [PATCH 3/3] classifier: Speed up lookup when metadata partitions the flow table.

2013-05-08 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 8, 2013, at 11:13 , ext Rajahalme, Jarno (NSN - FI/Espoo) wrote: >> >>old_rule = insert_rule(cls, table, rule); >>if (!old_rule) { >> +if (minimask_get_metadata_mask(&rule->match.mask) == OVS_BE64_MAX) { >> +ovs_be64 m

Re: [ovs-dev] [PATCH 3/3] classifier: Speed up lookup when metadata partitions the flow table.

2013-05-08 Thread Rajahalme, Jarno (NSN - FI/Espoo)
I did not see this pushed yet, so here is a review: On Mar 27, 2013, at 6:32 , ext Ben Pfaff wrote: > We have a controller that puts many rules with different metadata values > into the flow table, where metadata is used (by "resubmit"s) to distinguish > stages in a pipeline. Thus, any given flo

Re: [ovs-dev] [bfd] bfd: Implement Bidirectional Forwarding Detection.

2013-05-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Ethan, Looking at the code, it seems to me that there is no link from BFD to OpenFlow PORT_STATUS message. I might be wrong, but it seems possible that BFD indicated port state changes could be communicated to the controller with the OFPPS_LIVE (= OFPUTIL_PS_LIVE) status bit, using the ofproto_

Re: [ovs-dev] [PATCH] datapath: Factor out common UDP tunnel handling code.

2013-05-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 7, 2013, at 21:55 , ext Pravin Shelar wrote: > On Tue, May 7, 2013 at 11:13 AM, Jarno Rajahalme > wrote: >> This reduces repeated code and makes it easier to add new UDP tunneling >> protocols. >> > This approach is different from what tunnel upstream patches does. > Since there is no li

Re: [ovs-dev] [PATCH 2/2] meta-flow: Make 'in_port' field writable.

2013-05-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Looks good, thanks :-) Jarno On May 7, 2013, at 1:38 , ext Ben Pfaff wrote: > OpenFlow says that an "output" action to a flow's input port is ordinarily > dropped, unless the flow explicitly outputs to OFPP_IN_PORT. We've > occasionally been asked to implement some way to avoid this behavior

Re: [ovs-dev] [PATCH 4/7] Keep all of tunnel metadata in flow.

2013-05-06 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 2, 2013, at 21:19 , ext Ben Pfaff wrote: > On Tue, Apr 30, 2013 at 05:21:28AM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On Apr 29, 2013, at 20:49 , ext Jesse Gross wrote: >> >>> On Sun, Apr 28, 2013 at 11:29 AM, Rajahalme,

Re: [ovs-dev] [PATCH 0/7] OpenFlow-level flow-based tunneling support

2013-05-06 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On May 2, 2013, at 21:21 , ext Ben Pfaff wrote: > There has been a lot of discussion on patch 4. Do you plan to update > and re-send the series, or do you expect further discussion or review > of the rest of the series before we go on? I have the rest of the series done, I was waiting for some

Re: [ovs-dev] [PATCH 4/7] Keep all of tunnel metadata in flow.

2013-05-02 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 30, 2013, at 18:54 , ext Jesse Gross wrote: > On Mon, Apr 29, 2013 at 10:21 PM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On Apr 29, 2013, at 20:49 , ext Jesse Gross wrote: >> >>> On Sun, Apr 28, 2013 at 11:29 AM, Rajahalme, Jarno (NSN - FI/Espo

Re: [ovs-dev] [PATCH 4/7] Keep all of tunnel metadata in flow.

2013-04-29 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 29, 2013, at 20:49 , ext Jesse Gross wrote: > On Sun, Apr 28, 2013 at 11:29 AM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> Another thing that I came to think only when reading Ben's new tutorial: >> Output to the input port is skipped. This would be

Re: [ovs-dev] [PATCH 4/7] Keep all of tunnel metadata in flow.

2013-04-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 28, 2013, at 21:29 , ext Rajahalme, Jarno (NSN - FI/Espoo) wrote: > > On Apr 27, 2013, at 0:43 , ext Jesse Gross wrote: > >> On Thu, Apr 18, 2013 at 8:07 AM, Jarno Rajahalme >> wrote: >>> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c >

Re: [ovs-dev] [PATCH 4/7] Keep all of tunnel metadata in flow.

2013-04-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 27, 2013, at 0:43 , ext Jesse Gross wrote: > On Thu, Apr 18, 2013 at 8:07 AM, Jarno Rajahalme > wrote: >> diff --git a/lib/match.c b/lib/match.c >> index 2aa4e89..222e5d7 100644 >> --- a/lib/match.c >> +++ b/lib/match.c >> @@ -133,13 +133,9 @@ match_wc_init(struct match *match, const stru

Re: [ovs-dev] [PATCH] datapath: Add basic MPLS support to kernel

2013-04-25 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 25, 2013, at 14:02 , ext Simon Horman wrote: > > Yes, stack_len is supposed to advance by one for each iteration of the loop. Better make it by four instead ;-) Jarno ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/lis

Re: [ovs-dev] [PATCH] datapath: Add basic MPLS support to kernel

2013-04-25 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 25, 2013, at 10:58 , ext Simon Horman wrote: > @@ -648,6 +650,7 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, > struct sw_flow_key *key, > return -ENOMEM; > > skb_reset_network_header(skb); > + skb_reset_mac_len(skb); > __skb_push(skb, skb->data

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

2013-04-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 23, 2013, at 4:51 , ext Simon Horman wrote: > On Mon, Apr 22, 2013 at 01:55:43PM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> Here the skb_network_header is changed to point to the L3 header. Is it >> significant that in some cases (?) mpls_stack_

Re: [ovs-dev] [PATCH 3/7] Restore all flow changes by compose_output_action__().

2013-04-23 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 22, 2013, at 19:16 , ext Ben Pfaff wrote: > On Mon, Apr 22, 2013 at 09:12:23AM -0700, Ben Pfaff wrote: >> On Thu, Apr 18, 2013 at 06:07:41PM +0300, Jarno Rajahalme wrote: >>> This makes sure that output actions leave no changes to any flow fields, >>> while all explicit set_field actions ar

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

2013-04-22 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 22, 2013, at 5:12 , ext Simon Horman wrote: > diff --git a/datapath/actions.c b/datapath/actions.c ... > +static int push_mpls(struct sk_buff *skb, > + const struct ovs_action_push_mpls *mpls, > + unsigned *mpls_stack_depth) > +{ > + __be32 *new_mpls_ls

Re: [ovs-dev] [PATCH] datapath: Add basic MPLS support to kernel

2013-04-19 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 19, 2013, at 10:41 , ext Simon Horman wrote: > diff --git a/datapath/actions.c b/datapath/actions.c > index 0dac658..2c923be 100644 > --- a/datapath/actions.c > +++ b/datapath/actions.c > @@ -38,6 +38,7 @@ > #include "vport.h" > > static int do_execute_actions(struct datapath *dp, struct

Re: [ovs-dev] [PATCH] MPLS: Add limited GSO support

2013-04-02 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Apr 3, 2013, at 8:24 , ext Simon Horman wrote: > In the case where a non-MPLS packet is recieved and an MPLS stack is > added it may well be the case that the original skb is GSO but the > NIC used for transmit does not support GSO of MPLS packets. > ... > diff --git a/include/linux/netdev_fe

Re: [ovs-dev] [PATCH] datapath: Integration with upstream kernel tunneling.

2013-04-02 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Mar 30, 2013, at 18:20 , ext Pravin B Shelar wrote: > diff --git a/datapath/linux/compat/include/linux/netdevice.h > b/datapath/linux/compat/include/linux/netdevice.h > index 71aad87..4ffdac4 100644 > --- a/datapath/linux/compat/include/linux/netdevice.h > +++ b/datapath/linux/compat/include/

Re: [ovs-dev] [PATCH] datapath: Integration with upstream kernel tunneling.

2013-04-02 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Mar 30, 2013, at 18:20 , ext Pravin B Shelar wrote: > Following patch restructure ovs tunneling to make use of kernel > api. Doing this tunneling code is simplified as most of protocol > processing on send and recv is pushed to kernel tunneling. This > way we can share most protocol related co

Re: [ovs-dev] [RFC PATCH 3/3] tunneling: Allow tunnel fragmentation by default.

2013-03-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Mar 27, 2013, at 1:47 , ext Jesse Gross wrote: > On Mon, Mar 25, 2013 at 12:03 PM, Jarno Rajahalme > wrote: >> Changes the default tunnel dont_fragment from "true" (don't >> fragment) to "false" (allow fragmentation). Tunnel outer headers >> will not have the DF bit set by default, and if "d

Re: [ovs-dev] [PATCH 3/3] datapath: Add basic MPLS support to kernel

2013-03-11 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Mar 9, 2013, at 16:54 , ext Simon Horman wrote: > It is not obvious to me how the behaviour relating to get_priority() as > described above can sensibly be reconciled with a desire to preserve the > order of actions. Or even reconciled with a looser constraint that actions > that need l3+ data

Re: [ovs-dev] [PATCH 3/3] datapath: Add basic MPLS support to kernel

2013-03-11 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Mar 9, 2013, at 16:54 , ext Simon Horman wrote: > On Thu, Mar 07, 2013 at 11:12:31AM -0800, Ben Pfaff wrote: >> On Thu, Mar 07, 2013 at 04:12:22AM +0100, Simon Horman wrote: >>> Perhaps Ben has some ideas, but it seems to me that the >>> way that execute_* and compose_* interact needs to be ch

Re: [ovs-dev] [PATCH] ofproto-dpif: GOTO_TABLE recursion removal.

2013-03-08 Thread Rajahalme, Jarno (NSN - FI/Espoo)
Ben, Thanks for fixing that up, looks good :-) Jarno On Mar 8, 2013, at 18:52 , ext Ben Pfaff wrote: > On Fri, Mar 08, 2013 at 03:50:12PM +0200, Jarno Rajahalme wrote: >> Remove recursion from GOTO_TABLE processing in do_xlate_actions(). >> This allows packet processing pipelines built with g

[ovs-dev] Any other planned use for userspace skb_mark?

2013-03-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
I recall someone mentioning on this list that the only planned use for skb_mark is for ipsec tunneling. At least currently this seems to be the case, as the only place where the skb_mark is set to a potentially non-zero value in userspace is in tnl_port_send(). The kernel datapath may also provi

Re: [ovs-dev] [PATCH 0/3 v2.20] MPLS actions and matches

2013-02-28 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 28, 2013, at 11:15 , ext Simon Horman wrote: > * Implement recirculation and a host of more sophisticated MPLS features > including: > - copy_ttl_in > - copy_ttl_out > - L3+ actions on MPLS frames (e.g. pop_mpls(0x800),set_ttl) > - multi-level mpls_pop and mpls_push > * Other more speci

Re: [ovs-dev] [PATCHv3] Add support for LISP tunneling

2013-02-20 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 20, 2013, at 11:00 , ext Lorand Jakab wrote: > +static int lisp_tnl_send(struct vport *vport, struct sk_buff *skb) > +{ > + int network_offset = skb_network_offset(skb); > + > + /* We only encapsulate IPv4 and IPv6 packets */ > + switch (skb->protocol) { > + case htons(ETH_

Re: [ovs-dev] [PATCH] Tunnel: Cleanup old tunnel infrastructure.

2013-02-20 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 20, 2013, at 18:00 , ext Kyle Mestery (kmestery) wrote: > On Feb 19, 2013, at 7:35 PM, Pravin B Shelar wrote: >> Since userspace flow based tunneling code is checked in, the kernel >> port based tunneling code can be removed. Following patch removes >> this tunnel compatibility code and s

Re: [ovs-dev] [PATCH 03/11] datapath: Fold key_len and hash into sw_flow_key.

2013-02-20 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 19, 2013, at 21:38 , ext Jesse Gross wrote: > On Mon, Feb 18, 2013 at 12:13 AM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> I'd be happy to break it apart. >> >> In datapath.c ovs_flow_cmd_build_info(), there is first a call to >> ovs_fl

Re: [ovs-dev] [PATCH 03/11] datapath: Fold key_len and hash into sw_flow_key.

2013-02-18 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 16, 2013, at 1:19 , ext Jesse Gross wrote: > On Mon, Feb 11, 2013 at 6:46 AM, Jarno Rajahalme > wrote: >> Store key_len and hash fields at the end of struct sw_flow_key, past the >> area being hashed. >> Rename functions operating on keys from "_flow_" to "_flow_key_". >> Shift the respon

Re: [ovs-dev] [PATCHv2] Add support for LISP tunneling

2013-02-14 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 13, 2013, at 16:44 , ext Lorand Jakab wrote: > +static int lisp_tnl_send(struct vport *vport, struct sk_buff *skb) > +{ > + int network_offset = skb_network_offset(skb); > + > + /* We only encapsulate IPv4 and IPv6 packets */ > + switch (ntohs(skb->protocol)) { > + case ETH_

Re: [ovs-dev] [ext-272 0/4] Implement EXT-272 (role reply generation_ids)

2013-02-12 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 12, 2013, at 18:52 , ext Ben Pfaff wrote: > On Tue, Feb 12, 2013 at 03:31:16PM +0000, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> The patches look good, but as I haven't seen the EXT-272, I don't know >> if there is a possible conflict with the all-one

Re: [ovs-dev] [PATCH 00/11] RFC: Improvements in upcall processing code path.

2013-02-12 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 13, 2013, at 0:03 , ext Ben Pfaff wrote: > On Mon, Feb 11, 2013 at 04:46:16PM +0200, Jarno Rajahalme wrote: >> - 'udpping' sends 1000 UDP packets with a unique source and destination >> port pair to br0 in bursts of 97 packets. Between bursts it nanosleeps >> for 50 nanoseconds. Th

Re: [ovs-dev] [ext-272 0/4] Implement EXT-272 (role reply generation_ids)

2013-02-12 Thread Rajahalme, Jarno (NSN - FI/Espoo)
The patches look good, but as I haven't seen the EXT-272, I don't know if there is a possible conflict with the all-ones value returned when the generation id is undefined. Have you proposed to exclude the all-ones value from the set of valid generation ID values? Or does it matter? Jarno On

Re: [ovs-dev] [PATCH 01/11] dpif: Pool dpif_recv() calls.

2013-02-11 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 12, 2013, at 1:54 , ext Ben Pfaff wrote: > On Mon, Feb 11, 2013 at 04:46:17PM +0200, Jarno Rajahalme wrote: >> Take ofproto-dpif upcall recv pooling down to the system call interface. >> >> Signed-off-by: Jarno Rajahalme > > I tried this out with my test case. I found that it yields a

Re: [ovs-dev] [PATCH] classifier: Refactor table priority updates and tables_priority reordering.

2013-02-11 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 11, 2013, at 20:35 , ext Ben Pfaff wrote: > I find this organization clearer. > Agree, but see the minor comments below, Jarno > CC: Jarno Rajahalme > Signed-off-by: Ben Pfaff > --- > lib/classifier.c | 190 -- > 1 files changed, 1

Re: [ovs-dev] [PATCH] classifier: Skip tables if priorities guarantee no match.

2013-02-07 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 7, 2013, at 22:36 , ext Ben Pfaff wrote: > With complicated flow tables and multiple levels of resubmit, I see > flow setup performance improvements of up to 5-6% with this patch. > I played around with the same issue last week and came up with a little bit different solution. I think I

Re: [ovs-dev] [PATCH] RFC: Pass more packet and flow key info to userspace.

2013-02-06 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Feb 6, 2013, at 2:57 , ext Jesse Gross wrote: >> >> While I would not see a problem in passing a key hash computed with an >> undisclosed algorithm up to userspace, I see your point. >> >> In my tests it seems that about 1/3 of the benefit is attainable with >> deferred >> layer pointer comp

Re: [ovs-dev] [PATCH] RFC: Pass more packet and flow key info to userspace.

2013-02-05 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jan 31, 2013, at 3:19 , ext Jesse Gross wrote: > On Wed, Jan 30, 2013 at 3:14 AM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> Otherwise not so much use of the layer pointers, but >> dpif_flow_stats_extract() >> does packet_get_tcp_flags(),

Re: [ovs-dev] [PATCH] RFC: Pass more packet and flow key info to userspace.

2013-01-30 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jan 30, 2013, at 2:59 , ext Jesse Gross wrote: > On Tue, Jan 29, 2013 at 7:10 AM, Rajahalme, Jarno (NSN - FI/Espoo) > wrote: >> >> On Jan 24, 2013, at 19:41 , ext Jesse Gross wrote: >> >>> On Thu, Jan 24, 2013 at 7:34 AM, Jarno Rajahalme >>> w

Re: [ovs-dev] [PATCH] RFC: Pass more packet and flow key info to userspace.

2013-01-29 Thread Rajahalme, Jarno (NSN - FI/Espoo)
On Jan 24, 2013, at 19:41 , ext Jesse Gross wrote: > On Thu, Jan 24, 2013 at 7:34 AM, Jarno Rajahalme > wrote: >> >> On Jan 23, 2013, at 19:30 , ext Jesse Gross wrote: >> >>> On Tue, Jan 22, 2013 at 9:48 PM, Jarno Rajahalme >>> wrote: Add OVS_PACKET_ATTR_KEY_INFO to relieve userspace fro