[dpdk-dev] [PATCH v2] net: fix build with sparse on L2TPv2 bitfields
Ferruh Yigit
ferruh.yigit at intel.com
Thu Oct 28 20:44:10 CEST 2021
On 10/28/2021 11:14 AM, David Marchand wrote:
> An external project that wants to do additional checks on fields
> endianness can remap rte_beXX types to instrumented types and use
> sparse.
>
> The current code breaks OVS build with sparse:
> ../../lib/ofp-packet.c: note: in included file (through
> .../ovs/dpdk-dir/build/include/rte_flow.h, ../../lib/netdev-dpdk.h,
> ../../lib/dp-packet.h):
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:92:37:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:93:37:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:94:40:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:95:37:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:96:40:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:97:37:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:98:37:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:99:40:
> error: invalid bitfield specifier for type restricted ovs_be16.
> .../ovs/dpdk-dir/build/include/rte_l2tpv2.h:100:39:
> error: invalid bitfield specifier for type restricted ovs_be16.
> make[3]: *** [lib/ofp-packet.lo] Error 1
>
> Use simple uint16_t types for bitfields in L2TPv2 struct.
>
> Fixes: 3a929df1f286 ("ethdev: support L2TPv2 and PPP procotol")
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
Applied to dpdk-next-net/main, thanks.
More information about the dev
mailing list