On Wed, May 15, 2019 at 03:19:52PM -0700, Stephen Hemminger wrote: > Using bit operations like or and xor is faster than a loop > on all architectures. Really just explicit unrolling. > > Similar cast to uint16 unaligned is already done in > other functions here. > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > --- > lib/librte_net/rte_ether.h | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > Rather than casting to unaligned values, which gives compiler warnings in some cases, I believe we should just mark the ethernet addresses as always being 2-byte aligned and simplify things. [unless we have a good use case where we won't have 2-byte alignment???].
See patch: http://patches.dpdk.org/patch/53482/ Regards, /Bruce