DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
@ 2015-06-01 12:11 David Marchand
  2015-06-15  9:45 ` Thomas Monjalon
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: David Marchand @ 2015-06-01 12:11 UTC (permalink / raw)
  To: dev

From: Didier Pallard <didier.pallard@6wind.com>

When TSO is used with IPv6, generated frames are incorrect.
L4 frame is OK, but length field of IPv6 header was not populated correctly.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 4f9ab22..d123612 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -375,10 +375,15 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
 
 	/* check if TCP segmentation required for this packet */
 	if (ol_flags & PKT_TX_TCP_SEG) {
-		/* implies IP cksum and TCP cksum */
-		type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
-			IXGBE_ADVTXD_TUCMD_L4T_TCP |
-			IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
+		/* implies IP cksum in IPv4 */
+		if (ol_flags & PKT_TX_IP_CKSUM)
+			type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
+				IXGBE_ADVTXD_TUCMD_L4T_TCP |
+				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
+		else
+			type_tucmd_mlhl =
+				IXGBE_ADVTXD_TUCMD_L4T_TCP |
+				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
 
 		tx_offload_mask.l2_len |= ~0;
 		tx_offload_mask.l3_len |= ~0;
-- 
1.7.10.4

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

* Re: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
  2015-06-01 12:11 [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6 David Marchand
@ 2015-06-15  9:45 ` Thomas Monjalon
  2015-06-16  1:28   ` Zhang, Helin
  2015-06-15 12:39 ` Ananyev, Konstantin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2015-06-15  9:45 UTC (permalink / raw)
  To: Helin Zhang, Konstantin Ananyev; +Cc: dev

Any comment?

> When TSO is used with IPv6, generated frames are incorrect.
> L4 frame is OK, but length field of IPv6 header was not populated correctly.
> 
> Signed-off-by: Didier Pallard <didier.pallard@6wind.com>

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

* Re: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
  2015-06-01 12:11 [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6 David Marchand
  2015-06-15  9:45 ` Thomas Monjalon
@ 2015-06-15 12:39 ` Ananyev, Konstantin
  2015-06-16  1:27 ` Zhang, Helin
  2015-06-22 14:21 ` [dpdk-dev] [PATCH v2] " David Marchand
  3 siblings, 0 replies; 8+ messages in thread
From: Ananyev, Konstantin @ 2015-06-15 12:39 UTC (permalink / raw)
  To: David Marchand, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> Sent: Monday, June 01, 2015 1:11 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
> 
> From: Didier Pallard <didier.pallard@6wind.com>
> 
> When TSO is used with IPv6, generated frames are incorrect.
> L4 frame is OK, but length field of IPv6 header was not populated correctly.
> 
> Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
> ---
>  drivers/net/ixgbe/ixgbe_rxtx.c |   13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index 4f9ab22..d123612 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -375,10 +375,15 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
> 
>  	/* check if TCP segmentation required for this packet */
>  	if (ol_flags & PKT_TX_TCP_SEG) {
> -		/* implies IP cksum and TCP cksum */
> -		type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
> -			IXGBE_ADVTXD_TUCMD_L4T_TCP |
> -			IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
> +		/* implies IP cksum in IPv4 */
> +		if (ol_flags & PKT_TX_IP_CKSUM)
> +			type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
> +				IXGBE_ADVTXD_TUCMD_L4T_TCP |
> +				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
> +		else
> +			type_tucmd_mlhl =
> +				IXGBE_ADVTXD_TUCMD_L4T_TCP |
> +				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
> 
>  		tx_offload_mask.l2_len |= ~0;
>  		tx_offload_mask.l3_len |= ~0;
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 1.7.10.4

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

* Re: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
  2015-06-01 12:11 [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6 David Marchand
  2015-06-15  9:45 ` Thomas Monjalon
  2015-06-15 12:39 ` Ananyev, Konstantin
@ 2015-06-16  1:27 ` Zhang, Helin
  2015-06-22 14:21 ` [dpdk-dev] [PATCH v2] " David Marchand
  3 siblings, 0 replies; 8+ messages in thread
From: Zhang, Helin @ 2015-06-16  1:27 UTC (permalink / raw)
  To: David Marchand, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> Sent: Monday, June 1, 2015 8:11 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
> 
> From: Didier Pallard <didier.pallard@6wind.com>
> 
> When TSO is used with IPv6, generated frames are incorrect.
> L4 frame is OK, but length field of IPv6 header was not populated correctly.
> 
> Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
> ---
>  drivers/net/ixgbe/ixgbe_rxtx.c |   13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index 4f9ab22..d123612 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -375,10 +375,15 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
> 
>  	/* check if TCP segmentation required for this packet */
>  	if (ol_flags & PKT_TX_TCP_SEG) {
> -		/* implies IP cksum and TCP cksum */
> -		type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
> -			IXGBE_ADVTXD_TUCMD_L4T_TCP |
> -			IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
> +		/* implies IP cksum in IPv4 */
> +		if (ol_flags & PKT_TX_IP_CKSUM)
> +			type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
> +				IXGBE_ADVTXD_TUCMD_L4T_TCP |
> +				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
> +		else
> +			type_tucmd_mlhl =
I'd prefer to put 'IXGBE_ADVTXD_TUCMD_IPV6' here to indicate it has set for IPV6 specifically,
though they are the same. It is clearer for future readers.

- Helin

> +				IXGBE_ADVTXD_TUCMD_L4T_TCP |
> +				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
> 
>  		tx_offload_mask.l2_len |= ~0;
>  		tx_offload_mask.l3_len |= ~0;
> --
> 1.7.10.4

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

* Re: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
  2015-06-15  9:45 ` Thomas Monjalon
@ 2015-06-16  1:28   ` Zhang, Helin
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang, Helin @ 2015-06-16  1:28 UTC (permalink / raw)
  To: Thomas Monjalon, Ananyev, Konstantin; +Cc: dev

I have replied with its original mail, with minor comment.

- Helin

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, June 15, 2015 5:46 PM
> To: Zhang, Helin; Ananyev, Konstantin
> Cc: dev@dpdk.org; David Marchand
> Subject: Re: [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6
> 
> Any comment?
> 
> > When TSO is used with IPv6, generated frames are incorrect.
> > L4 frame is OK, but length field of IPv6 header was not populated correctly.
> >
> > Signed-off-by: Didier Pallard <didier.pallard@6wind.com>

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

* [dpdk-dev] [PATCH v2] ixgbe: fix TSO in IPv6
  2015-06-01 12:11 [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6 David Marchand
                   ` (2 preceding siblings ...)
  2015-06-16  1:27 ` Zhang, Helin
@ 2015-06-22 14:21 ` David Marchand
  2015-06-22 14:23   ` Zhang, Helin
  3 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2015-06-22 14:21 UTC (permalink / raw)
  To: dev

From: Didier Pallard <didier.pallard@6wind.com>

When TSO is used with IPv6, generated frames are incorrect.
L4 frame is OK, but length field of IPv6 header was not populated correctly.

IXGBE_ADVTXD_TUCMD_IPV6 flag is set for better readability, even if it does
nothing.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

---
 drivers/net/ixgbe/ixgbe_rxtx.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 7cc26ef..3ace8a8 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -375,10 +375,15 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
 
 	/* check if TCP segmentation required for this packet */
 	if (ol_flags & PKT_TX_TCP_SEG) {
-		/* implies IP cksum and TCP cksum */
-		type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
-			IXGBE_ADVTXD_TUCMD_L4T_TCP |
-			IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
+		/* implies IP cksum in IPv4 */
+		if (ol_flags & PKT_TX_IP_CKSUM)
+			type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 |
+				IXGBE_ADVTXD_TUCMD_L4T_TCP |
+				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
+		else
+			type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV6 |
+				IXGBE_ADVTXD_TUCMD_L4T_TCP |
+				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
 
 		tx_offload_mask.l2_len |= ~0;
 		tx_offload_mask.l3_len |= ~0;
-- 
1.7.10.4

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

* Re: [dpdk-dev] [PATCH v2] ixgbe: fix TSO in IPv6
  2015-06-22 14:21 ` [dpdk-dev] [PATCH v2] " David Marchand
@ 2015-06-22 14:23   ` Zhang, Helin
  2015-06-22 14:59     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, Helin @ 2015-06-22 14:23 UTC (permalink / raw)
  To: David Marchand, dev



> -----Original Message-----
> From: David Marchand [mailto:david.marchand@6wind.com]
> Sent: Monday, June 22, 2015 10:21 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin; Zhang, Helin; Didier Pallard
> Subject: [PATCH v2] ixgbe: fix TSO in IPv6
> 
> From: Didier Pallard <didier.pallard@6wind.com>
> 
> When TSO is used with IPv6, generated frames are incorrect.
> L4 frame is OK, but length field of IPv6 header was not populated correctly.
> 
> IXGBE_ADVTXD_TUCMD_IPV6 flag is set for better readability, even if it does
> nothing.
> 
> Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>

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

* Re: [dpdk-dev] [PATCH v2] ixgbe: fix TSO in IPv6
  2015-06-22 14:23   ` Zhang, Helin
@ 2015-06-22 14:59     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2015-06-22 14:59 UTC (permalink / raw)
  To: David Marchand, Didier Pallard; +Cc: dev

> > From: Didier Pallard <didier.pallard@6wind.com>
> > 
> > When TSO is used with IPv6, generated frames are incorrect.
> > L4 frame is OK, but length field of IPv6 header was not populated correctly.
> > 
> > IXGBE_ADVTXD_TUCMD_IPV6 flag is set for better readability, even if it does
> > nothing.
> > 
> > Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
> > Signed-off-by: David Marchand <david.marchand@6wind.com>
> > Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Acked-by: Helin Zhang <helin.zhang@intel.com>

Applied, thanks

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

end of thread, other threads:[~2015-06-22 15:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 12:11 [dpdk-dev] [PATCH] ixgbe: fix TSO in IPv6 David Marchand
2015-06-15  9:45 ` Thomas Monjalon
2015-06-16  1:28   ` Zhang, Helin
2015-06-15 12:39 ` Ananyev, Konstantin
2015-06-16  1:27 ` Zhang, Helin
2015-06-22 14:21 ` [dpdk-dev] [PATCH v2] " David Marchand
2015-06-22 14:23   ` Zhang, Helin
2015-06-22 14:59     ` Thomas Monjalon

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