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

2013-06-19 Thread Alex Wang
Thanks, On Wed, Jun 19, 2013 at 1:48 PM, Ben Pfaff wrote: > On Wed, Jun 19, 2013 at 01:46:17PM -0700, Alex Wang wrote: > > On Tue, Jun 18, 2013 at 1:10 PM, Ben Pfaff wrote: > > > > > Thanks again for working on this. > > > > > > It looks like your test builds are not configured to build a kern

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

2013-06-19 Thread Ben Pfaff
On Wed, Jun 19, 2013 at 01:46:17PM -0700, Alex Wang wrote: > On Tue, Jun 18, 2013 at 1:10 PM, Ben Pfaff wrote: > > > Thanks again for working on this. > > > > It looks like your test builds are not configured to build a kernel > > module: this patch triggers tons of errors in the kernel build due

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

2013-06-19 Thread Alex Wang
On Tue, Jun 18, 2013 at 1:10 PM, Ben Pfaff wrote: > Thanks again for working on this. > > It looks like your test builds are not configured to build a kernel > module: this patch triggers tons of errors in the kernel build due to > the change to OVSP_LOCAL, because OVS_FORCE is not defined in the

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

2013-06-19 Thread Alex Wang
On Wed, Jun 19, 2013 at 9:29 AM, Ben Pfaff wrote: > On Wed, Jun 19, 2013 at 08:32:30AM -0700, Alex Wang wrote: > > On Tue, Jun 18, 2013 at 1:10 PM, Ben Pfaff wrote: > > > nl_attr_get_odp_port() and nl_msg_put_odp_port() functions might be > > > handy. > > > > Sure! honestly, it seems that I coul

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

2013-06-19 Thread Ben Pfaff
On Wed, Jun 19, 2013 at 08:32:30AM -0700, Alex Wang wrote: > On Tue, Jun 18, 2013 at 1:10 PM, Ben Pfaff wrote: > > nl_attr_get_odp_port() and nl_msg_put_odp_port() functions might be > > handy. > > Sure! honestly, it seems that I could not make the right decision on what > to provide and > what n

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

2013-06-19 Thread Alex Wang
Thanks very much, Ben for the comments, On Tue, Jun 18, 2013 at 1:10 PM, Ben Pfaff wrote: > Thanks again for working on this. > > It looks like your test builds are not configured to build a kernel > module: this patch triggers tons of errors in the kernel build due to > the change to OVSP_LOCA

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

2013-06-18 Thread Ben Pfaff
Thanks again for working on this. It looks like your test builds are not configured to build a kernel module: this patch triggers tons of errors in the kernel build due to the change to OVSP_LOCAL, because OVS_FORCE is not defined in the kernel. I am not sure of that is the best possible fix (we

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

2013-06-11 Thread Ben Pfaff
Thanks! On Tue, Jun 11, 2013 at 05:03:46PM -0700, Alex Wang wrote: > Thanks Ben, > > The factors are all reasonable. Especially, the negation can be confusing. > > Also, with you confirmation, I'll choose the "oft_to_u16()", "odp_to_u32()" > way. ;D > > I'll adjust the code accordingly and rese

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

2013-06-11 Thread Alex Wang
Thanks Ben, The factors are all reasonable. Especially, the negation can be confusing. Also, with you confirmation, I'll choose the "oft_to_u16()", "odp_to_u32()" way. ;D I'll adjust the code accordingly and resend a new version. Kind Regards, Alex Wang, On Tue, Jun 11, 2013 at 4:55 PM, Ben P

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

2013-06-11 Thread Ben Pfaff
On Mon, Jun 10, 2013 at 08:50:40AM -0700, Alex Wang wrote: > Subject: [PATCH] This patch implements "ofp_is_less_than()" and use it > to replace the PORT_COMPARE() function for port comparison. > Date: Mon, 10 Jun 2013 09:05:50 -0700 > Message-Id: <1370880350-22000-1-git-send-email-al...@nicira.com

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

2013-06-11 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 04:10:34PM -0700, Alex Wang wrote: > On Tue, Jun 11, 2013 at 3:59 PM, Ben Pfaff wrote: > > > On Fri, Jun 07, 2013 at 11:11:43AM -0700, Alex Wang wrote: > > > Currently datapath ports and openflow ports are both represented by > > unsigned > > > integers of various sizes. W

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 V2] feature: Create specific types for ofp and odp port

2013-06-11 Thread Alex Wang
On Tue, Jun 11, 2013 at 3:59 PM, Ben Pfaff wrote: > On Fri, Jun 07, 2013 at 11:11:43AM -0700, Alex Wang wrote: > > Currently datapath ports and openflow ports are both represented by > unsigned > > integers of various sizes. With implicit casts, etc. it is easy to mix > them > > up and use one wh

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

2013-06-11 Thread Ben Pfaff
On Fri, Jun 07, 2013 at 11:11:43AM -0700, Alex Wang wrote: > Currently datapath ports and openflow ports are both represented by unsigned > integers of various sizes. With implicit casts, etc. it is easy to mix them > up and use one where the other is expected. This commit creates two typedefs > of