Re: [ovs-dev] [RFC PATCH] userspace: Define and use struct eth_addr.

2015-10-14 Thread Takashi Yamamoto
hi, On Thu, Sep 17, 2015 at 12:44 AM, Ben Pfaff wrote: > On Wed, Sep 16, 2015 at 10:55:10AM +0900, Takashi Yamamoto wrote: >> hi, >> >> > --- a/build-aux/extract-odp-netlink-h >> > +++ b/build-aux/extract-odp-netlink-h >> > @@ -20,11 +20,14 @@ $i\ >> > #include "OvsDpInterfaceExt.h"\ >> > #endi

Re: [ovs-dev] [RFC PATCH] userspace: Define and use struct eth_addr.

2015-09-16 Thread Ben Pfaff
On Wed, Sep 16, 2015 at 10:55:10AM +0900, Takashi Yamamoto wrote: > hi, > > > --- a/build-aux/extract-odp-netlink-h > > +++ b/build-aux/extract-odp-netlink-h > > @@ -20,11 +20,14 @@ $i\ > > #include "OvsDpInterfaceExt.h"\ > > #endif\ > > > > +# Use OVS's own struct eth_addr instead of a 6-byte c

Re: [ovs-dev] [RFC PATCH] userspace: Define and use struct eth_addr.

2015-09-15 Thread Takashi Yamamoto
hi, > --- a/build-aux/extract-odp-netlink-h > +++ b/build-aux/extract-odp-netlink-h > @@ -20,11 +20,14 @@ $i\ > #include "OvsDpInterfaceExt.h"\ > #endif\ > > +# Use OVS's own struct eth_addr instead of a 6-byte char array. > +s,,"openvswitch/types.h", > +s,#.*,, > +s/__u8[ \t]*\([a-zA-Z0-9_]*\)[

Re: [ovs-dev] [RFC PATCH] userspace: Define and use struct eth_addr.

2015-08-28 Thread Ben Pfaff
On Fri, Aug 28, 2015 at 03:02:54PM -0700, Jarno Rajahalme wrote: > > > On Aug 28, 2015, at 10:54 AM, Ben Pfaff wrote: > > However, GCC is almost criminally bad at optimizing it: > > > >blp@sigabrt:~/nicira/ovs/_build(0)$ cat tmp.c > >struct x { > >union { > >unsigned

Re: [ovs-dev] [RFC PATCH] userspace: Define and use struct eth_addr.

2015-08-28 Thread Jarno Rajahalme
> On Aug 28, 2015, at 10:54 AM, Ben Pfaff wrote: > > On Thu, Aug 27, 2015 at 06:29:16PM -0700, Jarno Rajahalme wrote: >> Define struct eth_addr and use it instead of a uint8_t array for all >> ethernet addresses in OVS userspace. The struct is always the right >> size, and it can be assigned wi

Re: [ovs-dev] [RFC PATCH] userspace: Define and use struct eth_addr.

2015-08-28 Thread Ben Pfaff
On Thu, Aug 27, 2015 at 06:29:16PM -0700, Jarno Rajahalme wrote: > Define struct eth_addr and use it instead of a uint8_t array for all > ethernet addresses in OVS userspace. The struct is always the right > size, and it can be assigned without an explicit memcpy, which makes > code more readable.