Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Yang, Yi Y
Jan, here is ALIGNED_CAST macro /* Given ATTR, and TYPE, cast the ATTR to TYPE by first casting ATTR to * (void *). This is to suppress the alignment warning issued by clang. */ #define ALIGNED_CAST(TYPE, ATTR) ((TYPE) (void *) (ATTR)) It is just for suppressing the error message Ben saw, so we

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Yang, Yi Y
I also tried it with 32 bit build on 64 bit machine by a simple c program with " -m32 -Werror -Wcast-align" options, but I can't reproduce this error information. The error message is saying char pointer or uint8 pointer may be any address (non-alignment to 4 or 8 bytes boundary), but struct ofp

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Jan Scheurich
Scheurich > Sent: Thursday, 13 July, 2017 20:17 > To: Ben Pfaff ; Zoltán Balogh > Cc: 'd...@openvswitch.org' ; Jiri Benc > (jb...@redhat.com) > Subject: Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap > > Hi Ben, > > > -Original M

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Jan Scheurich
Hi Ben, > -Original Message- > From: Ben Pfaff [mailto:b...@ovn.org] > Sent: Tuesday, 11 July, 2017 23:46 > > What is your plan for handling ofpact_check__() with decap actions? > In general a decap() action reveals an inner packet that requires reparsing before any subsequent actions

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Jan Scheurich
The simple way out is to use ALIGNED_CAST instead. diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 04dd048..cc19db4 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -4189,7 +4189,8 @@ parse_ENCAP(char *arg, return error; } /* ofbuf out may have been re-allocate

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Ben Pfaff
On Thu, Jul 13, 2017 at 04:49:09PM +, Zoltán Balogh wrote: > Hello Ben, > > > > GCC says: > > > > ../lib/ofp-actions.c:4189:13: error: cast from 'char *' to 'struct > > ofpact_encap *' increases required alignment > > from 1 to 4 [-Werror,-Wcast-align] > > ../lib/ofp-actions.c:4222:

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-13 Thread Zoltán Balogh
Hello Ben, > GCC says: > > ../lib/ofp-actions.c:4189:13: error: cast from 'char *' to 'struct > ofpact_encap *' increases required alignment > from 1 to 4 [-Werror,-Wcast-align] > ../lib/ofp-actions.c:4222:16: error: cast from 'const uint8_t *' (aka > 'const unsigned char *') to 'const

Re: [ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-07-11 Thread Ben Pfaff
On Fri, Jun 30, 2017 at 03:29:29PM +, Zoltán Balogh wrote: > From: Jan Scheurich > > This commit adds support for the OpenFlow actions generic encap > and decap (as specified in ONF EXT-382) to the OVS control plane. > > CLI syntax for encap action with properties: > encap(hdr=) > encap(

[ovs-dev] [PATCH 1/4] Add OF actions for generic encap and decap

2017-06-30 Thread Zoltán Balogh
From: Jan Scheurich This commit adds support for the OpenFlow actions generic encap and decap (as specified in ONF EXT-382) to the OVS control plane. CLI syntax for encap action with properties: encap(hdr=) encap(hdr=, prop(class=,type=,val=), prop(class=,type=,val())) CLI s