Re: [ovs-dev] [PATCH] datapath: Set vport in skb when executed from userspace.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 04:43:32PM -0700, Jesse Gross wrote: > + if (flow->key.eth.in_port != USHRT_MAX) > + OVS_CB(packet)->vport = get_vport_protected(dp, > + flow->key.eth.in_port); > + The nervous part of me would prefer "if (

Re: [ovs-dev] [PATCH] datapath: Set vport in skb when executed from userspace.

2011-09-13 Thread Pravin Shelar
On Tue, Sep 13, 2011 at 4:43 PM, Jesse Gross wrote: > Currently, the OVS_CB(skb)->vport member is never initialized for > packets coming from userspace.  This means that they can never be > sampled by sFlow and generally violates our principle that userspace > packets should be made to look the sa

[ovs-dev] [PATCH v2] Always use generic stats for devices (vports)

2011-09-13 Thread Pravin Shelar
Fixed according to comments from Jesse. -- Currently ovs is using device stats for Linux devices and count them itself in other situations. This leads to overlap with hardware stats, inconsistencies, etc. It's much better to just always count the packets flowing through the switch and let user

[ovs-dev] [PATCH] datapath: Set vport in skb when executed from userspace.

2011-09-13 Thread Jesse Gross
Currently, the OVS_CB(skb)->vport member is never initialized for packets coming from userspace. This means that they can never be sampled by sFlow and generally violates our principle that userspace packets should be made to look the same as others. Signed-off-by: Jesse Gross --- datapath/data

Re: [ovs-dev] [vlans 5/5] Implement "native VLAN" feature.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 11:45:28PM +0200, Philippe Jung wrote: > Le 08/09/2011 21:43, Ben Pfaff a ?crit : > > On Fri, Aug 26, 2011 at 01:19:40PM -0700, Ben Pfaff wrote: > >> From: Philippe Jung > >> > >> Significant updates by Ben Pfaff, including: > >> > >> * Comment, coding style, indentation up

Re: [ovs-dev] [vlans 5/5] Implement "native VLAN" feature.

2011-09-13 Thread Philippe Jung
Le 08/09/2011 21:43, Ben Pfaff a écrit : > On Fri, Aug 26, 2011 at 01:19:40PM -0700, Ben Pfaff wrote: >> From: Philippe Jung >> >> Significant updates by Ben Pfaff, including: >> >> * Comment, coding style, indentation updates. >> * Documentation improved. >> * Added tests. >> * Dropped PORT_VLAN_

Re: [ovs-dev] [warnings 1/4] lib: Suppress comparison warnings in ovsdb libraries.

2011-09-13 Thread Ethan Jackson
Thanks for the reviews, I pushed this series. Ethan On Tue, Sep 13, 2011 at 14:33, Ben Pfaff wrote: > On Tue, Sep 13, 2011 at 02:31:50PM -0700, Ethan Jackson wrote: >> Here's another version.  It simply silences the warnings. > > Looks good, thank you. > _

Re: [ovs-dev] [warnings 1/4] lib: Suppress comparison warnings in ovsdb libraries.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 02:31:50PM -0700, Ethan Jackson wrote: > Here's another version. It simply silences the warnings. Looks good, thank you. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [warnings 1/4] lib: Suppress comparison warnings in ovsdb libraries.

2011-09-13 Thread Ethan Jackson
Here's another version. It simply silences the warnings. --- This patch fixes compiler warnings like the following: ./lib/ovsdb-types.h:171:5: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] --- lib/ovsdb-parser.c |2 +- lib/ovsdb-types.h |2 +- 2 fil

Re: [ovs-dev] [warnings 1/4] lib: Tautological comparisions in ovsdb libaries.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 02:07:17PM -0700, Ethan Jackson wrote: > > I disagree with this change. ?If the compiler picked a signed type for > > the enum (as it is allowed to do) then the comparison is useful. > > Ah didn't realize that an enum could be signed. That's annoying. > > What if I checke

Re: [ovs-dev] [warnings 1/4] lib: Tautological comparisions in ovsdb libaries.

2011-09-13 Thread Ethan Jackson
> I disagree with this change.  If the compiler picked a signed type for > the enum (as it is allowed to do) then the comparison is useful. Ah didn't realize that an enum could be signed. That's annoying. What if I checked if TYPE_IS_SIGNED and only did the comparison in that case? I'd rather n

Re: [ovs-dev] [warnings 3/4] lib: TYPE_IS_SIGNED macro generates compiler warnings.

2011-09-13 Thread Ethan Jackson
> Looks good, thank you.  (I assume that it passes the tests.) Yep, make check works. Thanks for the review. These have been bugging me for a while. Ethan ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [warnings 4/4] man: pic failed to run during manpage-check

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 01:45:53PM -0700, Ethan Jackson wrote: > This patch fixes the following warnings on my system: > > vswitchd/ovs-vswitchd.conf.db.5:62: warning: macro `PS' not defined > vswitchd/ovs-vswitchd.conf.db.5:138: warning: macro `PE' not defined Thanks, I forgot to send this one o

Re: [ovs-dev] [warnings 3/4] lib: TYPE_IS_SIGNED macro generates compiler warnings.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 01:45:52PM -0700, Ethan Jackson wrote: > The TYPE_IS_SIGNED macro does a less than zero comparision with an > unsigned type which can cause compiler warnings like the following: > > lib/tag.c:100:9: error: comparison of unsigned expression < 0 is > always false [-Werror=typ

Re: [ovs-dev] [warnings 2/4] socket-util: inet_parse_passive() had incorrect argument type.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 01:45:51PM -0700, Ethan Jackson wrote: > This patch fixes the following compiler warning: > > lib/socket-util.c:621:5: error: comparison is always false due to > limited range of data type [-Werror=type-limits] Looks good, thank you. ___

Re: [ovs-dev] [warnings 1/4] lib: Tautological comparisions in ovsdb libaries.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 01:45:50PM -0700, Ethan Jackson wrote: > This patch fixes compiler warnings like the following: > > ./lib/ovsdb-types.h:171:5: error: comparison of unsigned expression > >= 0 is always true [-Werror=type-limits] I disagree with this change. If the compiler picked a signed

Re: [ovs-dev] [PATCH] Always use generic stats for devices (vports)

2011-09-13 Thread Jesse Gross
On Mon, Sep 12, 2011 at 5:39 PM, Pravin Shelar wrote: > diff --git a/datapath/datapath.c b/datapath/datapath.c > index 79df5f8..082701c 100644 > --- a/datapath/datapath.c > +++ b/datapath/datapath.c > @@ -1669,8 +1669,10 @@ static struct vport *lookup_vport(struct ovs_header > *ovs_header, >  sta

[ovs-dev] [warnings 4/4] man: pic failed to run during manpage-check

2011-09-13 Thread Ethan Jackson
This patch fixes the following warnings on my system: vswitchd/ovs-vswitchd.conf.db.5:62: warning: macro `PS' not defined vswitchd/ovs-vswitchd.conf.db.5:138: warning: macro `PE' not defined --- Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Ma

[ovs-dev] [warnings 3/4] lib: TYPE_IS_SIGNED macro generates compiler warnings.

2011-09-13 Thread Ethan Jackson
The TYPE_IS_SIGNED macro does a less than zero comparision with an unsigned type which can cause compiler warnings like the following: lib/tag.c:100:9: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] --- lib/type-props.h |2 +- 1 files changed, 1 insertions(

[ovs-dev] [warnings 2/4] socket-util: inet_parse_passive() had incorrect argument type.

2011-09-13 Thread Ethan Jackson
This patch fixes the following compiler warning: lib/socket-util.c:621:5: error: comparison is always false due to limited range of data type [-Werror=type-limits] --- lib/socket-util.c |2 +- lib/socket-util.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sock

[ovs-dev] [warnings 1/4] lib: Tautological comparisions in ovsdb libaries.

2011-09-13 Thread Ethan Jackson
This patch fixes compiler warnings like the following: ./lib/ovsdb-types.h:171:5: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] --- lib/ovsdb-parser.c |3 +-- lib/ovsdb-types.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/

Re: [ovs-dev] [learning v2 15/19] Implement new "learn" action.

2011-09-13 Thread Ethan Jackson
Sounds good. Ethan On Tue, Sep 13, 2011 at 11:41, Ben Pfaff wrote: > On Tue, Sep 13, 2011 at 11:39:12AM -0700, Ethan Jackson wrote: >> > + * 3. Here's a recipe for a very simple-minded MAC learning switch. ?It >> > uses a >> > + * ? ?10-second MAC expiration time to make it easier to see what's

Re: [ovs-dev] [learning v2 15/19] Implement new "learn" action.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 11:39:12AM -0700, Ethan Jackson wrote: > > + * 3. Here's a recipe for a very simple-minded MAC learning switch. ?It > > uses a > > + * ? ?10-second MAC expiration time to make it easier to see what's going > > on > > + * > > + * ? ? ?ovs-vsctl del-controller br0 > > + * ?

Re: [ovs-dev] [learning v2 19/19] ofproto-dpif: Optimize flow revalidation for MAC learning.

2011-09-13 Thread Ethan Jackson
> I applied this, does it help?  Or you can suggest better wording. Yep, seems clearer to me. Thanks Ethan > > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > index b9a27ae..93bc0d2 100644 > --- a/ofproto/ofproto-dpif.c > +++ b/ofproto/ofproto-dpif.c > @@ -4034,8 +4034,10 @@ don

Re: [ovs-dev] [learning v2 15/19] Implement new "learn" action.

2011-09-13 Thread Ethan Jackson
> + * 3. Here's a recipe for a very simple-minded MAC learning switch.  It uses > a > + *    10-second MAC expiration time to make it easier to see what's going on > + * > + *      ovs-vsctl del-controller br0 > + *      ovs-ofctl del-flows br0 > + *      ovs-ofctl add-flow br0 "table=0 actions=le

Re: [ovs-dev] [PATCH] Genericize/simplify kernel sFlow implementation

2011-09-13 Thread Jesse Gross
On Tue, Sep 13, 2011 at 10:55 AM, Pravin Shelar wrote: > On Mon, Sep 12, 2011 at 4:37 PM, Jesse Gross wrote: >> On Tue, Aug 30, 2011 at 6:59 PM, Pravin Shelar wrote: >>> diff --git a/datapath/actions.c b/datapath/actions.c >>> index 8aec438..3178bdd 100644 >>> --- a/datapath/actions.c >>> +++ b/

Re: [ovs-dev] [PATCH] Genericize/simplify kernel sFlow implementation

2011-09-13 Thread Pravin Shelar
On Mon, Sep 12, 2011 at 4:37 PM, Jesse Gross wrote: > On Tue, Aug 30, 2011 at 6:59 PM, Pravin Shelar wrote: >> diff --git a/datapath/actions.c b/datapath/actions.c >> index 8aec438..3178bdd 100644 >> --- a/datapath/actions.c >> +++ b/datapath/actions.c >> +static int sample(struct datapath *dp, s

Re: [ovs-dev] [PATCH] Genericize/simplify kernel sFlow implementation

2011-09-13 Thread Jesse Gross
On Mon, Sep 12, 2011 at 4:37 PM, Jesse Gross wrote: > On Tue, Aug 30, 2011 at 6:59 PM, Pravin Shelar wrote: >>         if (ofproto->sflow) { >> +            dpif_get_dp_stats(ofproto->dpif, &s); >>             odp_flow_key_to_flow(upcall->key, upcall->key_len, &flow); >> -            dpif_sflow_r

Re: [ovs-dev] [PATCH] Genericize/simplify kernel sFlow implementation

2011-09-13 Thread Jesse Gross
One more thing: On Tue, Aug 30, 2011 at 6:59 PM, Pravin Shelar wrote: > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > index f09c230..fa70be6 100644 > --- a/ofproto/ofproto-dpif.c > +++ b/ofproto/ofproto-dpif.c > @@ -2903,6 +3023,8 @@ add_output_action(struct action_xlate_ctx *ctx

Re: [ovs-dev] [PATCH] bridge: Don't update CFM on synthetic interfaces.

2011-09-13 Thread Ben Pfaff
On Tue, Sep 13, 2011 at 09:08:24AM -0700, Ethan Jackson wrote: > > I'm pretty sure that it will always cause a segmentation fault, it's > > just that it's pretty unusual to have to create a synthetic interface > > (ovs-vsctl will never create a bridge that needs one.) > > That's what you would thi

Re: [ovs-dev] [PATCH] bridge: Don't update CFM on synthetic interfaces.

2011-09-13 Thread Ethan Jackson
> I'm pretty sure that it will always cause a segmentation fault, it's > just that it's pretty unusual to have to create a synthetic interface > (ovs-vsctl will never create a bridge that needs one.) That's what you would think, but I tried it last night and couldn't get it to happen. I have to l

Re: [ovs-dev] [PATCH] bridge: Don't update CFM on synthetic interfaces.

2011-09-13 Thread Ben Pfaff
On Mon, Sep 12, 2011 at 10:46:01PM -0700, Ethan Jackson wrote: > Synthetic interfaces don't have database records so it doesn't make > sense to update them. In some situations this could cause a > segmentation fault. I'm pretty sure that it will always cause a segmentation fault, it's just that i