On Fri, Oct 25, 2019 at 11:15 PM Ben Pfaff <b...@ovn.org> wrote: > On Fri, Oct 25, 2019 at 03:45:49PM +0200, Lorenzo Bianconi wrote: > > +/* RDNSS option RFC 6106 */ > > +#define ND_RDNSS_OPT_LEN 8 > > +#define ND_OPT_RDNSS 25 > > +struct nd_rdnss_opt { > > + uint8_t type; /* ND_OPT_RDNSS. */ > > + uint8_t len; /* >= 3. */ > > + ovs_be16 reserved; /* Always 0. */ > > + ovs_16aligned_be32 lifetime; > > + const ovs_be128 dns[0]; > > +}; > > +BUILD_ASSERT_DECL(ND_RDNSS_OPT_LEN == sizeof(struct nd_rdnss_opt)); > > This structure is a little odd. The use of ovs_16aligned_be32 implies > that it can be 16-bit aligned, but ovs_be128 implies that it must be > 64-bit aligned. >
Would it work if we remove ovs_be128 from the struct and then when adding this option to the IPv6 RA packet, copy the IPv6 address directly to dp_packet buffer ? How ever if you think we need to have ovs_16aligned_be128 type, does it makes sense to add this structure and corresponding function - packet_put_ra_rdnss_opt to lib/packets.c of ovs repo ? Right now only OVN needs this function. Thanks Numan > We might need a new ovs_16aligned_be128 type. It seems to be missing > from our menagerie so far. > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev