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 15C1C43A0F; Tue, 30 Jan 2024 18:33:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0316D41141; Tue, 30 Jan 2024 18:33:40 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2048.outbound.protection.outlook.com [40.107.93.48]) by mails.dpdk.org (Postfix) with ESMTP id 6B91A41140 for ; Tue, 30 Jan 2024 18:33:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KPfabS0Z8NLgOCMkrh8Zq0l/lKwD6NeZJTKqma3CNTEmKFx4At5y9oSJ/7HWYvBs6rEHkj+igcOEKIYODrODQ/BejRr9tMSerbFpik/3gGicAWeKNYMo8f49/PhHIukxQjZh3C7Mnh0TLZYy9mwiRDK9bpsT6/jERsqRlkBzSbED3ope3dUyFmtTgCy2+5qB2l+YAu/XM6QNyv86uWlsgEhSErJld84GKIFdsqa9FEebuYJ9joXG/rfCvGOtUbn39BDPBdS9uj1iAN5sq+ATAL3TzEUQNvW+r0eorrQO5vlqAKZeSFbSbJNNVqoG6IdGcvrOU/kzoMnEq5I9eCfMRA== 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=bICpfjt7XreSHNpLhzP50XVzyoYb9NAzVx05GmYlGpU=; b=a9zyHzkRN73Tc/81iEWkTU9dJhiw8baXhm8Jhm37U2vHkJRYCZT1XxhWDRrJfT74HUs4RatvV8WDcL/4+Fbq+G+O1SRq/wKNiw0IzF6Wk1Oevv0c9p4vLQVJzAj6jALMscvTXNKvtbMXa9kOcDfojrMByoXTXlqYxIcPkiWnx7t1ztPPFkx5IxxwdJ4F+6c9ZVvvfPNywOic1TQJRxhUFdI2UULbIblbgCe6rLpDZzuSksQCEK928y8CDjWEioy0u2aFSuigM+mAzVjoGs3a4PalXg+oI/Gyh283oFzIcrVgNwAhwjEwAnTc4NRrEa63akSUgWAJiJ+SltwSbyM0ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=bICpfjt7XreSHNpLhzP50XVzyoYb9NAzVx05GmYlGpU=; b=TLfoj5XrLhPT0NLYqEc6IeQffODMaAtnc5ZjP/djGPsRKGUiPjxVvtvwtG7NEFDLdqkfrjWqWsTaho8y8Dm2DfU0H2fOQEecIHL0cZ9CI21QSvHAusJ80h6afz6aYUhNW8IZhJZNdZzpAgv6Yt67oWrvyFanPpcliJGjNya3HqM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM8PR12MB5415.namprd12.prod.outlook.com (2603:10b6:8:25::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Tue, 30 Jan 2024 17:33:36 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7228.029; Tue, 30 Jan 2024 17:33:36 +0000 Message-ID: <2594409d-5c8d-4347-b724-eece2b775376@amd.com> Date: Tue, 30 Jan 2024 17:33:30 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/3] ethdev: add compare item Content-Language: en-US To: Suanming Mou , orika@nvidia.com, Aman Singh , Yuying Zhang , Thomas Monjalon , Andrew Rybchenko Cc: dev@dpdk.org References: <20231219013337.531548-1-suanmingm@nvidia.com> <20240115091318.1053433-1-suanmingm@nvidia.com> <20240115091318.1053433-3-suanmingm@nvidia.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZAR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H dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240115091318.1053433-3-suanmingm@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0007.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1d::6) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM8PR12MB5415:EE_ X-MS-Office365-Filtering-Correlation-Id: 1757fb82-cd20-49f9-2ebb-08dc21b996af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j3cOrM0n8IlBtZzufli+/wW+7v0+5V7odTzbIQE9sdQrB4iZ73h+26XdR3Do9TuPnE/dy9XKeye2kLN0y5UkxObzJhdLy8KrDZPG8xA0vpJfBk2A5mu/CbxpS8qTaon7WCmcszemm9uoFEn1apWuDy6CM5h61FI7Rc5pd23jJPJEx86E3x/gr7kq/9YyuP1xxtLTViZUeD5XNPSX80QYfja+Uowr3Hnv2Am7T2VD2176GKl02avUOmgaADvVoYXB+ISmjoyNlZr3Ur13exb4bhnFgevdmV47efg2rRJ0vrWtYdpl5Tbm4T3wbb2PMs7bGgihJVJLPb0lflSx19DUZZdlsWbQwAj0J9zSrrXftAMAkS9VUw2MQ5kkF7BSQFHEDJ1wSJAL7WMgS/X7xI5RwVIPa2+PIVVarL3MABtoZ3r8zqBszTveiBHC0vYIRf8hPH+j9ywo7VS7LoZAHgcXbE8gwynBACHFbhFGbOnYcMywMcQP/ZUIvyJIHLksxRPgdKCRPxDvJftUh4aqtJNj477yXVLhZYhbVBEOhsozGhIULR4Q45p23Qe2COu8oN4CeV5IoYpzmNqV21GF8/vcK6pbnCx1bfdMWVbLhPaiRKzb0orzJ8u2AsEP/IpY1L5jRU5zjZng85Qbexy61J4WkDIDSS3Jk8giI83eTF0MKqDqfiAe8nRL6i718p76UZ2huNftiMOdn02qJ2eyFQhL+A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(346002)(396003)(136003)(39860400002)(230922051799003)(230173577357003)(230273577357003)(1800799012)(186009)(64100799003)(451199024)(83380400001)(316002)(110136005)(31696002)(66946007)(86362001)(66556008)(66476007)(6486002)(478600001)(53546011)(6666004)(38100700002)(8936002)(31686004)(2616005)(26005)(6512007)(8676002)(6506007)(44832011)(4326008)(2906002)(5660300002)(41300700001)(36756003)(21314003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YUp2WisvT21KbmxDRlZhVmVNaFBTNTFQQzh4TElQWWVMWGdvSGpxV3RZbU92?= =?utf-8?B?UEl5QndNcU51WHU3Z0FFVE1HeFd3Zzk0eTgyYXB1WWRMUXFMSGU2Tk8yT2xL?= =?utf-8?B?WlloVm0ra0JjQ3A4WUN4ZzFwZEYraG9RV3RTbHl6Vlp6dkpCdGJmT0pOcHRw?= =?utf-8?B?RUtFRHlVWjM5V0tzQVZhaWJ1NmxUOWEwekpiRkpQUHZwYktNaFRwRy9WeUIx?= =?utf-8?B?QXFxOUU1T0dTVEVpcjlmV3paRHBWTGtQcGE1V1hIR0xBRyt2VG9RcDFaWExn?= =?utf-8?B?RGpXTjNlNHZHT1BBMkJKOVR2TzEyU3FHaDVLYlk3L3RMWUNxanB6bmsvVk1z?= =?utf-8?B?bzIrejZFUkltUjEzWWVGRUNtemhZdjU4Mi9tc3hLczdYYjVOU1psZFhRR1BS?= =?utf-8?B?K0pLRi9SbEh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= =?utf-8?B?MFdjamJ3dktyM1RqOTg5LzJBRGdzMHIxVTVrZkVUVkZLT1hKb2tXL0k0elBx?= =?utf-8?B?M1RONnI4eXJIL21sYUErYmozZUNicXQ2a1JpODZ2Vkw2ejF4alQxN1I5Nnc5?= =?utf-8?B?TTZxR28zZmluMkREUkN4MUlNbVNOYXEyeHR3RFFhcXU5VXpBUUlORFVQVy9y?= =?utf-8?B?S0VJYkQ1YUI0VFVZQzlQcG84cy9kM1ZvMmhncFlYN1Y4b09tNUMvR1ZkZGY2?= =?utf-8?B?ekxoZG9vcjg1akR0dWlyQkVkYnYyRTNwbDh3ZnBoK213ZGdudWwzZGl1aXR1?= =?utf-8?B?TVN0ZVd4d2pzYzdPUjYzK3BzNU5OWG1qeng4U0Y3MElrd1BaVWJBYVM4T2or?= =?utf-8?B?a0JEOFZ6cGkrZXAxclE2RVAzdUZaMU9OVCtFS3FiUGpFYnpuV041eldFTzdy?= =?utf-8?B?NHdKY00rVFl6YUVpaHFmVDBBZm8vMDIyLzBxaUxGcUdOTGJBN0dhcHRWMUNa?= =?utf-8?B?bDFMSHlLNnZRZ0tMOHRzMjJ1NUFadkdBYllFSDNmVTRPazNFNlJtbWYxd0k1?= =?utf-8?B?SFRNU2d5bEpUMmxsRnkrYy81TkQrQmE5SHNwR3gxbmwwaFdRbDBlOTZPaTJq?= =?utf-8?B?dFFRcXZveDlQWG5PNll2ekU0aHo3eUZ1anRrMjlNMU83OWRuUHBMM2l6R3Ja?= =?utf-8?B?dUg2RVlmdURCTStRRDBLWnZhNUJUcWp4U0cyQVhSVkY2MnpmSXJmRUZEQi9T?= =?utf-8?B?Z1ZYSFhwUzEzYUpVNzYyODUrVWYvUi9pNGZBWEczb3J5ZUVZZlloYVNieFpV?= =?utf-8?Q?5M88=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1757fb82-cd20-49f9-2ebb-08dc21b996af X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 17:33:36.2964 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jI1xvVTu01CVLPj9dr9ezZ7DQDjc7tv0s0r2PQcsnjNKxyArQuSVkRepUUWxhwEH X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5415 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 On 1/15/2024 9:13 AM, Suanming Mou wrote: > The new item type is added for the case user wants to match traffic > based on packet field compare result with other fields or immediate > value. > > e.g. take advantage the compare item user will be able to accumulate > a IPv4/TCP packet's TCP data_offset and IPv4 IHL field to a tag > register, then compare the tag register with IPv4 header total length > to understand the packet has payload or not. > ack, above sample makes it easier to understand. This patch is adding testpmd commands, can you please provide some sample commands in commit log? The more samples are better, as far as I remember there was a testpmd documentation that documents the sample usages, can you please check for it? > The supported operations can be as below: > - RTE_FLOW_ITEM_COMPARE_EQ (equal) > - RTE_FLOW_ITEM_COMPARE_NE (not equal) > - RTE_FLOW_ITEM_COMPARE_LT (less than) > - RTE_FLOW_ITEM_COMPARE_LE (less than or equal) > - RTE_FLOW_ITEM_COMPARE_GT (great than) > - RTE_FLOW_ITEM_COMPARE_GE (great than or equal) > > Signed-off-by: Suanming Mou > Acked-by: Ori Kam > Acked-by: Andrew Rybchenko <...> > > -static const char *const modify_field_ids[] = { > +static const char *const flow_field_ids[] = { > I wonder if this rename should be in previous patch, as it does the logical change of the modify action specific fields to more generic fields. <...> > diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst > index a691e794f4..8c8c661218 100644 > --- a/doc/guides/rel_notes/release_24_03.rst > +++ b/doc/guides/rel_notes/release_24_03.rst > @@ -55,6 +55,11 @@ New Features > Also, make sure to start the actual text at the margin. > ======================================================= > > +* **Added compare flow matching criteria.** > + > + Added ``RTE_FLOW_ITEM_TYPE_COMPARE`` to allow matching on compare > + result between the packet fields or value. > + > * **Updated NVIDIA mlx5 driver.** > > * Added support for accumulating from src field to dst field. > I guess you are rebasing on some internal repo, because above NVIDIA note doesn't exist in upstream repo. Can you please rebase on latest next-net, this also helps to resolve conflict with random action in upstream repo. <...> > +/** > + * Field IDs for packet field. > + */ > +enum rte_flow_field_id { > + RTE_FLOW_FIELD_START = 0, /**< Start of a packet. */ > + RTE_FLOW_FIELD_MAC_DST, /**< Destination MAC Address. */ > + RTE_FLOW_FIELD_MAC_SRC, /**< Source MAC Address. */ > + RTE_FLOW_FIELD_VLAN_TYPE, /**< VLAN Tag Identifier. */ > + RTE_FLOW_FIELD_VLAN_ID, /**< VLAN Identifier. */ > + RTE_FLOW_FIELD_MAC_TYPE, /**< EtherType. */ > + RTE_FLOW_FIELD_IPV4_DSCP, /**< IPv4 DSCP. */ > + RTE_FLOW_FIELD_IPV4_TTL, /**< IPv4 Time To Live. */ > + RTE_FLOW_FIELD_IPV4_SRC, /**< IPv4 Source Address. */ > + RTE_FLOW_FIELD_IPV4_DST, /**< IPv4 Destination Address. */ > + RTE_FLOW_FIELD_IPV6_DSCP, /**< IPv6 DSCP. */ > + RTE_FLOW_FIELD_IPV6_HOPLIMIT, /**< IPv6 Hop Limit. */ > + RTE_FLOW_FIELD_IPV6_SRC, /**< IPv6 Source Address. */ > + RTE_FLOW_FIELD_IPV6_DST, /**< IPv6 Destination Address. */ > + RTE_FLOW_FIELD_TCP_PORT_SRC, /**< TCP Source Port Number. */ > + RTE_FLOW_FIELD_TCP_PORT_DST, /**< TCP Destination Port Number. */ > + RTE_FLOW_FIELD_TCP_SEQ_NUM, /**< TCP Sequence Number. */ > + RTE_FLOW_FIELD_TCP_ACK_NUM, /**< TCP Acknowledgment Number. */ > + RTE_FLOW_FIELD_TCP_FLAGS, /**< TCP Flags. */ > + RTE_FLOW_FIELD_UDP_PORT_SRC, /**< UDP Source Port Number. */ > + RTE_FLOW_FIELD_UDP_PORT_DST, /**< UDP Destination Port Number. */ > + RTE_FLOW_FIELD_VXLAN_VNI, /**< VXLAN Network Identifier. */ > + RTE_FLOW_FIELD_GENEVE_VNI, /**< GENEVE Network Identifier. */ > + RTE_FLOW_FIELD_GTP_TEID, /**< GTP Tunnel Endpoint Identifier. */ > + RTE_FLOW_FIELD_TAG, /**< Tag value. */ > + RTE_FLOW_FIELD_MARK, /**< Mark value. */ > + RTE_FLOW_FIELD_META, /**< Metadata value. */ > + RTE_FLOW_FIELD_POINTER, /**< Memory pointer. */ > + RTE_FLOW_FIELD_VALUE, /**< Immediate value. */ > + RTE_FLOW_FIELD_IPV4_ECN, /**< IPv4 ECN. */ > + 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_IPV6_PROTO, /**< IPv6 next header. */ > + RTE_FLOW_FIELD_FLEX_ITEM, /**< Flex item. */ > + RTE_FLOW_FIELD_HASH_RESULT, /**< Hash result. */ > + RTE_FLOW_FIELD_GENEVE_OPT_TYPE, /**< GENEVE option type. */ > + RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */ > + RTE_FLOW_FIELD_GENEVE_OPT_DATA, /**< GENEVE option data. */ > + RTE_FLOW_FIELD_MPLS, /**< MPLS header. */ > + RTE_FLOW_FIELD_TCP_DATA_OFFSET, /**< TCP data offset. */ > + RTE_FLOW_FIELD_IPV4_IHL, /**< IPv4 IHL. */ > + RTE_FLOW_FIELD_IPV4_TOTAL_LEN, /**< IPv4 total length. */ > + RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN /**< IPv6 payload length. */ > +}; > + +1 to move the structs to keep the proper order, but not sure if it is better to do this in previous patch or this one. > +/** > + * @warning > + * @b EXPERIMENTAL: this structure may change without prior notice > + * > + * Field description for packet field. > + */ > +struct rte_flow_field_data { > + enum rte_flow_field_id field; /**< Field or memory type ID. */ > + union { > + struct { > + /** Encapsulation level and tag index or flex item handle. */ > + union { > + struct { > + /** > + * Packet encapsulation level containing > + * the field to modify. > + * > + * - @p 0 requests the default behavior. > + * Depending on the packet type, it > + * can mean outermost, innermost or > + * anything in between. > + * > + * It basically stands for the > + * innermost encapsulation level. > + * Modification can be performed > + * according to PMD and device > + * capabilities. > + * > + * - @p 1 requests modification to be > + * performed on the outermost packet > + * encapsulation level. > + * > + * - @p 2 and subsequent values request > + * modification to be performed on > + * the specified inner packet > + * encapsulation level, from > + * outermost to innermost (lower to > + * higher values). > + * > + * Values other than @p 0 are not > + * necessarily supported. > + * > + * @note that for MPLS field, > + * encapsulation level also include > + * tunnel since MPLS may appear in > + * outer, inner or tunnel. > + */ > + uint8_t level; > + union { > + /** > + * Tag index array inside > + * encapsulation level. > + * Used for VLAN, MPLS or TAG types. > + */ > + uint8_t tag_index; > + /** > + * Geneve option identifier. > + * Relevant only for > + * RTE_FLOW_FIELD_GENEVE_OPT_XXXX > + * modification type. > + */ > + struct { > + /** > + * Geneve option type. > + */ > + uint8_t type; > + /** > + * Geneve option class. > + */ > + rte_be16_t class_id; > + }; > + }; > + }; > + struct rte_flow_item_flex_handle *flex_handle; > + }; > + /** Number of bits to skip from a field. */ > + uint32_t offset; > + }; > + /** > + * Immediate value for RTE_FLOW_FIELD_VALUE, presented in the > + * same byte order and length as in relevant rte_flow_item_xxx. > + * The immediate source bitfield offset is inherited from > + * the destination's one. > + */ > + uint8_t value[16]; > + /** > + * Memory address for RTE_FLOW_FIELD_POINTER, memory layout > + * should be the same as for relevant field in the > + * rte_flow_item_xxx structure. > + */ > + void *pvalue; > + }; > +}; > + > I am aware that you are just moving the above struct, but it is nested too much which is making it hard to read. As you are touching it, can we extract some structs and make this struct less nested, what do you think? Of course it needs to be done in separate patch, as a preperation/clean-up patch before moving it around. <...> > +/** > + * > + * RTE_FLOW_ITEM_TYPE_COMPARE > + * > + * Matches the packet with compare result. > + * > + * The operation means a compare with b result. > + */ > +struct rte_flow_item_compare { > + enum rte_flow_item_compare_op operation; /* The compare operation. */ > + struct rte_flow_field_data a; /* Field be compared. */ > + struct rte_flow_field_data b; /* Field as comparator. */ > Variable names 'a' and 'b' are not descriptive although it may be OK since there is no significance to the values, but other option can be 'first' and 'second', but overall not strong opinion.