Re: [ovs-dev] [PATCH 1/2] nx-match: New function nxm_read_field_bits().

2011-08-11 Thread Ethan Jackson
sure no problem. Ethan On Thu, Aug 11, 2011 at 21:44, Ben Pfaff wrote: > On Thu, Aug 11, 2011 at 07:47:27PM -0700, Ethan Jackson wrote: >> This patch also fixes a bug introduced in Commit 43edca57 >> "nx-match: New helpers.", which caused the "move" action to >> improperly handle bit ranges. > >

Re: [ovs-dev] [PATCH 5/6] nx-match: New function nxm_read_field().

2011-08-11 Thread Ben Pfaff
On Thu, Aug 11, 2011 at 07:47:23PM -0700, Ethan Jackson wrote: > > The return value semantics of nxm_read_field() are surprising in that > > it just masks off the bits not being read. ?If I had not read the code > > for the function, I would have guessed that it also shifted the bits > > so that th

Re: [ovs-dev] [PATCH 1/2] nx-match: New function nxm_read_field_bits().

2011-08-11 Thread Ben Pfaff
On Thu, Aug 11, 2011 at 07:47:27PM -0700, Ethan Jackson wrote: > This patch also fixes a bug introduced in Commit 43edca57 > "nx-match: New helpers.", which caused the "move" action to > improperly handle bit ranges. I assume that a minimal fix would be much shorter? Would you mind writing that u

Re: [ovs-dev] [PATCH 5/6] nx-match: New function nxm_read_field().

2011-08-11 Thread Ethan Jackson
> The return value semantics of nxm_read_field() are surprising in that > it just masks off the bits not being read.  If I had not read the code > for the function, I would have guessed that it also shifted the bits > so that the least-significant bit being read was the least-significant > bit in t

[ovs-dev] [PATCH 1/2] nx-match: New function nxm_read_field_bits().

2011-08-11 Thread Ethan Jackson
nxm_read_field_bits() simplifies reading of NXM fields with an ofs_nbits parameter. This patch updates nxm_execute_reg_move() to use the new function. A user outside of the nx-match module will be added in future patches. This patch also fixes a bug introduced in Commit 43edca57 "nx-match: New h

[ovs-dev] [PATCH 2/2] tests: test "load" and "move" actions.

2011-08-11 Thread Ethan Jackson
--- tests/ofproto-dpif.at | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 846eccb..ea66bb4 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -17,3 +17,28 @@ AT_CHECK([tail -1 stdou

Re: [ovs-dev] [PATCH] Simplify kernel sFlow implementation

2011-08-11 Thread Ben Pfaff
The 64-bit packed field is just an intermediate step. I agree that it is somewhat ugly. It will be replaced by a unique ID of one kind or another (an incrementing counter? random number?) either when it gets to be too small, or when we decide to fix up the stats race window I described earlier.

Re: [ovs-dev] [PATCH] Simplify kernel sFlow implementation

2011-08-11 Thread Neil McKee
OK. Makes sense. It might be OK from an sFlow perspective if the user-space lookup occasionally fails.Just as long as it never retrieves the wrong action-list. That would be a problem. If you can look up the actions in user-space, do you still need to generate that 64-bit packed-field?

Re: [ovs-dev] [PATCH 1/2] nx-match: Change ofs and n_bits parameters to unsigned ints.

2011-08-11 Thread Ethan Jackson
For the record, I decided to drop this patch. EThan On Thu, Aug 11, 2011 at 12:29, Ben Pfaff wrote: > On Thu, Aug 11, 2011 at 11:53:42AM -0700, Ethan Jackson wrote: >> It doesn't make sense for either of these parameters to be >> negative. This seems more intuitive. > > OK, but can you also adju

Re: [ovs-dev] [PATCH 2/2] nx-match: Update register check functions.

2011-08-11 Thread Ben Pfaff
On Thu, Aug 11, 2011 at 11:53:43AM -0700, Ethan Jackson wrote: > This patch simplifies the API of nxm_dst_check() and adds a new > function nxm_src_check() for checking source fields. > --- > > Come to think of it, I don't really like the interface of either > nxm_dst_check() or nxm_src_check().

Re: [ovs-dev] [PATCH 1/2] nx-match: Change ofs and n_bits parameters to unsigned ints.

2011-08-11 Thread Ben Pfaff
On Thu, Aug 11, 2011 at 11:53:42AM -0700, Ethan Jackson wrote: > It doesn't make sense for either of these parameters to be > negative. This seems more intuitive. OK, but can you also adjust the callers of nxm_decode_ofs() and nxm_decode_n_bits() that currently assign the return values to `int's?

[ovs-dev] [PATCH 2/2] nx-match: Update register check functions.

2011-08-11 Thread Ethan Jackson
This patch simplifies the API of nxm_dst_check() and adds a new function nxm_src_check() for checking source fields. --- Come to think of it, I don't really like the interface of either nxm_dst_check() or nxm_src_check(). What do you think of something like this? --- lib/autopath.c | 11

[ovs-dev] [PATCH 1/2] nx-match: Change ofs and n_bits parameters to unsigned ints.

2011-08-11 Thread Ethan Jackson
It doesn't make sense for either of these parameters to be negative. This seems more intuitive. --- lib/nx-match.c |7 --- lib/nx-match.h |9 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/nx-match.c b/lib/nx-match.c index ecc284e..cc29c6c 100644 --- a/lib

Re: [ovs-dev] [PATCH] Simplify kernel sFlow implementation

2011-08-11 Thread Ben Pfaff
Neil, don't worry! This really is a step forward and not a step back. The actions passed to the kernel and back to userspace are not really as helpful as you think, because they discard a lot of semantic information. These actions do say *what* happened but they do not say *why*. One off-the-cuf

Re: [ovs-dev] [PATCH] Simplify kernel sFlow implementation

2011-08-11 Thread Neil McKee
I think the current behavior where the whole actions-list is serialized and passed up with the sample is actually really elegant and future-proof. New actions are being added all the time, and having access to a sampled-stream of "exactly-what-is-happening-in-there" is always going to be good

Re: [ovs-dev] [PATCH] ovs-ofctl: Document that all actions are supported now.

2011-08-11 Thread Ben Pfaff
Thanks, I pushed this one. On Thu, Aug 11, 2011 at 10:50:04AM -0700, Ethan Jackson wrote: > Looks good, > > Ethan > > On Thu, Aug 11, 2011 at 09:10, Ben Pfaff wrote: > > This comment must be very old. ?ovs-ofctl has supported all the OpenFlow > > and Nicira extensions actions for a long time no

Re: [ovs-dev] [PATCH 3/6] flow: New FLOW_WC_SEQ build assertion.

2011-08-11 Thread Ben Pfaff
Looks good, thank you. On Thu, Aug 11, 2011 at 10:48:40AM -0700, Ethan Jackson wrote: > Thanks for the review, I added the following comment. > > /* This sequence number should be incremented whenever anything involving > flows > * or the wildcarding of flows changes. This will cause build ass

Re: [ovs-dev] [PATCH] ovs-ofctl: Document that all actions are supported now.

2011-08-11 Thread Ethan Jackson
Looks good, Ethan On Thu, Aug 11, 2011 at 09:10, Ben Pfaff wrote: > This comment must be very old.  ovs-ofctl has supported all the OpenFlow > and Nicira extensions actions for a long time now. > --- >  utilities/ovs-ofctl.8.in |    4 >  1 files changed, 0 insertions(+), 4 deletions(-) > >

Re: [ovs-dev] [PATCH 3/6] flow: New FLOW_WC_SEQ build assertion.

2011-08-11 Thread Ethan Jackson
Thanks for the review, I added the following comment. /* This sequence number should be incremented whenever anything involving flows * or the wildcarding of flows changes. This will cause build assertion * failures in places which likely need to be updated. */ #define FLOW_WC_SEQ 1 On Wed, Au

Re: [ovs-dev] [PATCH 6/6] nicra-ext: New action NXAST_OUTPUT_REG.

2011-08-11 Thread Ben Pfaff
On Wed, Aug 10, 2011 at 05:21:43PM -0700, Ethan Jackson wrote: > The NXAST_OUTPUT_REG outputs to the OpenFlow port contained in a > supplied NXM field. I think that the NEWS item should say that we've added an OpenFlow extension to output to the port given in a field, instead of just saying that "

Re: [ovs-dev] [PATCH 5/6] nx-match: New function nxm_read_field().

2011-08-11 Thread Ben Pfaff
On Wed, Aug 10, 2011 at 05:21:42PM -0700, Ethan Jackson wrote: > nxm_read_field() simplifies reading of NXM fields with an ofs_nbits > parameter. This patch updates nxm_execute_reg_move() to use the > new function. A user outside of the nx-match module will be added > in future patches. The retu

Re: [ovs-dev] [PATCH 4/6] nx-match: New function nxm_src_check().

2011-08-11 Thread Ben Pfaff
On Wed, Aug 10, 2011 at 05:21:41PM -0700, Ethan Jackson wrote: > This patch also updates nxm_check_reg_move() to use nxm_src_check() > and nxm_dst_check(). A user outside of nxm-match will be added in > a future patch. I have a similar patch in the branch that I'm working on, too. The only impor

[ovs-dev] [PATCH] ovs-ofctl: Document that all actions are supported now.

2011-08-11 Thread Ben Pfaff
This comment must be very old. ovs-ofctl has supported all the OpenFlow and Nicira extensions actions for a long time now. --- utilities/ovs-ofctl.8.in |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index aa37969..b0