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 B4DFAA034C; Wed, 21 Dec 2022 09:40:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A10BE41141; Wed, 21 Dec 2022 09:40:38 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061.outbound.protection.outlook.com [40.107.93.61]) by mails.dpdk.org (Postfix) with ESMTP id 2F12540698 for ; Wed, 21 Dec 2022 09:40:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iOxa9V7TNi0t1HVX0/AYgesS5C2DeYvXJ9iKF/dX8Bs3gK3zgArDp8lUKkGa5xlxZf/XT4NfV1VHbh6p+VHFxdCuXBtKQv+az9D9CNBw9Pkp4I9E7imdzm3Flfeody80NwhnIYTkBCU5JdbDkXA/MwZSBqS9t6CBI7UAsCtoWewVg/4lLYXKq7AUtXbZmKHwXOe5FTG0UunWASU8rDnx7Vv7aw0rWrpzVs9Z6kLUP17k7CY44wVCppWi1RiVNc5S0lU473FObsICxOtta+5wOjo55JKYEsJIvVtSM4yoEWFNZALUlu62nDDhdtNF/mMkF1acFw0lYz+xeeYmivN+iQ== 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=5zklOTso2EVAhYNOsidNZhOPLNoa45ersplm5JUkW1Q=; b=nduDSkkg8xLsmHDPLTFEExSFjJ9Puh0/hCJ3Ti0ZbIZPp0AwICjD31fzM5lcNx6sDz56NMwdT3yBArq/pI3zvhp3dvRamlvPHCpjfmKMLP5UEOapP3wz7X8F4DqtcMeeK/Ie1dVv7aBrD+IMlWB0GoMjB59S7KSgo9coFOUCZipQvhNRsVyyw8RWpJZLjqjyipowcCDKNh1F0ZSg6kgzKFxp0/njwJH2Ea81n01q7Z3REFCUH3y0LAZrfzVYpC40aMoi6pi42mcI6u50Nsht78EWrrxLHIPXo/jyM9GNEUXJLEbcnylnPWMmsfNg6G862gQNA/ReAYCm1qs7vW8HWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5zklOTso2EVAhYNOsidNZhOPLNoa45ersplm5JUkW1Q=; b=ic9Q6j7rxwy44algyg65iEdoroCIfjUZ8KFaVBUU/iPSgUdjIzNLNjJ15anLOaDQu+fUT40VbVRy/ry4jkmsr7puBycM8g2fp+Ji+AHqbG7JRtJzrOJkkelge7YROZA0J28IxRdKaE2gDufQR4stxS8YF+wMsWRRufYVteoDhFWBQhWZoW20Ph8+uL6OOpCIcvQBVBDC54tDpii//saDBcBCTJ4rLRLdPS3/zRFUybF6pK5GoPMY31E/T0TsqHjPWLo48gslRcFmrwii2AiVm5Dl/Sy6OzCMl489VgTF2O6y89AjApGvIqoILH0GB7XqYxOiV6lb1G3M1/N5Igjivg== Received: from MW4PR04CA0336.namprd04.prod.outlook.com (2603:10b6:303:8a::11) by IA1PR12MB7664.namprd12.prod.outlook.com (2603:10b6:208:423::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Wed, 21 Dec 2022 08:40:34 +0000 Received: from CO1NAM11FT099.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8a:cafe::3) by MW4PR04CA0336.outlook.office365.com (2603:10b6:303:8a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Wed, 21 Dec 2022 08:40:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT099.mail.protection.outlook.com (10.13.175.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.6 via Frontend Transport; Wed, 21 Dec 2022 08:40:33 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 00:40:19 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 00:40:16 -0800 From: Rongwei Liu To: , , , , Ferruh Yigit , Andrew Rybchenko CC: , Subject: [RFC 1/9] ethdev: add flex item modify field support Date: Wed, 21 Dec 2022 10:39:52 +0200 Message-ID: <20221221084000.3680015-2-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221221084000.3680015-1-rongweil@nvidia.com> References: <20221221084000.3680015-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT099:EE_|IA1PR12MB7664:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e9f933f-6d49-421c-db3a-08dae32f0657 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lG5VivFv6UCUk0t5IZ0rfdc1FQeeCotMo4XaWUeez3hnoHsrLb4L6jsV9CKoLpX5L3TfDoOcF/RjXc6ycKREZ0QymVvsfI3p125qMkzHYiMB1uNBf+J3rN7VaDPJhZfsDGMAteXf3Omnk01g8DqG8Tj0FgOQ0JwTCFd1dclrAKO3r+LDs9kt+nTGTO4B9PpWuK4LPwSM9Eb152LS0foh5cPZz5NzPjFkuhSLOs99UQbglmFegQX/h01DZY4vqsU8NU34DmQzM++VGvnYU/ZwoPx2LTGEykOmo1fkfH4QyiPxuD11pe/Pq6h3gnODafB4pnuH0S/jAs61sr60U0cq00sFRlULmml6iJXZ5u1SyODOoIygyTpIA+tSiopwUMUgpg/rCUvRbhaQ2aMhPL+x+uG37HvCCgA/4DDVzOcnS/v5moxPWzM1evaAhcCSoCZTqRi/BET1+wS/A+6kiNaIpfawEHBmatwwMsXdRyAGMfWn0bOizzt3NioL+jWEK6y872qhdF5Nd/L+9fkvWlzX9quzuSheDhkZJAv1NXObaJyMfSFiKCBp7BQCm+Wr3rqGDEu3ka/AU4JAwtgJsDmvHoSwePZlh1jkdn9AqZzakRgHPaUckyC9ds3IKmRHVquy19KMoEklfLZgoQrZwZRM5u5fUND5q5CTc2iM5NFrId5Iw+6l/yDWMWMkVtjeAGyu2Qcng3xfMapLklSqZafDBWomUUhMS1bkcBc91gLaVsM= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199015)(46966006)(40470700004)(36840700001)(8676002)(70206006)(316002)(70586007)(336012)(36860700001)(55016003)(4326008)(1076003)(36756003)(16526019)(8936002)(83380400001)(41300700001)(5660300002)(47076005)(426003)(7696005)(6666004)(107886003)(478600001)(110136005)(2616005)(40460700003)(6286002)(26005)(82310400005)(54906003)(86362001)(186003)(2906002)(356005)(82740400003)(7636003)(40480700001)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 08:40:33.4173 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e9f933f-6d49-421c-db3a-08dae32f0657 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT099.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7664 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 Add flex item as modify field destination. Add "struct rte_flow_item_flex_handle *flex_handle" into "struct rte_flow_action_modify_data" as union with existed "level" member. This new member is dedicated for modifying flex item. Signed-off-by: Rongwei Liu --- doc/guides/prog_guide/rte_flow.rst | 36 ++++++++++++++------------ doc/guides/rel_notes/release_22_03.rst | 4 +++ lib/ethdev/rte_flow.h | 8 ++++-- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 3e6242803d..ea20145224 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2952,23 +2952,25 @@ value as sequence of bytes {xxx, xxx, 0x85, xxx, xxx, xxx}. .. table:: destination/source field definition - +---------------+----------------------------------------------------------+ - | Field | Value | - +===============+==========================================================+ - | ``field`` | ID: packet field, mark, meta, tag, immediate, pointer | - +---------------+----------------------------------------------------------+ - | ``level`` | encapsulation level of a packet field or tag array index | - +---------------+----------------------------------------------------------+ - | ``offset`` | number of bits to skip at the beginning | - +---------------+----------------------------------------------------------+ - | ``value`` | immediate value buffer (source field only, not | - | | applicable to destination) for RTE_FLOW_FIELD_VALUE | - | | field type | - +---------------+----------------------------------------------------------+ - | ``pvalue`` | pointer to immediate value data (source field only, not | - | | applicable to destination) for RTE_FLOW_FIELD_POINTER | - | | field type | - +---------------+----------------------------------------------------------+ + +-----------------+----------------------------------------------------------+ + | Field | Value | + +=================+==========================================================+ + | ``field`` | ID: packet field, mark, meta, tag, immediate, pointer | + +-----------------+----------------------------------------------------------+ + | ``level`` | encapsulation level of a packet field or tag array index | + +-----------------+----------------------------------------------------------+ + | ``flex_handle`` | flex item handle of a packet field | + +-----------------+----------------------------------------------------------+ + | ``offset`` | number of bits to skip at the beginning | + +-----------------+----------------------------------------------------------+ + | ``value`` | immediate value buffer (source field only, not | + | | applicable to destination) for RTE_FLOW_FIELD_VALUE | + | | field type | + +-----------------+----------------------------------------------------------+ + | ``pvalue`` | pointer to immediate value data (source field only, not | + | | applicable to destination) for RTE_FLOW_FIELD_POINTER | + | | field type | + +-----------------+----------------------------------------------------------+ Action: ``CONNTRACK`` ^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst index 0923707cb8..5fc5aff8a4 100644 --- a/doc/guides/rel_notes/release_22_03.rst +++ b/doc/guides/rel_notes/release_22_03.rst @@ -207,6 +207,10 @@ API Changes * ethdev: Old public macros and enumeration constants without ``RTE_ETH_`` prefix, which are kept for backward compatibility, are marked as deprecated. +* ethdev: added a new field: + + - modify flex item: ``rte_flow_action_modify_data.flex_handle`` + * cryptodev: The asymmetric session handling was modified to use a single mempool object. An API ``rte_cryptodev_asym_session_pool_create`` was added to create a mempool with element size big enough to hold the generic asymmetric diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index b60987db4b..d535722773 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3528,6 +3528,7 @@ enum rte_flow_field_id { RTE_FLOW_FIELD_IPV6_ECN, /**< IPv6 ECN. */ RTE_FLOW_FIELD_GTP_PSC_QFI, /**< GTP QFI. */ RTE_FLOW_FIELD_METER_COLOR, /**< Meter color marker. */ + RTE_FLOW_FIELD_FLEX_ITEM, /**< Flex item. */ }; /** @@ -3541,8 +3542,11 @@ struct rte_flow_action_modify_data { RTE_STD_C11 union { struct { - /** Encapsulation level or tag index. */ - uint32_t level; + /**< Encapsulation level or tag index or flex item handle. */ + union { + uint32_t level; + struct rte_flow_item_flex_handle *flex_handle; + }; /** Number of bits to skip from a field. */ uint32_t offset; }; -- 2.27.0