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 1A630A0C41; Tue, 3 Aug 2021 04:11:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99BE440E32; Tue, 3 Aug 2021 04:11:54 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id EF7CE4069C for ; Tue, 3 Aug 2021 04:11:53 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id j18-20020a17090aeb12b029017737e6c349so1564666pjz.0 for ; Mon, 02 Aug 2021 19:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cLzprijK5U23psYpjS7OxtqYhMvgJDRK9iAraXPAYlE=; b=sqjWcu6i/Q6BUaXYPZGrCkqsjYgQTsDyKTyVBmKK+G29RJ4x6sUeTWgiB2/Gv1uGP9 La8UJ4M8m/8LJCMeJTPm89hKHhZw9GFpur492zZ9qowpnpSfEPMOZJnoqUXc7l8FcFf5 eR/BEsjCwF1tLkcVmBdaRr/kJ1CyJqBsWclZ8Up0YslKZBKWxzg/bZ6Znf7YdZWOaavy Ra4Hyl6wBc2rZm3/m+qVxF0xPphWYB5kQU1dVsz01AKf+Tf7badOxwqaik2/fHSubG0Q hU41PwfreMgkeJbRS+mV8La/ejJI9GwIuoU8cbpo/+jZYiIvIDmkhIdZCuJ7XaxN1jLR 0zIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cLzprijK5U23psYpjS7OxtqYhMvgJDRK9iAraXPAYlE=; b=KYZowUdCYIv/deYExJo14G2CvygYwuFjCrluzN4mG47chR8f/Hgtm2tf3hCPkOYhXj ztnRVIY0g7ScpRXNJcJDSWdK2KOfrCUeMZbGdDjdFVR4ouL3Kktt0scRvxANDkRoW0h8 FbcaiW+xZoBZrjdKOye6AYFc9zK+sYZeaZAoJK5elpBMd8JsLqtbbKzgjMb0tAeobK4G MeTF70kzzucuoeVEyqdSjvpVBavylt+B6SjdPqR+5Tpaf2vYakigohZo2s1nguH65NCf HiU71WU9EBZeX0wHTGmvkvwSiOhVInMTp7LJEvFpFQQLAUOLrUBDd21UgQvXXO9ZGkmG m8Yg== X-Gm-Message-State: AOAM533eun0PokUWm3+Q7jlFqKUfvq401IloiiKOQvYh7UjBOLjTh0xr 1nvkp/4EWDF+QfUV+2i4Cp8= X-Google-Smtp-Source: ABdhPJw08/Dt72/mVB6Qkgs5FFxBLvjTxRqXzAHuvjuAYWYU9o23uRvhmikMeWYeCl4UYhit6oyfhg== X-Received: by 2002:a17:90b:3117:: with SMTP id gc23mr20159859pjb.204.1627956712967; Mon, 02 Aug 2021 19:11:52 -0700 (PDT) Received: from gmail.com ([1.6.215.26]) by smtp.gmail.com with ESMTPSA id p17sm12612601pfh.33.2021.08.02.19.11.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Aug 2021 19:11:52 -0700 (PDT) Date: Tue, 3 Aug 2021 07:41:05 +0530 From: Nithin Dabilpuram To: Thomas Monjalon Cc: konstantin.ananyev@intel.com, jerinj@marvell.com, gakhil@marvell.com, roy.fan.zhang@intel.com, hemant.agrawal@nxp.com, matan@nvidia.com, dev@dpdk.org, ferruh.yigit@intel.com, bruce.richardson@intel.com, mdr@ashroe.eu, david.marchand@redhat.com Message-ID: References: <20210727173637.12609-1-ndabilpuram@marvell.com> <1629959.W8NSeS0LaV@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1629959.W8NSeS0LaV@thomas> Subject: Re: [dpdk-dev] [PATCH] doc: announce security API changes for Inline IPsec 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 Sender: "dev" On Sat, Jul 31, 2021 at 12:16:12AM +0200, Thomas Monjalon wrote: > 27/07/2021 19:36, Nithin Dabilpuram: > > Announce changes to make rte_security_set_pkt_metadata() and > > rte_security_get_userdata() inline instead of C functions and > > also addition of another field in structure rte_security_ctx for > > holding flags. > > I guess there is a performance reason but the motivation > is not explained. Also it is going in the opposite direction > of what is discussed in the Technical Board meetings: > we should avoid and reduce the number of inline functions > to reduce the ABI surface. Yes, it is a performance improvement. It is discussed in detail in https://inbox.dpdk.org/dev/20210624102848.3878788-1-gakhil@marvell.com/T/#mc4ba3500c024f9911b7af7e5a6e95e23f6197fdd To summarize, initially the two per-pkt fast path API's rte_security_set_pkt_metadata() and rte_security_get_userdata() where added with anticipation that PMD's would have lot of processing to be done on per-pkt basis for security offload packets unlike other ethdev Rx/Tx offloads. Now that we have few PMD's that implemented inline ipsec support, it looks more benefitial to have PMD specific logic in tx_burst()/rx_burst() for performance instead of doing a per-pkt function ptr jump to do the same in rte_security_set_pkt_metadata() or rte_security_get_userdata(). In our PMD rte_security_set_pkt_metadata() is currently just to copy private SA ptr from rte_security_session to security mbuf dynamic field and rte_security_get_userdata() is to copy userdata ptr from mbuf dynamic field. Hence the above proposal provides an alternative to PMD's which want to avoid function ptr jump, by doing a simple metadata get/set to mbuf security dynamic field apart from existing function ptr jump. Also, in future when there will be no PMD's that need the function ptr support for the same operations, this new method can be made the only method and rest of the function pointer jump logic can be removed probably without breaking ABI. > >