[ovs-dev] [PATCH v6 1/4] nsh: rework NSH netlink keys and actions
Yang, Yi
yi.y.yang at intel.com
Sat Jan 6 06:03:09 UTC 2018
On Fri, Jan 05, 2018 at 04:42:00AM +0800, Ben Pfaff wrote:
> On Fri, Dec 08, 2017 at 10:04:22PM +0800, Yi Yang wrote:
> >
> > Signed-off-by: Yi Yang <yi.y.yang at intel.com>
>
>
> In odp_execute_actions(), this looks bogus: there is nothing to
> guarantee that 'buffer' is properly aligned for struct nsh_hdr.
> + uint8_t buffer[NSH_HDR_MAX_LEN];
> + struct nsh_hdr *nsh_hdr = ALIGNED_CAST(struct nsh_hdr *, buffer);
>
> Similarly in format_odp_action().
>
Ben, do you mean buffer isn't 4 bytes aligned? I redefine it as
"uint32_t buffer[NSH_HDR_MAX_LEN / 4];", it is enough for struct nsh_hdr to
align to 4 bytes boundary.
More information about the dev
mailing list