From patchwork Fri Feb 3 16:48:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 123040 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4489741BBE; Fri, 3 Feb 2023 17:49:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E10DA4067B; Fri, 3 Feb 2023 17:49:11 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2065.outbound.protection.outlook.com [40.107.93.65]) by mails.dpdk.org (Postfix) with ESMTP id 991A34021E for ; Fri, 3 Feb 2023 17:49:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oV3hPpRsmgXJKf3k1yhM40F9OWUWNxqbUeUp0nw90+Tb5kXgodggatwmVCbRvLA9+mfElK1CPgDgp61ZxjUK78OwD8J/nDyou5S1zIZgM9gTiA+fZctiMAx12z2om8WTtmCPLzNS78oRuA0lg4iQJRP/sW/BOtDfSs+fzDx2HQgzIzz73tXoFXReDIA8cZ4u7QUhttM2ZP4Zk/VifJiBJW5py2DtpnmFNztZpUoZoBhm26HlExPVM9uOuri3XVVURxo6UHeLczt9iItb4kTvdj+wFFbeEQ2FLw5E7vpku4aRkraegcYtROwAm0TiIYavXyXWpOuE7/5k7sDzywG1aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eKeG2ysAEP8/7guZ/kLLp2R2ou+nDNn8zKzGq9qGhmo=; b=dy5PYkyFPcoeii5iGHu5bbsvFp/XyeXebXunGc2laWbEgmeOvf+EUsclSdZgsEj6y5X0bahk454B/2Ux9BIw8YjzqqEYWPd764JekxSx8sTg93zBcOmTfDW5fx4sY230aRd3pfomaxnypdsmsPW0FPYXwGfyGpMBgZDnlOQRZ/DjbcS2xcEHxvXPT1Mt+aQsC+hZZtoS4sChFAI0Ri4+HyNu4BPRx5l9ZjWMtbVGZKDhvLjyKaad4JqEAHufZNBy0n6yzzFdyWGY2CQMw0YCdaJ00b4vg05YOmeMZ6dx5PAW/lvPd6L1gv1vKwiRZ7Lxv/PlrIvEU8CHnVZezT/3/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=monjalon.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eKeG2ysAEP8/7guZ/kLLp2R2ou+nDNn8zKzGq9qGhmo=; b=C+VmALqERDF7zYviLyzCypguIsO8WGQXdvTvFaQALm5OwXTF9Pl9+ct42MoPGhkFwR1+WlCRHXF92b3Lf3rQL+oRGUhHNVTKFC7Zt2j2gpDKxxpX7Y2R9qBL6Nk+OiA4SZ0sDCO/hZqf98iBR6Z7wq1nt3JMt0JsBke4wPkvJGg= Received: from DM6PR03CA0029.namprd03.prod.outlook.com (2603:10b6:5:40::42) by BN9PR12MB5368.namprd12.prod.outlook.com (2603:10b6:408:105::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Fri, 3 Feb 2023 16:49:06 +0000 Received: from DS1PEPF0000E659.namprd02.prod.outlook.com (2603:10b6:5:40:cafe::87) by DM6PR03CA0029.outlook.office365.com (2603:10b6:5:40::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.31 via Frontend Transport; Fri, 3 Feb 2023 16:49:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E659.mail.protection.outlook.com (10.167.18.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6064.17 via Frontend Transport; Fri, 3 Feb 2023 16:49:06 +0000 Received: from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 3 Feb 2023 10:49:05 -0600 From: Ferruh Yigit To: Thomas Monjalon CC: David Marchand , Subject: [PATCH v7 0/7] start cleanup of rte_flow_item_* Date: Fri, 3 Feb 2023 16:48:47 +0000 Message-ID: <20230203164854.602595-1-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025214410.715864-1-thomas@monjalon.net> References: <20221025214410.715864-1-thomas@monjalon.net> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E659:EE_|BN9PR12MB5368:EE_ X-MS-Office365-Filtering-Correlation-Id: 723fce7f-48c0-44f6-6555-08db0606903b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JW86YY3ozGfVWq504O1gKW5HQi8q649nrsG5bSjSfw4wLdrVZo9rjrnwjZwTLEZptzZDaICnqu4QGxNKWl0uyjMCoRgU0w80bgNPdPLl/2/IiHBA2ktlm3benzPu+guj1aE/lhvrMUWcX35jdZINkVyE0k6BmuOeMkFS3BTvfbtNkZpFguh3gOigG7wG8qZqH78siR6cc0rBNieallYp0OfAfoLVi+ULE0mUhpXi9HrYuyvPGw3fxfN6SrOA/MESUOjIjIwx1Pdd11p4K95W+LtE8NXiyfbim9bqT7uCfLzASWUho5UCL2fNjzOnEx8t95Kxm2PbFJOYcnnDqzQrP2VVRxxKEzT2IVukXrYbPQUxklZUHeycF94SAaKOI7mpmcEeeUtNPL907rtL24z/1HlYPrXtyCvbSceIrf2ccwQFOwqe4lEh2YZjy+OtiKY4ukrBNeB0Lu36RspwFE+BYoWBcl2oqfqFI7nyBanRpYsgQeWn7zB1XYfnfHiPx6l6Nl2wqHwe0OVwQVqViLinrfT0YjmsyZvArXLzHEfOUsOJefSS7YphuiDSm8HXVM7CzvwIQIGoJPB/Ivsv4DUiAS5Irq+GbDnkBukoU1iuWeKean3PGsGB/O7WipIz12YOykvYcYuzT/ogdrznGp7RA6rd90furOqBhIZvQkhcVpaoC4u590buew8i+rkKG1QOATibaATwdjGCVirL545mdM4ovCkpff4wdFRLnhsNe6g= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(376002)(396003)(346002)(136003)(451199018)(46966006)(36840700001)(40470700004)(16526019)(6666004)(316002)(4326008)(82740400003)(36756003)(70206006)(6916009)(82310400005)(8936002)(8676002)(54906003)(70586007)(5660300002)(81166007)(36860700001)(356005)(86362001)(26005)(1076003)(186003)(41300700001)(336012)(2906002)(40480700001)(426003)(47076005)(44832011)(478600001)(40460700003)(7696005)(2616005)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2023 16:49:06.1658 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 723fce7f-48c0-44f6-6555-08db0606903b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E659.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5368 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 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. v7: * replace 0xffff -> UINT16_MAX in 'rte_flow_item_higig2_hdr_mask.hdr.ppt1.classification' * drop "GRE protocol struct for flow matching" patch, to fine grain using generic fileds better, this will be done later v6: * Fix "struct rte_arp_hdr" field doxygen comment v5: * Fix more RHEL7 build error v4: * Fix build error for RHEL7 (gcc 4.8.5) caused by nested struct initialization. v3: * Updated Higig2 protocol flow item assignment taking into account endianness annotations. 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 Thomas Monjalon (7): ethdev: use Ethernet protocol struct for flow matching net: add smaller fields for VXLAN ethdev: use VXLAN protocol struct for flow matching ethdev: use GTP protocol struct for flow matching ethdev: use ARP protocol struct for flow matching doc: fix description of L2TPV2 flow item net: mark all big endian types app/test-flow-perf/actions_gen.c | 2 +- app/test-flow-perf/items_gen.c | 20 +-- app/test-pmd/cmdline_flow.c | 166 +++++++++++------------ doc/guides/prog_guide/rte_flow.rst | 51 ++----- doc/guides/rel_notes/deprecation.rst | 5 +- drivers/net/bnxt/bnxt_flow.c | 54 ++++---- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 100 +++++++------- drivers/net/bonding/rte_eth_bond_pmd.c | 12 +- drivers/net/cxgbe/cxgbe_flow.c | 44 +++--- drivers/net/dpaa2/dpaa2_flow.c | 48 +++---- drivers/net/dpaa2/dpaa2_mux.c | 2 +- drivers/net/e1000/igb_flow.c | 14 +- drivers/net/enic/enic_flow.c | 24 ++-- drivers/net/enic/enic_fm_flow.c | 16 +-- drivers/net/hinic/hinic_pmd_flow.c | 14 +- drivers/net/hns3/hns3_flow.c | 40 +++--- drivers/net/i40e/i40e_fdir.c | 14 +- drivers/net/i40e/i40e_flow.c | 124 ++++++++--------- drivers/net/i40e/i40e_hash.c | 4 +- drivers/net/iavf/iavf_fdir.c | 18 +-- drivers/net/iavf/iavf_fsub.c | 10 +- drivers/net/iavf/iavf_ipsec_crypto.c | 4 +- drivers/net/ice/ice_acl_filter.c | 20 +-- drivers/net/ice/ice_fdir_filter.c | 24 ++-- drivers/net/ice/ice_switch_filter.c | 64 ++++----- drivers/net/igc/igc_flow.c | 8 +- drivers/net/ipn3ke/ipn3ke_flow.c | 12 +- drivers/net/ixgbe/ixgbe_flow.c | 58 ++++---- drivers/net/mlx4/mlx4_flow.c | 38 +++--- drivers/net/mlx5/hws/mlx5dr_definer.c | 40 +++--- drivers/net/mlx5/mlx5_flow.c | 40 +++--- drivers/net/mlx5/mlx5_flow_dv.c | 154 ++++++++++----------- drivers/net/mlx5/mlx5_flow_hw.c | 80 +++++------ drivers/net/mlx5/mlx5_flow_verbs.c | 38 +++--- drivers/net/mlx5/mlx5_trigger.c | 28 ++-- drivers/net/mvpp2/mrvl_flow.c | 28 ++-- drivers/net/nfp/nfp_flow.c | 12 +- drivers/net/sfc/sfc_flow.c | 52 +++---- drivers/net/sfc/sfc_mae.c | 46 +++---- drivers/net/tap/tap_flow.c | 58 ++++---- drivers/net/txgbe/txgbe_flow.c | 28 ++-- lib/ethdev/rte_flow.h | 97 ++++++++----- lib/net/rte_arp.h | 28 ++-- lib/net/rte_gre.h | 2 +- lib/net/rte_higig.h | 6 +- lib/net/rte_mpls.h | 2 +- lib/net/rte_vxlan.h | 35 ++++- 47 files changed, 904 insertions(+), 880 deletions(-) --- 2.34.1