Hi Ferruh, Thomas, On Fri, Jan 20, 2023 at 6:19 PM Ferruh Yigit <ferruh.yi...@amd.com> wrote: > > There was a plan to have structures from lib/net/ at the beginning > of corresponding flow item structures. > Unfortunately this plan has not been followed up so far. > This series is a step to make the most used items, > compliant with the inheritance design explained above. > The old API is kept in anonymous union for compatibility, > but the code in drivers and apps is updated to use the new API. > > > v2: (by Ferruh) > * Rebased on latest next-net for v23.03 > * 'struct rte_gre_hdr' endianness annotation added to protocol field > * more driver code updated for rte_flow_item_eth & rte_flow_item_vlan > * 'struct rte_gre_hdr' updated to have a combined "rte_be16_t c_rsvd0_ver" > field and updated drivers accordingly > * more driver code updated for rte_flow_item_gre > * more driver code updated for rte_flow_item_gtp > > > Cc: David Marchand <david.march...@redhat.com>
Note: it is relatively easy to run OVS checks, you only need a github fork of ovs with a dpdk-latest branch + some github yml update to point at a dpdk repo + branch of yours (see the last commit in my repo below). I ran this series in my dpdk-latest (rebased) OVS branch https://github.com/david-marchand/ovs/commits/dpdk-latest, through GHA. Sparse spotted an issue on rte_flow.h header, following HIGIG2 update. https://github.com/david-marchand/ovs/actions/runs/3979243283/jobs/6821543439#step:12:2592 2023-01-22T10:31:37.5911785Z ../../lib/ofp-packet.c: note: in included file (through ../../lib/netdev-dpdk.h, ../../lib/dp-packet.h): 2023-01-22T10:31:37.5918848Z /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:645:43: error: incorrect type in initializer (different base types) 2023-01-22T10:31:37.5919574Z /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:645:43: expected restricted ovs_be16 [usertype] classification 2023-01-22T10:31:37.5920131Z /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:645:43: got int 2023-01-22T10:31:37.5920720Z /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:646:32: error: incorrect type in initializer (different base types) 2023-01-22T10:31:37.5921341Z /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:646:32: expected restricted ovs_be16 [usertype] vid 2023-01-22T10:31:37.5921866Z /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:646:32: got int 2023-01-22T10:31:37.6042168Z make[2]: *** [Makefile:4681: lib/ofp-packet.lo] Error 1 2023-01-22T10:31:37.6042717Z make[2]: *** Waiting for unfinished jobs.... This should be fixed with: diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index a215daa836..99f8340f82 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -642,8 +642,8 @@ struct rte_flow_item_higig2_hdr { static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask = { .hdr = { .ppt1 = { - .classification = 0xffff, - .vid = 0xfff, + .classification = RTE_BE16(0xffff), + .vid = RTE_BE16(0xfff), }, }, }; However, looking at existing code, and though I don't know HIGIG2, it is a bit strange to use a 12 bits large mask for vid. With this fix, OVS sparse check passes: https://github.com/david-marchand/ovs/actions/runs/3979288868 -- David Marchand