numam-dpdk/lib/net
Eli Britstein a3f8d05871 net: avoid cast-align warning in VLAN insert function
In rte_vlan_insert there is a casting of rte_pktmbuf_prepend returned
value to (struct rte_ether_hdr *), which causes cast-align warning when
using strict cast align flag with supporting gcc:
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static

In file included from main.c:35:
/dpdk/build/include/rte_ether.h:370:7: warning: cast increases required
alignment of target type [-Wcast-align]
  370 |  nh = (struct rte_ether_hdr *)
      |       ^

As the code assumes correct alignment, add first a (void *) casting, to
avoid the warning.

Fixes: c974021a59 ("ether: add soft vlan encap/decap")
Cc: stable@dpdk.org

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2021-10-25 17:27:17 +02:00
..
meson.build ethdev: support L2TPv2 and PPP procotol 2021-10-21 14:15:59 +02:00
net_crc_avx512.c
net_crc_neon.c
net_crc_sse.c
net_crc.h
rte_arp.c net: rename Ethernet header fields 2021-10-08 14:58:11 +02:00
rte_arp.h net: promote make rarp packet function to stable 2021-10-02 11:12:32 +02:00
rte_ecpri.h
rte_esp.h
rte_ether.c net: enable random address on Windows 2021-09-30 20:51:11 +02:00
rte_ether.h net: avoid cast-align warning in VLAN insert function 2021-10-25 17:27:17 +02:00
rte_geneve.h
rte_gre.h
rte_gtp.h net: add extension header for GTP PSC 2021-09-28 12:34:58 +02:00
rte_higig.h
rte_icmp.h
rte_ip.h mbuf: add namespace to offload flags 2021-10-24 13:37:43 +02:00
rte_l2tpv2.h net: fix build with pedantic for L2TPv2 definitions 2021-10-25 09:33:15 +02:00
rte_mpls.h
rte_net_crc.c
rte_net_crc.h
rte_net.c
rte_net.h mbuf: add namespace to offload flags 2021-10-24 13:37:43 +02:00
rte_ppp.h ethdev: support L2TPv2 and PPP procotol 2021-10-21 14:15:59 +02:00
rte_sctp.h
rte_tcp.h
rte_udp.h
rte_vxlan.h
version.map net: promote IPv6 external headers skip API as stable 2021-10-13 12:57:12 +02:00