Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix freeing uninitialized "struct xlate_out".

2013-10-10 Thread Ben Pfaff
That's a non-static function, or an extern function, or a function with external linkage. That sounds fine to me. On Thu, Oct 10, 2013 at 11:14:47PM -0700, Alex Wang wrote: > I mean non static function, > > I don't know if there is a term for that, > > > On Thu, Oct 10, 2013 at 11:12 PM, Ben P

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix freeing uninitialized "struct xlate_out".

2013-10-10 Thread Alex Wang
I mean non static function, I don't know if there is a term for that, On Thu, Oct 10, 2013 at 11:12 PM, Ben Pfaff wrote: > What's a normal function? > > On Thu, Oct 10, 2013 at 11:08:23PM -0700, Alex Wang wrote: > > Hey Ben, > > > > With your change of execute_actions() function in > ofproto/o

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix freeing uninitialized "struct xlate_out".

2013-10-10 Thread Ben Pfaff
What's a normal function? On Thu, Oct 10, 2013 at 11:08:23PM -0700, Alex Wang wrote: > Hey Ben, > > With your change of execute_actions() function in ofproto/ofproto-dpif.c, I > think it is better to reuse that code, > > So, I want to convert the execute_actions() as normal function. And use it

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix freeing uninitialized "struct xlate_out".

2013-10-10 Thread Alex Wang
Hey Ben, With your change of execute_actions() function in ofproto/ofproto-dpif.c, I think it is better to reuse that code, So, I want to convert the execute_actions() as normal function. And use it in the xlate_send_packet(). How do you think? Thanks, Alex Wang, On Thu, Oct 10, 2013 at 10:5

[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix freeing uninitialized "struct xlate_out".

2013-10-10 Thread Alex Wang
Commit 91d6cd12 (ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.) introduced the bug that uninit the "struct xlate_out" when the struct is not initialized. This commit fixes the bug. Reported-by: Simon Horman Signed-off-by: Alex Wang --- ofproto/ofproto-dpif-xlate.c |3 +--

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Alex Wang
My patch 91d6cd12 (ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.) introduced a bug. (call xlate_out_uninit() when xout is uninitialized) I'll send a fix soon, Thanks for reporting that, On Thu, Oct 10, 2013 at 10:13 PM, Alex Wang wrote: > Hi Simon, > > Just to confirm with yo

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Alex Wang
Hi Simon, Just to confirm with you, Are these two tests broken? 1: bfd - basic config on different bridges 2: bfd - Verify tunnel down detection All other tests passed? Thanks, Alex Wang On Thu, Oct 10, 2013 at 9:47 PM, Simon Horman wrote: > Hi Ethan, > > I have investigated slightly furth

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Alexei Starovoitov
On Thu, Oct 10, 2013 at 8:56 PM, Jesse Gross wrote: > On Thu, Oct 10, 2013 at 5:47 PM, Alexei Starovoitov wrote: >> On Thu, Oct 10, 2013 at 3:38 PM, Pravin Shelar wrote: >>> On Thu, Oct 10, 2013 at 1:48 PM, Alexei Starovoitov >>> wrote: On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wro

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Simon Horman
Hi Ethan, I have investigated slightly further and it seems that the problem does not manifest when compiling with clang but does manifest when compiling with gcc. # clang --version Debian clang version 3.4-1~exp1 (trunk) (based on LLVM 3.4) Target: x86_64-pc-linux-gnu Thread model: posix # cc -

[ovs-dev] [PATCH v6 2/4] ofproto-dpif: Implement group callbacks

2013-10-10 Thread Simon Horman
This is a first step towards implementing the dpif side of groups. In order to be useful the action translation code needs to be taught about groups. Signed-off-by: Simon Horman --- v4 - v6 * No change v3 * Rebase for "ofproto-dpif: Hide struct rule_dpif internally" * Hide group_dpif in a sim

[ovs-dev] [PATCH v6 0/4] Write-Actions and Groups

2013-10-10 Thread Simon Horman
Hi, After a bit of a hiatus I would like to revisit this series. I have rebased it and addressed the issues which I felt were conclusively discussed in response to v3 of this patchset. This series is comprised of two components. A. Support write actions. With this in place it is possible to

[ovs-dev] [PATCH v6 3/4] Translation of indirect and all groups

2013-10-10 Thread Simon Horman
Allow translation of indirect and all groups. Also allow insertion of indirect and all groups by changing the maximum permitted number in the groups table from 0 to OFPG_MAX. Implementation note: After translating the actions for each bucket ctx->flow is reset to its state prior to translation o

[ovs-dev] [PATCH v6 1/4] Add support for write-actions

2013-10-10 Thread Simon Horman
Implementation note: All actions which modify a field are added to the action set at the point where "set" actions should be added. In general modifying a field many times is the same as only modifying it the last time so the implementation simply adds all set actions to the action set in the orde

[ovs-dev] [PATCH v6 4/4] Translation of fast failover groups

2013-10-10 Thread Simon Horman
Fast failover groups use the actions in the first bucket that is alive. Signed-off-by: Simon Horman --- v6 * First post --- ofproto/ofproto-dpif-xlate.c | 97 +++- ofproto/ofproto-dpif-xlate.h | 3 +- ofproto/ofproto-dpif.c | 4 +- ofproto/ofprot

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Ethan Jackson
I can't reproduce the failure, are you still seeing it? Ethan On Thu, Oct 10, 2013 at 9:07 PM, Ethan Jackson wrote: > Looking into it, should have checked before merging. > > Ethan > > On Thu, Oct 10, 2013 at 9:05 PM, Simon Horman wrote: >> Curiously, making the stub non-static seems to break >

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Ethan Jackson
Looking into it, should have checked before merging. Ethan On Thu, Oct 10, 2013 at 9:05 PM, Simon Horman wrote: > Curiously, making the stub non-static seems to break > at least the first two tests of the test-suite. > I assume its exposing a bug but I haven't investigated further. > > On Thu, O

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Simon Horman
Curiously, making the stub non-static seems to break at least the first two tests of the test-suite. I assume its exposing a bug but I haven't investigated further. On Thu, Oct 10, 2013 at 06:18:17PM -0700, Ethan Jackson wrote: > Oops didn't notice that it was. I'll change it before merging. > >

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Jesse Gross
On Thu, Oct 10, 2013 at 5:47 PM, Alexei Starovoitov wrote: > On Thu, Oct 10, 2013 at 3:38 PM, Pravin Shelar wrote: >> On Thu, Oct 10, 2013 at 1:48 PM, Alexei Starovoitov >> wrote: >>> On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wrote: On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoito

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Ethan Jackson
Oops didn't notice that it was. I'll change it before merging. Ethan On Thu, Oct 10, 2013 at 6:02 PM, Ben Pfaff wrote: > On Thu, Oct 10, 2013 at 05:57:51PM -0700, Ethan Jackson wrote: >> Stubs must be uninitialized when used in case they allocate memory. >> >> Signed-off-by: Ethan Jackson > >

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Alex Wang
Thanks Ben for pointing it out, another mistake I made, There is reason for it to be 'static'. On Thu, Oct 10, 2013 at 6:02 PM, Ben Pfaff wrote: > On Thu, Oct 10, 2013 at 05:57:51PM -0700, Ethan Jackson wrote: > > Stubs must be uninitialized when used in case they allocate memory. > > > > Sign

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Alex Wang
Thanks Ethan, Looks good to me, On Thu, Oct 10, 2013 at 5:57 PM, Ethan Jackson wrote: > Stubs must be uninitialized when used in case they allocate memory. > > Signed-off-by: Ethan Jackson > --- > ofproto/ofproto-dpif-monitor.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletion

Re: [ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Ben Pfaff
On Thu, Oct 10, 2013 at 05:57:51PM -0700, Ethan Jackson wrote: > Stubs must be uninitialized when used in case they allocate memory. > > Signed-off-by: Ethan Jackson Also, stubs shouldn't ordinarily be static, any particular reason the one here is? Acked-by: Ben Pfaff

[ovs-dev] [PATCH] monitor: Fix improper use of stubs.

2013-10-10 Thread Ethan Jackson
Stubs must be uninitialized when used in case they allocate memory. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-monitor.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dpif-monitor.c index a0c3843..75fd

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Alexei Starovoitov
On Thu, Oct 10, 2013 at 3:38 PM, Pravin Shelar wrote: > On Thu, Oct 10, 2013 at 1:48 PM, Alexei Starovoitov wrote: >> On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wrote: >>> On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoitov >>> wrote: On Wed, Oct 9, 2013 at 11:07 PM, Pravin Shelar w

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Pravin Shelar
On Thu, Oct 10, 2013 at 1:48 PM, Alexei Starovoitov wrote: > On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wrote: >> On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoitov >> wrote: >>> On Wed, Oct 9, 2013 at 11:07 PM, Pravin Shelar wrote: On Wed, Oct 9, 2013 at 9:11 PM, Alexei Starovoitov

Re: [ovs-dev] [ipfix-bug 3/3] ofproto-dpif: Enable NXAST_SAMPLE only if the datapath supports it.

2013-10-10 Thread Romain Lenglet
On Oct 10, 2013, at 2:56 PM, Romain Lenglet wrote: > On Oct 7, 2013, at 2:33 PM, Ben Pfaff wrote: > >> This prevents using an older datapath from breaking forwarding. >> >> CC: Romain Lenglet >> Signed-off-by: Ben Pfaff >> --- >> ofproto/ofproto-dpif-ipfix.c | 28 ++--- >> ofproto/o

Re: [ovs-dev] [ipfix-bug 3/3] ofproto-dpif: Enable NXAST_SAMPLE only if the datapath supports it.

2013-10-10 Thread Romain Lenglet
On Oct 7, 2013, at 2:33 PM, Ben Pfaff wrote: > This prevents using an older datapath from breaking forwarding. > > CC: Romain Lenglet > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto-dpif-ipfix.c | 28 ++--- > ofproto/ofproto-dpif-ipfix.h |5 ++- > ofproto/ofproto-dpif.c |

Re: [ovs-dev] [ipfix-bug 2/3] odp-util: Fix IPFIX breakage with old kernel modules.

2013-10-10 Thread Romain Lenglet
Looks good to me, thanks! Acked-by: Romain Lenglet -- Romain Lenglet On Oct 7, 2013, at 2:33 PM, Ben Pfaff wrote: > Before commit e995e3df57ea (Allow OVS_USERSPACE_ATTR_USERDATA to be > variable length.) userdata attributes in userspace actions were expected > to be exactly 64 bits long. The

Re: [ovs-dev] implementation details on megaflows ?

2013-10-10 Thread Jesse Gross
On Thu, Oct 10, 2013 at 7:21 AM, Jarno Rajahalme wrote: > >> On Oct 9, 2013, at 6:32 PM, Luigi Rizzo wrote: >> >>> On Wed, Oct 09, 2013 at 06:22:25PM -0700, Reid Price wrote: >>> Hi Luigi, >>> >>> At some level it is a logical error to create flows that: >>> - have the same priority >>> - have ov

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Alexei Starovoitov
On Thu, Oct 10, 2013 at 11:21 AM, Pravin Shelar wrote: > On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoitov wrote: >> On Wed, Oct 9, 2013 at 11:07 PM, Pravin Shelar wrote: >>> On Wed, Oct 9, 2013 at 9:11 PM, Alexei Starovoitov >>> wrote: On Wed, Oct 9, 2013 at 8:02 PM, Pravin Shelar wro

Re: [ovs-dev] [PATCH net-next] openvswitch: fix vport-netdev unregister

2013-10-10 Thread Pravin Shelar
On Wed, Oct 9, 2013 at 11:26 PM, Alexei Starovoitov wrote: > On Wed, Oct 9, 2013 at 11:07 PM, Pravin Shelar wrote: >> On Wed, Oct 9, 2013 at 9:11 PM, Alexei Starovoitov wrote: >>> On Wed, Oct 9, 2013 at 8:02 PM, Pravin Shelar wrote: On Tue, Oct 8, 2013 at 8:07 PM, Alexei Starovoitov

Re: [ovs-dev] implementation details on megaflows ?

2013-10-10 Thread Jarno Rajahalme
> On Oct 9, 2013, at 6:32 PM, Luigi Rizzo wrote: > >> On Wed, Oct 09, 2013 at 06:22:25PM -0700, Reid Price wrote: >> Hi Luigi, >> >> At some level it is a logical error to create flows that: >> - have the same priority >> - have overlapping match criteria >> - have different actions >> >> You