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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc_neon.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc_sse.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_esp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_gre.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_gtp.h net: add extension header for GTP PSC 2021-09-28 12:34:58 +02:00
rte_higig.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_icmp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_net_crc.c log: register with standardized names 2021-05-11 15:17:55 +02:00
rte_net_crc.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_net.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_tcp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_udp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_vxlan.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
version.map net: promote IPv6 external headers skip API as stable 2021-10-13 12:57:12 +02:00