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 6181C4389F; Fri, 12 Jan 2024 09:11:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5F364064A; Fri, 12 Jan 2024 09:11:18 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 4B5C84028C for ; Fri, 12 Jan 2024 09:11:18 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 84C5150; Fri, 12 Jan 2024 11:11:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 84C5150 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1705047077; bh=YCh7+UFyiryn3d/SrV2OpWf9k3nBiFQH9qXOUrzcRnc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UkLtYwBCzcxrIo8jXKJg8YPRJqv3tegd/ENdiYb919CfkohCBNN5q64yr9Sd1DerZ 33gqyLOrLJIj3yDvKVDGaRpzvZINeUG3JBO0l9t/JDGOdevcjfIvztGZC07SwXVP3H flpxYpMb3ZW6+SVoAbsm6fFa0GH8nzj8i95Ba2Xw= Message-ID: <61e8a66c-7456-4975-ab29-87f4c48c21ce@oktetlabs.ru> Date: Fri, 12 Jan 2024 11:11:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/3] ethdev: add compare item Content-Language: en-US To: Suanming Mou , Ori Kam , Aman Singh , Yuying Zhang , Thomas Monjalon , Ferruh Yigit Cc: dev@dpdk.org References: <20231214031227.363911-1-suanmingm@nvidia.com> <20231219013337.531548-1-suanmingm@nvidia.com> <20231219013337.531548-3-suanmingm@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20231219013337.531548-3-suanmingm@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 12/19/23 04:33, 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. > > 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 Just one nit below, anyway Acked-by: Andrew Rybchenko I dislike that many line of code are moved, but it looks like it is better than keeping them in place and break order in the file. > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 447e28e694..220b396295 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3841,6 +3841,12 @@ This section lists supported pattern items and their attributes, if any. > > - ``packet_type {unsigned}``: packet type. > > +- ``compare``: match the comparison result between packet fields or value. > + > + - ``op {string}``: comparison operation type. > + - ``a_type {string}``: compared field. > + - ``b_type {string}``: comparator field. > + - ``width {unsigned}``: comparison width. Missing one more empty line before the next section. > > Actions list > ^^^^^^^^^^^^ [snip]