DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Anoob Joseph <anoobj@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Vidya Sagar Velumuri <vvelumuri@marvell.com>,
	"david.coyle@intel.com" <david.coyle@intel.com>,
	"kai.ji@intel.com" <kai.ji@intel.com>,
	"kevin.osullivan@intel.com" <kevin.osullivan@intel.com>,
	Ciara Power <ciara.power@intel.com>
Subject: RE: [PATCH v4 1/2] security: add fallback security processing and Rx inject
Date: Tue, 10 Oct 2023 16:48:07 +0000	[thread overview]
Message-ID: <SJ0PR18MB4494AC0FA809A8D44DCC5F9ED8CDA@SJ0PR18MB4494.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20231010103212.1900-1-anoobj@marvell.com>



> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: Tuesday, October 10, 2023 4:02 PM
> To: Akhil Goyal <gakhil@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
> Cc: Hemant Agrawal <hemant.agrawal@nxp.com>; dev@dpdk.org; Vidya Sagar
> Velumuri <vvelumuri@marvell.com>; david.coyle@intel.com; kai.ji@intel.com;
> kevin.osullivan@intel.com; Ciara Power <ciara.power@intel.com>
> Subject: [PATCH v4 1/2] security: add fallback security processing and Rx inject
> 
> Add alternate datapath API for security processing which would do Rx
> injection (similar to loopback) after successful security processing.
> 
> With inline protocol offload, variable part of the session context
> (AR windows, lifetime etc in case of IPsec), is not accessible to the
> application. If packets are not getting processed in the inline path
> due to non security reasons (such as outer fragmentation or rte_flow
> packet steering limitations), then the packet cannot be security
> processed as the session context is private to the PMD and security
> library doesn't provide alternate APIs to make use of the same session.
> 
> Introduce new API and Rx injection as fallback mechanism to security
> processing failures due to non-security reasons. For example, when there
> is outer fragmentation and PMD doesn't support reassembly of outer
> fragments, application would receive fragments which it can then
> reassemble. Post successful reassembly, packet can be submitted for
> security processing and Rx inject. The packets can be then received in
> the application as normal inline protocol processed packets.
> 
> Same API can be leveraged in lookaside protocol offload mode to inject
> packet to Rx. This would help in using rte_flow based packet parsing
> after security processing. For example, with IPsec, this will help in
> flow splitting after IPsec processing is done.
> 
> In both inline protocol capable ethdevs and lookaside protocol capable
> cryptodevs, the packet would be received back in eth port & queue based
> on rte_flow rules and packet parsing after security processing. The API
> would behave like a loopback but with the additional security
> processing.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>
> ---
> v4:
> Updated release notes
> 
> v3:
> * Resolved compilation error with 32 bit build
> 
> v2:
> * Added a new API for configuring security device to do Rx inject to a specific
>   ethdev port
> * Rebased
> 
>  doc/guides/cryptodevs/features/default.ini |  1 +
>  doc/guides/rel_notes/release_23_11.rst     | 19 +++++
>  lib/cryptodev/rte_cryptodev.h              |  2 +
>  lib/security/rte_security.c                | 22 ++++++
>  lib/security/rte_security.h                | 85 ++++++++++++++++++++++
>  lib/security/rte_security_driver.h         | 44 +++++++++++
>  lib/security/version.map                   |  3 +
>  7 files changed, 176 insertions(+)
> 
> diff --git a/doc/guides/cryptodevs/features/default.ini
> b/doc/guides/cryptodevs/features/default.ini
> index 6f637fa7e2..f411d4bab7 100644
> --- a/doc/guides/cryptodevs/features/default.ini
> +++ b/doc/guides/cryptodevs/features/default.ini
> @@ -34,6 +34,7 @@ Sym raw data path API  =
>  Cipher multiple data units =
>  Cipher wrapped key     =
>  Inner checksum         =
> +Rx inject              =
> 
>  ;
>  ; Supported crypto algorithms of a default crypto driver.
> diff --git a/doc/guides/rel_notes/release_23_11.rst
> b/doc/guides/rel_notes/release_23_11.rst
> index be51f00dbf..6853c907c9 100644
> --- a/doc/guides/rel_notes/release_23_11.rst
> +++ b/doc/guides/rel_notes/release_23_11.rst
> @@ -107,6 +107,25 @@ New Features
>    enhancements to ``rte_crypto_op`` fields to handle all datapath requirements
>    of TLS and DTLS. The support is added for TLS 1.2, TLS 1.3 and DTLS 1.2.
> 
> +* **Added support for rte_security Rx inject API.**
> +
> +  Added Rx inject API to allow applications to submit packets for protocol
> +  offload and have them injected back to ethdev Rx so that further ethdev Rx
> +  actions (IP reassembly, packet parsing and flow lookups) can happen based on
> +  inner packet.
> +
> +  The API when implemented by an ethdev, may be used to process packets that
> the
> +  application wants to process with inline protocol offload enabled rte_security
> +  session. These can be packets that are received from other non-inline capable
> +  ethdevs or can be packets that failed inline protocol offload (such as
> +  receiving fragmented ESP packets in case of inline IPsec offload).
> +
> +  The API when implemented by a cryptodev, can be used for injecting packets
> to
> +  ethdev Rx after IPsec processing and take advantage of ethdev Rx processing
> +  for the inner packet. The API helps application to avail ethdev Rx actions
> +  based on inner packet while working with rte_security sessions which cannot
> +  be accelerated in inline protocol offload mode.
> +
Reworded the above release notes as below.

* **Added support for rte_security Rx inject API.**

  Added Rx inject API to allow applications to submit packets for protocol
  offload and have them injected back to ethdev Rx so that further ethdev Rx
  actions (IP reassembly, packet parsing and flow lookups) can happen based on
  inner packet.

  The API when implemented by an ethdev, application would be able to process
  packets that are received without/failed inline offload processing
  (such as fragmented ESP packets with inline IPsec offload).
  The API when implemented by a cryptodev, can be used for injecting packets
  to ethdev Rx after IPsec processing and take advantage of ethdev Rx actions
  for the inner packet which cannot be accelerated in inline protocol offload mode.

Applied to dpdk-next-crypto

Thanks.


      parent reply	other threads:[~2023-10-10 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 11:45 [RFC PATCH " Anoob Joseph
2023-08-11 11:45 ` [RFC PATCH 2/2] test/cryptodev: add Rx inject test Anoob Joseph
2023-08-24  7:55 ` [RFC PATCH 1/2] security: add fallback security processing and Rx inject Akhil Goyal
2023-09-29  7:16 ` [PATCH v2 " Anoob Joseph
2023-09-29  7:16   ` [PATCH v2 2/2] test/cryptodev: add Rx inject test Anoob Joseph
2023-09-29 15:39   ` [PATCH v3 1/2] security: add fallback security processing and Rx inject Anoob Joseph
2023-09-29 15:39     ` [PATCH v3 2/2] test/cryptodev: add Rx inject test Anoob Joseph
2023-10-09 20:11     ` [PATCH v3 1/2] security: add fallback security processing and Rx inject Akhil Goyal
2023-10-10 10:32     ` [PATCH v4 " Anoob Joseph
2023-10-10 10:32       ` [PATCH v4 2/2] test/cryptodev: add Rx inject test Anoob Joseph
2023-10-10 16:48       ` Akhil Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR18MB4494AC0FA809A8D44DCC5F9ED8CDA@SJ0PR18MB4494.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=ciara.power@intel.com \
    --cc=david.coyle@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=kevin.osullivan@intel.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=vvelumuri@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).