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 A0D2F4242B; Fri, 20 Jan 2023 10:07:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D70C40150; Fri, 20 Jan 2023 10:07:34 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id EF913400D5 for ; Fri, 20 Jan 2023 10:07:32 +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 (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 5EA3650; Fri, 20 Jan 2023 12:07:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 5EA3650 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1674205652; bh=6s0tMjMsuGmMC07TBpVJZ1f7KcysSiuF6EtOsaUCzzY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eZtLa98LAsEajdKkaqHqWQyiiG1kVDwRi4w3pTixSFDartoWLcgRZ51SfKmmykrma QC98pn5oSh68MQoJwJEOMJ4O9rfBgZrSElKnFrPWBfCu8v4aFgTYRP17DNIiKnX3JA VPOdKiAFSrXDuOXRwJBmaMOwJXdDKggInPE8qvSg= Message-ID: <3ba49f25-52d0-fe07-02e6-22a71e0fbe13@oktetlabs.ru> Date: Fri, 20 Jan 2023 12:07:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2 01/11] ethdev: add flex item modify field support Content-Language: en-US To: Rongwei Liu , matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com, thomas@monjalon.net, Aman Singh , Yuying Zhang , Ferruh Yigit Cc: dev@dpdk.org, rasland@nvidia.com References: <20221221084000.3680015-2-rongweil@nvidia.com> <20230119045824.665663-1-rongweil@nvidia.com> <20230119045824.665663-2-rongweil@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20230119045824.665663-2-rongweil@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 1/19/23 07:58, Rongwei Liu wrote: > 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. > > Add flex item modify field cmdline support. Now user can use > testpmd cli to specify which flex item to be modified, either > source or destination. > > Syntax is as below: > modify_field op set dst_type flex_item dst_level 0 > dst_offset 16 src_type value src_value 0x123456781020 width 8 > > Signed-off-by: Rongwei Liu > Acked-by: Ori Kam [snip] > diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst > index b8c5b68d6c..c673205e5e 100644 > --- a/doc/guides/rel_notes/release_23_03.rst > +++ b/doc/guides/rel_notes/release_23_03.rst > @@ -56,6 +56,10 @@ New Features > ======================================================= > > It should be just one empty line here > +* ethdev: added a new field: "added a new field' is too generic. > + > + - modify flex item: ``rte_flow_action_modify_data.flex_handle`` > + And two empty lines here. > Removed Items > ------------- > > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h > index b60987db4b..c66a65351d 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. */ Have you tried to generate documentation? If it is a union documentation it should be /**, not /**<. In general, it is better to document union from overall point of view. What is it logically? Do not define union as just a union of its fields. > + union { > + uint32_t level; > + struct rte_flow_item_flex_handle *flex_handle; Union items documentation missing. > + }; > /** Number of bits to skip from a field. */ > uint32_t offset; > };