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 7573EA034C; Wed, 21 Dec 2022 08:39:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53752427EB; Wed, 21 Dec 2022 08:39:51 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2085.outbound.protection.outlook.com [40.107.243.85]) by mails.dpdk.org (Postfix) with ESMTP id A071B4113F for ; Wed, 21 Dec 2022 08:39:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Del/oMT/fAyagenFYdSI9Eb4YchXcyfg/KDQUabF2m5Q2X8/E6Yax+V+3y3H0qURw/FLRXXfdCae4n9cA0OF6qeoYGx8fw05b4N0lG0XYhaUj04EZbVQT7ulpP2ySbTr/T2UICNAtkKOFVBupGgKEGPalRWkNpB7wwVKy/EfpXThPKW9++HoCAYOwIzHBwSFK4JsMWnGBLZRZL2UnncGhFffIjgjqYYAm/OSDBfgbTnr3fohGnVgJuRmvK2xDzrSWLVt2EnLcnGXpmc6hEY4cRKFUzWoi+VhGDUtqEDfB81p37GakTm71UIiQJJ+a3Nc/Vw8OUPh0M/uSWwqt5kjGQ== 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=58+ipfMnFanfeS6HuL/uNo1oB9lVL5I6bUxDrmfr7Uo=; b=jezjVRbO851z7fdjeaw/dLAUqmVztnCzNqZOqUMBf4l4/N5Mb3CkolFAYKxegJVxSwp46XCKBdufqU+enXcAYPwQ7/IZzaihO+rBEKJ8F8xVyrtJ8/EseqxPcZjPISiShkOtg3hw8lbLcjjx6n0gKm6dPG+2x6qbsv7J64ZlfVM5riav2mlU9fcwJgYeQtWRcPdrdmgZsNiq1pAvkFGx6naXPkS8piMAKZapEsWACLmSGUWB6LKCwbZhMowkhJFU2aH5STGPGZ4PXQI3k96Bzce9RMq3YaVBFWIpxibCqejw6nlzEMVvMdCBh2rUUZrdL63BEdqv2VfKWX4tgY55QA== 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=58+ipfMnFanfeS6HuL/uNo1oB9lVL5I6bUxDrmfr7Uo=; b=SmVnc7peY2wDbVZD75Tf7zxzCh2K17ks6RMQQAmM1OIO4TqeJP8JYzSog8SXKV+COi4Xco/u0RzK4/tOiug+Cm5LXCFe38j52R40e3IV0NiE++eBOA4NhBR6ee3I1la/W3Uij1dEi/ewX4RfhF/5py8kwqkiFyDogi+rc+jl/aTY4uC59uyUbSkZBhxkWFj5AgcrFhn9f6o5OtKGLB2uNcgnp7Hdx62Mq8nxS7qdZ1ROb58Yy9lakmgRbEH1wb9uZqzs/Dc2Fnq6bu79XAQsi276An9gD7S7FHBZlA0ZlgR/bEvkLi2FtG+JekVu/juBxD+n0hg5SZPrXDRaw7bRSw== Received: from DM6PR13CA0032.namprd13.prod.outlook.com (2603:10b6:5:bc::45) by SJ0PR12MB6903.namprd12.prod.outlook.com (2603:10b6:a03:485::9) 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 07:39:47 +0000 Received: from DM6NAM11FT018.eop-nam11.prod.protection.outlook.com (2603:10b6:5:bc:cafe::be) by DM6PR13CA0032.outlook.office365.com (2603:10b6:5:bc::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.10 via Frontend Transport; Wed, 21 Dec 2022 07:39:47 +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 DM6NAM11FT018.mail.protection.outlook.com (10.13.172.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.10 via Frontend Transport; Wed, 21 Dec 2022 07:39:46 +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; Tue, 20 Dec 2022 23:39:37 -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; Tue, 20 Dec 2022 23:39:34 -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 09:39:10 +0200 Message-ID: <20221221073918.3581151-2-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221221073918.3581151-1-rongweil@nvidia.com> References: <20221221073918.3581151-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: DM6NAM11FT018:EE_|SJ0PR12MB6903:EE_ X-MS-Office365-Filtering-Correlation-Id: bb107eb4-c1ab-472c-4a76-08dae32688e3 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: XH9ZW3Tp6nSkOAtAHiQKvQIJe7oO1s5bjHhnUvY4NEyzpNe/eWG4IjgC6FW1hwjecBBN67y/kM5NpF8Qe2a4tDq9ywG399njPqeOgikS2l0h693f88rMqYolG41QEgK/gsrKanShZvHmFIDicBKM8GXYnB1CVkql7wLtpnSWD80dSDzkDkRttf7THJC392Lw+HAgDWIOQ7teCq/qlnIJEpixqd5E73BXRq7IOlQ0UFYqrY+nGbjjypSQAWNStaOCNnyHKVn5kHVmcvcneoL+i6iDtH8iTHBEFGrNg1CaIMCD9lffA8qq4IcmUaCjms864jVZQo8t6MznC/rECkoioE6OSmhKcX/KDvbe34LWTe4vXQwQvF2G5XPw6s3iTbnoiDfha9gJ3YvvKtDQVRFv8mzlW/1ixk6wpyPDaTl2oS6S2vSnrrjC4/W9tDCqBt3Yu8sNZCFAVD1VPxP/4eR4Q2D+ApGoPdjoneMaw45Tm84tzFIuMSidoQXKhfYuyjuG70grnzYY3ZhcIGL0AxIZDQAmKsSM6epRZmv1rXA+QyCUKxb8ZJMx7FbTFbtfe/cic15hjuv/YYuRv+E+8Fpiu9XGzNRwysxyx1catYYVevcqE4LaCYU+l2Zp9+NetRPNhMdrl0y2Wuo+r3eK30xftzzpkKUo+hUS3YZYLivi+xEASn944eQUOTqD1YFWb6D8WH6ecy4RupUHbP+2mnJy2wGzFD6wEJ/KXp5YdeZThls= 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)(39860400002)(396003)(376002)(346002)(451199015)(40470700004)(46966006)(36840700001)(8936002)(6286002)(5660300002)(4326008)(83380400001)(7636003)(7696005)(8676002)(356005)(70206006)(40460700003)(70586007)(41300700001)(426003)(16526019)(2906002)(86362001)(82310400005)(54906003)(82740400003)(336012)(55016003)(2616005)(1076003)(186003)(47076005)(26005)(40480700001)(107886003)(110136005)(6666004)(478600001)(36756003)(36860700001)(316002)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 07:39:46.9799 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb107eb4-c1ab-472c-4a76-08dae32688e3 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: DM6NAM11FT018.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6903 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 | 10 ++++--- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 59932e82a6..db7063c4e0 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2966,23 +2966,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 21f7caf540..5f53a8ea19 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3800,7 +3800,8 @@ 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_HASH_RESULT, /**< Hash result. */ + RTE_FLOW_FIELD_HASH_RESULT, /**< Hash result. */ + RTE_FLOW_FIELD_FLEX_ITEM /**< Flex item. */ }; /** @@ -3814,8 +3815,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