From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB72F42455; Sun, 22 Jan 2023 11:53:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BFDFD40223; Sun, 22 Jan 2023 11:52:59 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D235A40150 for ; Sun, 22 Jan 2023 11:52:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674384777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KH/IP0JTXhM5ZTyl0r8ZvDlPwQiCJgm6oqu88dCCCuk=; b=gZx8o1iWxQ61t83rHvQuNDFC6nEaoQMe8xectoOKLPb5M87gNW5V6CRsXs9omjqvKniUXq Cps22YLPOtT0TRZ65Ewa0YZH1ORSMb87roV+mSUZ6O0LOk2hvNiqgpBL1wGSKUgBPdvUAQ sWQvesO7tAlWblKLKMFS8ynL9MFBI60= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-339-OI1q4NdSO2a3Sef1xERNkg-1; Sun, 22 Jan 2023 05:52:56 -0500 X-MC-Unique: OI1q4NdSO2a3Sef1xERNkg-1 Received: by mail-pf1-f199.google.com with SMTP id f22-20020a056a00239600b0058d956679f5so4121809pfc.5 for ; Sun, 22 Jan 2023 02:52:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KH/IP0JTXhM5ZTyl0r8ZvDlPwQiCJgm6oqu88dCCCuk=; b=KcPdJ7yEFhzY6UbV7nB0eOe7vHGljZVkQGKHyJKLYtPvFOxrYIZK25NuOlddpXWBau OchoFV9l22s0I8cqyVFKbJRuZHtJXVS5IJwM9+5N3cqyccQeCDGfvxgDsqNi+uEYSOko BwiRG9hC1ewN5zP/d7xpVWE3m4TGvAKWVkbWkQZ46UkJTcNwMXUFhUAYHqQVmNafYrce iaTPtk15tpvL/XTBkZf9pfeUEEXOY07Dqxn/vceq+IO3AOYZQ3SL+9Ykv41mEkoTB3+k wMa4K6tyNpJicp68S0uUTyuKOlb/F2tvTQ31AjD+bBR/9uv331sOeA/nORg2F5rWc/xN CY2Q== X-Gm-Message-State: AFqh2kpHFw03xcTeV6hS3i6njSej+gNyy/cywULJO5snWc4b2PsFysaI MliL1y56sTr8ZwtbPg+kr2eSS6RE/5XwNQoD0m/FX0/72RaxDAZ7k0WcIwn1qIUqfiKWaXPgsJw jPLQkgRYqbi+ltgOfEjc= X-Received: by 2002:a17:90a:e384:b0:22b:b217:e5ea with SMTP id b4-20020a17090ae38400b0022bb217e5eamr957116pjz.206.1674384774942; Sun, 22 Jan 2023 02:52:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXu3X8OA17cI0XK+tE+0s2o3AbucRqfEAi2IezSbbGmQ/7lGDlb/e7bcys/1RgIUvlbozBKgvgdxrolB7MtZvn4= X-Received: by 2002:a17:90a:e384:b0:22b:b217:e5ea with SMTP id b4-20020a17090ae38400b0022bb217e5eamr957112pjz.206.1674384774531; Sun, 22 Jan 2023 02:52:54 -0800 (PST) MIME-Version: 1.0 References: <20221025214410.715864-1-thomas@monjalon.net> <20230120171902.4188088-1-ferruh.yigit@amd.com> In-Reply-To: <20230120171902.4188088-1-ferruh.yigit@amd.com> From: David Marchand Date: Sun, 22 Jan 2023 11:52:43 +0100 Message-ID: Subject: Re: [PATCH v2 0/8] start cleanup of rte_flow_item_* To: Ferruh Yigit Cc: Thomas Monjalon , dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Ferruh, Thomas, On Fri, Jan 20, 2023 at 6:19 PM Ferruh Yigit 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 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