[v3,1/5] mbuf: clarify meta data needed for Outbound Inline

Message ID 20220822143812.30010-1-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v3,1/5] mbuf: clarify meta data needed for Outbound Inline |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram Aug. 22, 2022, 2:38 p.m. UTC
  Clarify mbuf meta data needed for Outbound Inline processing.
Application needs to provide mbuf.l3_len and L3 type in
mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode
can make use of l3_len and l3_type to determine perform
proper transport mode IPsec processing.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v3:
- Addressed comments on patch 4/5 and added acks.
v2:
- Modified ipsec-secgw to do ether type update for outbound path.

 doc/guides/nics/features.rst | 2 +-
 lib/mbuf/rte_mbuf_core.h     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
  

Comments

Nithin Dabilpuram Aug. 31, 2022, 1:49 a.m. UTC | #1
Ping. Any thoughts on this ?

This is just clarification of existing assumptions for Inline Outbound 
that are being made.


On 2022-08-22 8:08 PM, Nithin Dabilpuram wrote:
> Clarify mbuf meta data needed for Outbound Inline processing.
> Application needs to provide mbuf.l3_len and L3 type in
> mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode
> can make use of l3_len and l3_type to determine perform
> proper transport mode IPsec processing.
>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
> v3:
> - Addressed comments on patch 4/5 and added acks.
> v2:
> - Modified ipsec-secgw to do ether type update for outbound path.
>
>   doc/guides/nics/features.rst | 2 +-
>   lib/mbuf/rte_mbuf_core.h     | 3 ++-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
> index 7f6cb91..b4a8e98 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -431,7 +431,7 @@ protocol operations. See security library and PMD documentation for more details
>   
>   * **[uses]       rte_eth_rxconf,rte_eth_rxmode**: ``offloads:RTE_ETH_RX_OFFLOAD_SECURITY``,
>   * **[uses]       rte_eth_txconf,rte_eth_txmode**: ``offloads:RTE_ETH_TX_OFFLOAD_SECURITY``.
> -* **[uses]       mbuf**: ``mbuf.l2_len``.
> +* **[uses]       mbuf**: ``mbuf.l2_len``, ``mbuf.l3_len``, ``mbuf.ol_flags``.
>   * **[implements] rte_security_ops**: ``session_create``, ``session_update``,
>     ``session_stats_get``, ``session_destroy``, ``set_pkt_metadata``, ``get_userdata``,
>     ``capabilities_get``.
> diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
> index 3d6ddd6..b62a7c6 100644
> --- a/lib/mbuf/rte_mbuf_core.h
> +++ b/lib/mbuf/rte_mbuf_core.h
> @@ -267,7 +267,8 @@ extern "C" {
>   /**
>    * Request security offload processing on the TX packet.
>    * To use Tx security offload, the user needs to fill l2_len in mbuf
> - * indicating L2 header size and where L3 header starts.
> + * indicating L2 header size and where L3 header starts. Similarly,
> + * l3_len should also be filled along with ol_flags reflecting current L3 type.
>    */
>   #define RTE_MBUF_F_TX_SEC_OFFLOAD	(1ULL << 43)
>   #define PKT_TX_SEC_OFFLOAD RTE_DEPRECATED(PKT_TX_SEC_OFFLOAD) \
  
Akhil Goyal Sept. 21, 2022, 6:21 p.m. UTC | #2
> Ping. Any thoughts on this ?
> 
> This is just clarification of existing assumptions for Inline Outbound
> that are being made.
> 
> 
> On 2022-08-22 8:08 PM, Nithin Dabilpuram wrote:
> > Clarify mbuf meta data needed for Outbound Inline processing.
> > Application needs to provide mbuf.l3_len and L3 type in
> > mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode
> > can make use of l3_len and l3_type to determine perform
> > proper transport mode IPsec processing.
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

Series
Acked-by: Akhil Goyal <gakhil@marvell.com>

@Thomas : Can this series be merged into crypto tree?

Any objections?
  
Thomas Monjalon Sept. 21, 2022, 6:46 p.m. UTC | #3
21/09/2022 20:21, Akhil Goyal:
> > Ping. Any thoughts on this ?
> > 
> > This is just clarification of existing assumptions for Inline Outbound
> > that are being made.
> > 
> > 
> > On 2022-08-22 8:08 PM, Nithin Dabilpuram wrote:
> > > Clarify mbuf meta data needed for Outbound Inline processing.
> > > Application needs to provide mbuf.l3_len and L3 type in
> > > mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode
> > > can make use of l3_len and l3_type to determine perform
> > > proper transport mode IPsec processing.
> > >
> > > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> Series
> Acked-by: Akhil Goyal <gakhil@marvell.com>
> 
> @Thomas : Can this series be merged into crypto tree?
> 
> Any objections?

That's all about crypto, so that's perfectly fine to merge in crypto tree.
  
Akhil Goyal Sept. 22, 2022, 3:48 p.m. UTC | #4
> Subject: [PATCH v3 1/5] mbuf: clarify meta data needed for Outbound Inline
> 
> Clarify mbuf meta data needed for Outbound Inline processing.
> Application needs to provide mbuf.l3_len and L3 type in
> mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode
> can make use of l3_len and l3_type to determine perform
> proper transport mode IPsec processing.
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
> v3:
> - Addressed comments on patch 4/5 and added acks.
> v2:
> - Modified ipsec-secgw to do ether type update for outbound path.
Series Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 7f6cb91..b4a8e98 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -431,7 +431,7 @@  protocol operations. See security library and PMD documentation for more details
 
 * **[uses]       rte_eth_rxconf,rte_eth_rxmode**: ``offloads:RTE_ETH_RX_OFFLOAD_SECURITY``,
 * **[uses]       rte_eth_txconf,rte_eth_txmode**: ``offloads:RTE_ETH_TX_OFFLOAD_SECURITY``.
-* **[uses]       mbuf**: ``mbuf.l2_len``.
+* **[uses]       mbuf**: ``mbuf.l2_len``, ``mbuf.l3_len``, ``mbuf.ol_flags``.
 * **[implements] rte_security_ops**: ``session_create``, ``session_update``,
   ``session_stats_get``, ``session_destroy``, ``set_pkt_metadata``, ``get_userdata``,
   ``capabilities_get``.
diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
index 3d6ddd6..b62a7c6 100644
--- a/lib/mbuf/rte_mbuf_core.h
+++ b/lib/mbuf/rte_mbuf_core.h
@@ -267,7 +267,8 @@  extern "C" {
 /**
  * Request security offload processing on the TX packet.
  * To use Tx security offload, the user needs to fill l2_len in mbuf
- * indicating L2 header size and where L3 header starts.
+ * indicating L2 header size and where L3 header starts. Similarly,
+ * l3_len should also be filled along with ol_flags reflecting current L3 type.
  */
 #define RTE_MBUF_F_TX_SEC_OFFLOAD	(1ULL << 43)
 #define PKT_TX_SEC_OFFLOAD RTE_DEPRECATED(PKT_TX_SEC_OFFLOAD) \