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 E159EA00C2; Thu, 10 Feb 2022 11:08:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BA5D4013F; Thu, 10 Feb 2022 11:08:42 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6EE2E40041 for ; Thu, 10 Feb 2022 11:08:41 +0100 (CET) Received: from [192.168.1.126] (unknown [188.242.181.57]) (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 8EE587D; Thu, 10 Feb 2022 13:08:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 8EE587D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1644487720; bh=TCdTs/FLG0vMmtWC0xv23GfhvMQiCVJr2gIZEoT0qvA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SXb1KM8FquXmGzgnpdVE8A2OB+Bc7/fg6reZhF9dODfIBtzPpwqHVTCPHmRu5zGn3 ao5f4wra0P0WbeRybv6lIEVEaOuFrZkh2DhwfKPDgdAwU7PLdL3YRn8yVvpithOKpY YbZpRzP5EpSgxrSwZYXMGOMO4vMtpmWKIec0PGRs= Message-ID: <31ccc26f-9425-8df4-0dab-b57921dfad33@oktetlabs.ru> Date: Thu, 10 Feb 2022 13:08:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v6 1/3] ethdev: introduce IP reassembly offload Content-Language: en-US To: Akhil Goyal , dev@dpdk.org Cc: anoobj@marvell.com, matan@nvidia.com, konstantin.ananyev@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com, rosen.xu@intel.com, olivier.matz@6wind.com, david.marchand@redhat.com, radu.nicolau@intel.com, jerinj@marvell.com, stephen@networkplumber.org, mdr@ashroe.eu References: <20220208201111.420971-1-gakhil@marvell.com> <20220208222027.1364292-1-gakhil@marvell.com> <20220208222027.1364292-2-gakhil@marvell.com> From: Andrew Rybchenko In-Reply-To: <20220208222027.1364292-2-gakhil@marvell.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 2/9/22 01:20, Akhil Goyal wrote: > IP Reassembly is a costly operation if it is done in software. > The operation becomes even more costlier if IP fragments are encrypted. > However, if it is offloaded to HW, it can considerably save application > cycles. > > Hence, a new offload feature is exposed in eth_dev ops for devices which > can attempt IP reassembly of packets in hardware. > - rte_eth_ip_reassembly_capability_get() - to get the maximum values > of reassembly configuration which can be set. > - rte_eth_ip_reassembly_conf_set() - to set IP reassembly configuration > and to enable the feature in the PMD (to be called before > rte_eth_dev_start()). > - rte_eth_ip_reassembly_conf_get() - to get the current configuration > set in PMD. > > Now when the offload is enabled using rte_eth_ip_reassembly_conf_set(), > the resulting reassembled IP packet would be a typical segmented mbuf in > case of success. > > And if reassembly of IP fragments is failed or is incomplete (if > fragments do not come before the reass_timeout, overlap, etc), the mbuf > dynamic flags can be updated by the PMD. This is updated in a subsequent > patch. > > Signed-off-by: Akhil Goyal Just one nit below, sorry that I'm so late > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index 147cc1ced3..0215f9d854 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -5202,6 +5202,106 @@ int rte_eth_representor_info_get(uint16_t port_id, > __rte_experimental > int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features); > > +/* Flag to offload IP reassembly for IPv4 packets. */ > +#define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0)) > +/* Flag to offload IP reassembly for IPv6 packets. */ > +#define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1)) Doxygen style comments shoud be above: /**