DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one
@ 2018-06-24  6:22 Shahaf Shuler
  2018-06-25  6:40 ` Nélio Laranjeiro
  0 siblings, 1 reply; 5+ messages in thread
From: Shahaf Shuler @ 2018-06-24  6:22 UTC (permalink / raw)
  To: nelio.laranjeiro, adrien.mazarguil, yskoh; +Cc: dev, stable

The generic tunnel TSO was depended in the regular one capabilities to
be enabled.

Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 068f36d99d..669b91319f 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -113,15 +113,20 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
 			     DEV_TX_OFFLOAD_TCP_CKSUM);
 	if (config->tso)
 		offloads |= DEV_TX_OFFLOAD_TCP_TSO;
+	if (config->swp) {
+		if (config->hw_csum)
+			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
+		if (config->tso)
+			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
+				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
+	}
+
 	if (config->tunnel_en) {
 		if (config->hw_csum)
 			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
 		if (config->tso)
 			offloads |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
 				     DEV_TX_OFFLOAD_GRE_TNL_TSO);
-		if (config->swp)
-			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
-				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
 	}
 	return offloads;
 }
@@ -707,7 +712,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
 						   max_tso_inline);
 		txq_ctrl->txq.tso_en = 1;
 	}
-	txq_ctrl->txq.tunnel_en = config->tunnel_en;
+	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
 	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
 				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
 				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
-- 
2.12.0

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

* Re: [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one
  2018-06-24  6:22 [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one Shahaf Shuler
@ 2018-06-25  6:40 ` Nélio Laranjeiro
  2018-06-25 11:23   ` Shahaf Shuler
  0 siblings, 1 reply; 5+ messages in thread
From: Nélio Laranjeiro @ 2018-06-25  6:40 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: adrien.mazarguil, yskoh, dev, stable

On Sun, Jun 24, 2018 at 09:22:26AM +0300, Shahaf Shuler wrote:
> The generic tunnel TSO was depended in the regular one capabilities to
> be enabled.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_txq.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
> index 068f36d99d..669b91319f 100644
> --- a/drivers/net/mlx5/mlx5_txq.c
> +++ b/drivers/net/mlx5/mlx5_txq.c
> @@ -113,15 +113,20 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
>  			     DEV_TX_OFFLOAD_TCP_CKSUM);
>  	if (config->tso)
>  		offloads |= DEV_TX_OFFLOAD_TCP_TSO;
> +	if (config->swp) {
> +		if (config->hw_csum)
> +			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
> +		if (config->tso)
> +			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
> +				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
> +	}
> +
>  	if (config->tunnel_en) {
>  		if (config->hw_csum)
>  			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
>  		if (config->tso)
>  			offloads |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
>  				     DEV_TX_OFFLOAD_GRE_TNL_TSO);
> -		if (config->swp)
> -			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
> -				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
>  	}
>  	return offloads;
>  }
> @@ -707,7 +712,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
>  						   max_tso_inline);
>  		txq_ctrl->txq.tso_en = 1;
>  	}
> -	txq_ctrl->txq.tunnel_en = config->tunnel_en;
> +	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
>  	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
>  				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
>  				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
> -- 
> 2.12.0
> 

Is not it a fix?

Regards,

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one
  2018-06-25  6:40 ` Nélio Laranjeiro
@ 2018-06-25 11:23   ` Shahaf Shuler
  2018-06-25 11:33     ` Nélio Laranjeiro
  0 siblings, 1 reply; 5+ messages in thread
From: Shahaf Shuler @ 2018-06-25 11:23 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Adrien Mazarguil, Yongseok Koh, dev, stable

Monday, June 25, 2018 9:41 AM , Nélio Laranjeiro:
> Subject: Re: [PATCH] net/mlx5: separate generic tunnel TSO from the
> standard one
> 
> On Sun, Jun 24, 2018 at 09:22:26AM +0300, Shahaf Shuler wrote:
> > The generic tunnel TSO was depended in the regular one capabilities to
> > be enabled.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> > Acked-by: Yongseok Koh <yskoh@mellanox.com>
> > ---
> >  drivers/net/mlx5/mlx5_txq.c | 13 +++++++++----
> >  1 file changed, 9 insertions(+), 4 deletions(-)
> >

[...]

> > -	txq_ctrl->txq.tunnel_en = config->tunnel_en;
> > +	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
> >  	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
> >  				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
> >  				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
> > --
> > 2.12.0
> >
> 
> Is not it a fix?

Well, more like optimization. To be less strict on when to enable the generic tunnel TSO.
I can rephrase the title if you insist. 

> 
> Regards,
> 
> --
> Nélio Laranjeiro
> 6WIND

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

* Re: [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one
  2018-06-25 11:23   ` Shahaf Shuler
@ 2018-06-25 11:33     ` Nélio Laranjeiro
  2018-06-26 10:25       ` Shahaf Shuler
  0 siblings, 1 reply; 5+ messages in thread
From: Nélio Laranjeiro @ 2018-06-25 11:33 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Adrien Mazarguil, Yongseok Koh, dev, stable

On Mon, Jun 25, 2018 at 11:23:22AM +0000, Shahaf Shuler wrote:
> Monday, June 25, 2018 9:41 AM , Nélio Laranjeiro:
> > Subject: Re: [PATCH] net/mlx5: separate generic tunnel TSO from the
> > standard one
> > 
> > On Sun, Jun 24, 2018 at 09:22:26AM +0300, Shahaf Shuler wrote:
> > > The generic tunnel TSO was depended in the regular one capabilities to
> > > be enabled.
> > >
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> > > Acked-by: Yongseok Koh <yskoh@mellanox.com>
> > > ---
> > >  drivers/net/mlx5/mlx5_txq.c | 13 +++++++++----
> > >  1 file changed, 9 insertions(+), 4 deletions(-)
> > >
> 
> [...]
> 
> > > -	txq_ctrl->txq.tunnel_en = config->tunnel_en;
> > > +	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
> > >  	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
> > >  				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
> > >  				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
> > > --
> > > 2.12.0
> > >
> > 
> > Is not it a fix?
> 
> Well, more like optimization. To be less strict on when to enable the
> generic tunnel TSO.
> I can rephrase the title if you insist. 

I was asking due to the CC'ed stable, which is generally used when the
it is a fix.  I don't know how the stable maintainers trigger such
patch, that why I am asking.

I am not insisting in any thing here.

By the way: 
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one
  2018-06-25 11:33     ` Nélio Laranjeiro
@ 2018-06-26 10:25       ` Shahaf Shuler
  0 siblings, 0 replies; 5+ messages in thread
From: Shahaf Shuler @ 2018-06-26 10:25 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Adrien Mazarguil, Yongseok Koh, dev, stable

Monday, June 25, 2018 2:33 PM, Nélio Laranjeiro:
> Subject: Re: [PATCH] net/mlx5: separate generic tunnel TSO from the
> standard one
> 
> On Mon, Jun 25, 2018 at 11:23:22AM +0000, Shahaf Shuler wrote:
> > Monday, June 25, 2018 9:41 AM , Nélio Laranjeiro:
> > > Subject: Re: [PATCH] net/mlx5: separate generic tunnel TSO from the
> > > standard one
> > >
> > > On Sun, Jun 24, 2018 at 09:22:26AM +0300, Shahaf Shuler wrote:
> > > > The generic tunnel TSO was depended in the regular one
> > > > capabilities to be enabled.
> > > >
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> > > > Acked-by: Yongseok Koh <yskoh@mellanox.com>
> > > > ---
> > > >  drivers/net/mlx5/mlx5_txq.c | 13 +++++++++----
> > > >  1 file changed, 9 insertions(+), 4 deletions(-)
> > > >
> >
> > [...]
> >
> > > > -	txq_ctrl->txq.tunnel_en = config->tunnel_en;
> > > > +	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
> > > >  	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
> > > >  				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
> > > >  				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
> > > > --
> > > > 2.12.0
> > > >
> > >
> > > Is not it a fix?
> >
> > Well, more like optimization. To be less strict on when to enable the
> > generic tunnel TSO.
> > I can rephrase the title if you insist.
> 
> I was asking due to the CC'ed stable, which is generally used when the it is a
> fix.  I don't know how the stable maintainers trigger such patch, that why I
> am asking.
> 
> I am not insisting in any thing here.
> 
> By the way:
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to next-net-mlx, thanks. 

> 
> --
> Nélio Laranjeiro
> 6WIND

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

end of thread, other threads:[~2018-06-26 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-24  6:22 [dpdk-dev] [PATCH] net/mlx5: separate generic tunnel TSO from the standard one Shahaf Shuler
2018-06-25  6:40 ` Nélio Laranjeiro
2018-06-25 11:23   ` Shahaf Shuler
2018-06-25 11:33     ` Nélio Laranjeiro
2018-06-26 10:25       ` Shahaf Shuler

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