DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
@ 2018-01-11  9:15 Nelio Laranjeiro
  2018-01-11  9:15 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item Nelio Laranjeiro
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nelio Laranjeiro @ 2018-01-11  9:15 UTC (permalink / raw)
  To: dev, Olivier Matz; +Cc: borisp

ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
the corresponding types in DPDK as well.

Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
Cc: borisp@mellanox.com

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

[1] https://tools.ietf.org/html/rfc2406
---
 lib/librte_net/rte_esp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_net/rte_esp.h b/lib/librte_net/rte_esp.h
index e228af092..148c06e09 100644
--- a/lib/librte_net/rte_esp.h
+++ b/lib/librte_net/rte_esp.h
@@ -49,8 +49,8 @@ extern "C" {
  * ESP Header
  */
 struct esp_hdr {
-	uint32_t spi;  /**< Security Parameters Index */
-	uint32_t seq;  /**< packet sequence number */
+	rte_be32_t spi;  /**< Security Parameters Index */
+	rte_be32_t seq;  /**< packet sequence number */
 } __attribute__((__packed__));
 
 #ifdef __cplusplus
-- 
2.11.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item
  2018-01-11  9:15 [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Nelio Laranjeiro
@ 2018-01-11  9:15 ` Nelio Laranjeiro
  2018-01-11  9:53   ` Akhil Goyal
  2018-01-19  9:34   ` De Lara Guarch, Pablo
  2018-01-16 14:24 ` [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Olivier Matz
  2018-01-19  9:34 ` De Lara Guarch, Pablo
  2 siblings, 2 replies; 9+ messages in thread
From: Nelio Laranjeiro @ 2018-01-11  9:15 UTC (permalink / raw)
  To: dev, Olivier Matz; +Cc: akhil.goyal

SPI field is defined in the RFC2406 [1] as a big endian field it should be
provided in its final form to the drivers through RTE flow.

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
Cc: akhil.goyal@nxp.com

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

[1] https://tools.ietf.org/html/rfc2406
---
 examples/ipsec-secgw/ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 580e09a3a..8df0f00ab 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -195,7 +195,7 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
 			sa->pattern[2].type = RTE_FLOW_ITEM_TYPE_ESP;
 			sa->pattern[2].spec = &sa->esp_spec;
 			sa->pattern[2].mask = &rte_flow_item_esp_mask;
-			sa->esp_spec.hdr.spi = sa->spi;
+			sa->esp_spec.hdr.spi = rte_cpu_to_be_32(sa->spi);
 
 			sa->pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
 
-- 
2.11.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item
  2018-01-11  9:15 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item Nelio Laranjeiro
@ 2018-01-11  9:53   ` Akhil Goyal
  2018-01-19  9:34   ` De Lara Guarch, Pablo
  1 sibling, 0 replies; 9+ messages in thread
From: Akhil Goyal @ 2018-01-11  9:53 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev, Olivier Matz


Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
  2018-01-11  9:15 [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Nelio Laranjeiro
  2018-01-11  9:15 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item Nelio Laranjeiro
@ 2018-01-16 14:24 ` Olivier Matz
  2018-01-16 15:52   ` Nélio Laranjeiro
  2018-01-19  9:34 ` De Lara Guarch, Pablo
  2 siblings, 1 reply; 9+ messages in thread
From: Olivier Matz @ 2018-01-16 14:24 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: dev, borisp

On Thu, Jan 11, 2018 at 10:15:58AM +0100, Nelio Laranjeiro wrote:
> ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
> the corresponding types in DPDK as well.
> 
> Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")

I wonder if we should really mark this as a fix.

> Cc: borisp@mellanox.com
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> [1] https://tools.ietf.org/html/rfc2406

Acked-by: Olivier Matz <olivier.matz@6wind.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
  2018-01-16 14:24 ` [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Olivier Matz
@ 2018-01-16 15:52   ` Nélio Laranjeiro
  2018-01-19  9:33     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 9+ messages in thread
From: Nélio Laranjeiro @ 2018-01-16 15:52 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, borisp

On Tue, Jan 16, 2018 at 03:24:09PM +0100, Olivier Matz wrote:
> On Thu, Jan 11, 2018 at 10:15:58AM +0100, Nelio Laranjeiro wrote:
> > ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
> > the corresponding types in DPDK as well.
> > 
> > Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
> 
> I wonder if we should really mark this as a fix.

I also agree, the point is some examples application have started using
it as CPU order instead of Network order, this patch also needs to be
applied in stable branch before fixing the code using it.

> > Cc: borisp@mellanox.com
> > 
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > 
> > [1] https://tools.ietf.org/html/rfc2406
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

-- 
Nélio Laranjeiro
6WIND

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
  2018-01-16 15:52   ` Nélio Laranjeiro
@ 2018-01-19  9:33     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 9+ messages in thread
From: De Lara Guarch, Pablo @ 2018-01-19  9:33 UTC (permalink / raw)
  To: Nélio Laranjeiro, Olivier Matz; +Cc: dev, borisp



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nélio Laranjeiro
> Sent: Tuesday, January 16, 2018 3:52 PM
> To: Olivier Matz <olivier.matz@6wind.com>
> Cc: dev@dpdk.org; borisp@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering
> definition
> 
> On Tue, Jan 16, 2018 at 03:24:09PM +0100, Olivier Matz wrote:
> > On Thu, Jan 11, 2018 at 10:15:58AM +0100, Nelio Laranjeiro wrote:
> > > ESP header is defined in the RFC2406 [1] as Big Endian fields it
> > > should use the corresponding types in DPDK as well.
> > >
> > > Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
> >
> > I wonder if we should really mark this as a fix.
> 
> I also agree, the point is some examples application have started using it as
> CPU order instead of Network order, this patch also needs to be applied in
> stable branch before fixing the code using it.

If you want a patch to be applied in stable branch, don't forget to CC stable@dpdk.org,
and add it under the fixes tag.

Thanks,
Pabo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
  2018-01-11  9:15 [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Nelio Laranjeiro
  2018-01-11  9:15 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item Nelio Laranjeiro
  2018-01-16 14:24 ` [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Olivier Matz
@ 2018-01-19  9:34 ` De Lara Guarch, Pablo
  2018-01-19  9:35   ` De Lara Guarch, Pablo
  2 siblings, 1 reply; 9+ messages in thread
From: De Lara Guarch, Pablo @ 2018-01-19  9:34 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev, Olivier Matz; +Cc: borisp



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nelio Laranjeiro
> Sent: Thursday, January 11, 2018 9:16 AM
> To: dev@dpdk.org; Olivier Matz <olivier.matz@6wind.com>
> Cc: borisp@mellanox.com
> Subject: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
> 
> ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
> the corresponding types in DPDK as well.
> 
> Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
> Cc: borisp@mellanox.com
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> [1] https://tools.ietf.org/html/rfc2406
> ---

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item
  2018-01-11  9:15 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item Nelio Laranjeiro
  2018-01-11  9:53   ` Akhil Goyal
@ 2018-01-19  9:34   ` De Lara Guarch, Pablo
  1 sibling, 0 replies; 9+ messages in thread
From: De Lara Guarch, Pablo @ 2018-01-19  9:34 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev, Olivier Matz; +Cc: akhil.goyal, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nelio Laranjeiro
> Sent: Thursday, January 11, 2018 9:16 AM
> To: dev@dpdk.org; Olivier Matz <olivier.matz@6wind.com>
> Cc: akhil.goyal@nxp.com
> Subject: [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in
> flow item
> 
> SPI field is defined in the RFC2406 [1] as a big endian field it should be
> provided in its final form to the drivers through RTE flow.
> 
> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
> Cc: akhil.goyal@nxp.com

Cc'ing stable ML.

> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition
  2018-01-19  9:34 ` De Lara Guarch, Pablo
@ 2018-01-19  9:35   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 9+ messages in thread
From: De Lara Guarch, Pablo @ 2018-01-19  9:35 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Nelio Laranjeiro, dev, Olivier Matz; +Cc: borisp, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Friday, January 19, 2018 9:34 AM
> To: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>; dev@dpdk.org; Olivier
> Matz <olivier.matz@6wind.com>
> Cc: borisp@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering
> definition
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nelio Laranjeiro
> > Sent: Thursday, January 11, 2018 9:16 AM
> > To: dev@dpdk.org; Olivier Matz <olivier.matz@6wind.com>
> > Cc: borisp@mellanox.com
> > Subject: [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering
> > definition
> >
> > ESP header is defined in the RFC2406 [1] as Big Endian fields it
> > should use the corresponding types in DPDK as well.
> >
> > Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
> > Cc: borisp@mellanox.com
> >
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> >
> > [1] https://tools.ietf.org/html/rfc2406

CC'ing stable ML.

> > ---
> 
> Applied to dpdk-next-crypto.
> Thanks,
> 
> Pablo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-19  9:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11  9:15 [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Nelio Laranjeiro
2018-01-11  9:15 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: fix SPI byte order in flow item Nelio Laranjeiro
2018-01-11  9:53   ` Akhil Goyal
2018-01-19  9:34   ` De Lara Guarch, Pablo
2018-01-16 14:24 ` [dpdk-dev] [PATCH 1/2] net: fix ESP header byte ordering definition Olivier Matz
2018-01-16 15:52   ` Nélio Laranjeiro
2018-01-19  9:33     ` De Lara Guarch, Pablo
2018-01-19  9:34 ` De Lara Guarch, Pablo
2018-01-19  9:35   ` De Lara Guarch, Pablo

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).