DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Subject: Re: [PATCH v2 0/8] start cleanup of rte_flow_item_*
Date: Sun, 22 Jan 2023 11:52:43 +0100	[thread overview]
Message-ID: <CAJFAV8wZwifMAa9fDcu2DwDYG_K0j19yJtnHE1278ECDWKjjng@mail.gmail.com> (raw)
In-Reply-To: <20230120171902.4188088-1-ferruh.yigit@amd.com>

Hi Ferruh, Thomas,

On Fri, Jan 20, 2023 at 6:19 PM Ferruh Yigit <ferruh.yigit@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.marchand@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


  parent reply	other threads:[~2023-01-22 10:53 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 21:44 [PATCH " Thomas Monjalon
2022-10-25 21:44 ` [PATCH 1/8] ethdev: use Ethernet protocol struct for flow matching Thomas Monjalon
2022-10-25 21:44 ` [PATCH 2/8] net: add smaller fields for VXLAN Thomas Monjalon
2022-10-25 21:44 ` [PATCH 3/8] ethdev: use VXLAN protocol struct for flow matching Thomas Monjalon
2022-10-25 21:44 ` [PATCH 4/8] ethdev: use GRE " Thomas Monjalon
2022-10-26  8:45   ` David Marchand
2023-01-20 17:21     ` Ferruh Yigit
2022-10-25 21:44 ` [PATCH 5/8] ethdev: use GTP " Thomas Monjalon
2022-10-25 21:44 ` [PATCH 6/8] ethdev: use ARP " Thomas Monjalon
2022-10-25 21:44 ` [PATCH 7/8] doc: fix description of L2TPV2 flow item Thomas Monjalon
2022-10-25 21:44 ` [PATCH 8/8] net: mark all big endian types Thomas Monjalon
2022-10-26  8:41   ` David Marchand
2023-01-20 17:18 ` [PATCH v2 0/8] start cleanup of rte_flow_item_* Ferruh Yigit
2023-01-20 17:18   ` [PATCH v2 1/8] ethdev: use Ethernet protocol struct for flow matching Ferruh Yigit
2023-01-20 17:18   ` [PATCH v2 2/8] net: add smaller fields for VXLAN Ferruh Yigit
2023-01-20 17:18   ` [PATCH v2 3/8] ethdev: use VXLAN protocol struct for flow matching Ferruh Yigit
2023-01-20 17:18   ` [PATCH v2 4/8] ethdev: use GRE " Ferruh Yigit
2023-01-20 17:18   ` [PATCH v2 5/8] ethdev: use GTP " Ferruh Yigit
2023-01-20 17:19   ` [PATCH v2 6/8] ethdev: use ARP " Ferruh Yigit
2023-01-20 17:19   ` [PATCH v2 7/8] doc: fix description of L2TPV2 flow item Ferruh Yigit
2023-01-20 17:19   ` [PATCH v2 8/8] net: mark all big endian types Ferruh Yigit
2023-01-22 10:52   ` David Marchand [this message]
2023-01-24  9:07     ` [PATCH v2 0/8] start cleanup of rte_flow_item_* Ferruh Yigit
2023-01-24  9:02 ` [PATCH v3 " Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 1/8] ethdev: use Ethernet protocol struct for flow matching Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 2/8] net: add smaller fields for VXLAN Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 3/8] ethdev: use VXLAN protocol struct for flow matching Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 4/8] ethdev: use GRE " Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 5/8] ethdev: use GTP " Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 6/8] ethdev: use ARP " Ferruh Yigit
2023-01-24  9:02   ` [PATCH v3 7/8] doc: fix description of L2TPV2 flow item Ferruh Yigit
2023-01-24  9:03   ` [PATCH v3 8/8] net: mark all big endian types Ferruh Yigit
2023-01-26 13:17 ` [PATCH v4 0/8] start cleanup of rte_flow_item_* Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 1/8] ethdev: use Ethernet protocol struct for flow matching Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 2/8] net: add smaller fields for VXLAN Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 3/8] ethdev: use VXLAN protocol struct for flow matching Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 4/8] ethdev: use GRE " Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 5/8] ethdev: use GTP " Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 6/8] ethdev: use ARP " Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 7/8] doc: fix description of L2TPV2 flow item Ferruh Yigit
2023-01-26 13:17   ` [PATCH v4 8/8] net: mark all big endian types Ferruh Yigit
2023-01-26 16:18 ` [PATCH v5 0/8] start cleanup of rte_flow_item_* Ferruh Yigit
2023-01-26 16:18   ` [PATCH v5 1/8] ethdev: use Ethernet protocol struct for flow matching Ferruh Yigit
2023-01-27 14:33     ` Niklas Söderlund
2023-02-01 17:34     ` Ori Kam
2023-02-02  9:51     ` Andrew Rybchenko
2023-01-26 16:18   ` [PATCH v5 2/8] net: add smaller fields for VXLAN Ferruh Yigit
2023-01-26 16:18   ` [PATCH v5 3/8] ethdev: use VXLAN protocol struct for flow matching Ferruh Yigit
2023-02-01 17:41     ` Ori Kam
2023-02-02  9:52     ` Andrew Rybchenko
2023-01-26 16:19   ` [PATCH v5 4/8] ethdev: use GRE " Ferruh Yigit
2023-01-27 14:34     ` Niklas Söderlund
2023-02-01 17:44     ` Ori Kam
2023-02-02  9:53     ` Andrew Rybchenko
2023-01-26 16:19   ` [PATCH v5 5/8] ethdev: use GTP " Ferruh Yigit
2023-02-02  9:54     ` Andrew Rybchenko
2023-01-26 16:19   ` [PATCH v5 6/8] ethdev: use ARP " Ferruh Yigit
2023-02-01 17:46     ` Ori Kam
2023-02-02  9:55     ` Andrew Rybchenko
2023-01-26 16:19   ` [PATCH v5 7/8] doc: fix description of L2TPV2 flow item Ferruh Yigit
2023-02-02  9:56     ` Andrew Rybchenko
2023-01-26 16:19   ` [PATCH v5 8/8] net: mark all big endian types Ferruh Yigit
2023-02-02 10:01     ` Andrew Rybchenko
2023-02-02 11:11       ` Ferruh Yigit
2023-02-02 12:44 ` [PATCH v6 0/8] start cleanup of rte_flow_item_* Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 1/8] ethdev: use Ethernet protocol struct for flow matching Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 2/8] net: add smaller fields for VXLAN Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 3/8] ethdev: use VXLAN protocol struct for flow matching Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 4/8] ethdev: use GRE " Ferruh Yigit
2023-02-02 17:16     ` Thomas Monjalon
2023-02-03 15:02       ` Ferruh Yigit
2023-02-03 15:12         ` Thomas Monjalon
2023-02-03 15:16           ` Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 5/8] ethdev: use GTP " Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 6/8] ethdev: use ARP " Ferruh Yigit
2023-02-02 12:44   ` [PATCH v6 7/8] doc: fix description of L2TPV2 flow item Ferruh Yigit
2023-02-02 12:45   ` [PATCH v6 8/8] net: mark all big endian types Ferruh Yigit
2023-02-02 17:20     ` Thomas Monjalon
2023-02-03 15:03       ` Ferruh Yigit
2023-02-03 16:48 ` [PATCH v7 0/7] start cleanup of rte_flow_item_* Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 1/7] ethdev: use Ethernet protocol struct for flow matching Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 2/7] net: add smaller fields for VXLAN Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 3/7] ethdev: use VXLAN protocol struct for flow matching Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 4/7] ethdev: use GTP " Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 5/7] ethdev: use ARP " Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 6/7] doc: fix description of L2TPV2 flow item Ferruh Yigit
2023-02-03 16:48   ` [PATCH v7 7/7] net: mark all big endian types Ferruh Yigit
2023-02-06  2:35   ` [PATCH v7 0/7] start cleanup of rte_flow_item_* fengchengwen
2023-02-07 14:58   ` Thomas Monjalon
2023-02-07 16:33     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJFAV8wZwifMAa9fDcu2DwDYG_K0j19yJtnHE1278ECDWKjjng@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).