patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report
@ 2018-04-30 12:23 Ophir Munk
  2018-04-30 13:42 ` Luca Boccassi
  0 siblings, 1 reply; 5+ messages in thread
From: Ophir Munk @ 2018-04-30 12:23 UTC (permalink / raw)
  To: Ophir Munk; +Cc: stable

There are two capabilities related to CRC stripping:
1. mlx4 HW capability to perform CRC stripping on a recieved packet.
This capability is built in mlx4 HW. It should be returned by the API
call mlx4_get_rx_queue_offloads().
2. mlx4 driver capability to enable/disable HW CRC stripping. This
capability is dependent on the driver version.
Before this commit the seccond capability was falsely returned by
the mentioned API. This commit fixes it by returning the first
capability.

Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/mlx4/mlx4_rxq.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index b430678..88e5912 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -658,10 +658,9 @@ mlx4_rxq_detach(struct rxq *rxq)
 uint64_t
 mlx4_get_rx_queue_offloads(struct priv *priv)
 {
-	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER;
+	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
+			    DEV_RX_OFFLOAD_CRC_STRIP;
 
-	if (priv->hw_fcs_strip)
-		offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
 	return offloads;
-- 
2.7.4

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

* Re: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report
  2018-04-30 12:23 [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report Ophir Munk
@ 2018-04-30 13:42 ` Luca Boccassi
  2018-04-30 13:47   ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Luca Boccassi @ 2018-04-30 13:42 UTC (permalink / raw)
  To: Ophir Munk; +Cc: stable

On Mon, 2018-04-30 at 12:23 +0000, Ophir Munk wrote:
> There are two capabilities related to CRC stripping:
> 1. mlx4 HW capability to perform CRC stripping on a recieved packet.
> This capability is built in mlx4 HW. It should be returned by the API
> call mlx4_get_rx_queue_offloads().
> 2. mlx4 driver capability to enable/disable HW CRC stripping. This
> capability is dependent on the driver version.
> Before this commit the seccond capability was falsely returned by
> the mentioned API. This commit fixes it by returning the first
> capability.
> 
> Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Has this or a version of this fix been committed to mainline?

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report
  2018-04-30 13:42 ` Luca Boccassi
@ 2018-04-30 13:47   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-04-30 13:47 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: stable, Ophir Munk

30/04/2018 15:42, Luca Boccassi:
> On Mon, 2018-04-30 at 12:23 +0000, Ophir Munk wrote:
> > There are two capabilities related to CRC stripping:
> > 1. mlx4 HW capability to perform CRC stripping on a recieved packet.
> > This capability is built in mlx4 HW. It should be returned by the API
> > call mlx4_get_rx_queue_offloads().
> > 2. mlx4 driver capability to enable/disable HW CRC stripping. This
> > capability is dependent on the driver version.
> > Before this commit the seccond capability was falsely returned by
> > the mentioned API. This commit fixes it by returning the first
> > capability.
> > 
> > Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> 
> Has this or a version of this fix been committed to mainline?

I think it is a duplicate.
A new patch has been sent to dpdk-dev + dpdk-stable.

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

* Re: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report
  2018-04-30 12:25 Ophir Munk
@ 2018-05-03  5:47 ` Shahaf Shuler
  0 siblings, 0 replies; 5+ messages in thread
From: Shahaf Shuler @ 2018-05-03  5:47 UTC (permalink / raw)
  To: Ophir Munk, Adrien Mazarguil, dev
  Cc: Thomas Monjalon, Olga Shern, Ophir Munk, stable

Hi Ophir,

Monday, April 30, 2018 3:25 PM, Ophir Munk:
> stable@dpdk.org
> Subject: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability
> report
> 
> There are two capabilities related to CRC stripping:
> 1. mlx4 HW capability to perform CRC stripping on a recieved packet.
> This capability is built in mlx4 HW. It should be returned by the API call
> mlx4_get_rx_queue_offloads().
> 2. mlx4 driver capability to enable/disable HW CRC stripping. This capability is
> dependent on the driver version.
> Before this commit the seccond capability was falsely returned by the
> mentioned API. This commit fixes it by returning the first capability.
> 

In this fix I also expect documentation update to say it is not possible to toggle CRC with OFED/rdma-core version less than XXX.

Because before this patch:
"if CRC offload is set application can set/disable the CRC strip. Otherwise it is always to strip"

With this patch:
"if ofed/rdma-core version is > XXX application can disable CRC strip. Otherwise it is always to strip"



> Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>  drivers/net/mlx4/mlx4_rxq.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
> index b430678..88e5912 100644
> --- a/drivers/net/mlx4/mlx4_rxq.c
> +++ b/drivers/net/mlx4/mlx4_rxq.c
> @@ -658,10 +658,9 @@ mlx4_rxq_detach(struct rxq *rxq)  uint64_t
> mlx4_get_rx_queue_offloads(struct priv *priv)  {
> -	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER;
> +	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
> +			    DEV_RX_OFFLOAD_CRC_STRIP;
> 
> -	if (priv->hw_fcs_strip)
> -		offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
>  	if (priv->hw_csum)
>  		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
>  	return offloads;
> --
> 2.7.4

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

* [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report
@ 2018-04-30 12:25 Ophir Munk
  2018-05-03  5:47 ` Shahaf Shuler
  0 siblings, 1 reply; 5+ messages in thread
From: Ophir Munk @ 2018-04-30 12:25 UTC (permalink / raw)
  To: Adrien Mazarguil, dev; +Cc: Thomas Monjalon, Olga Shern, Ophir Munk, stable

There are two capabilities related to CRC stripping:
1. mlx4 HW capability to perform CRC stripping on a recieved packet.
This capability is built in mlx4 HW. It should be returned by the API
call mlx4_get_rx_queue_offloads().
2. mlx4 driver capability to enable/disable HW CRC stripping. This
capability is dependent on the driver version.
Before this commit the seccond capability was falsely returned by
the mentioned API. This commit fixes it by returning the first
capability.

Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/mlx4/mlx4_rxq.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index b430678..88e5912 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -658,10 +658,9 @@ mlx4_rxq_detach(struct rxq *rxq)
 uint64_t
 mlx4_get_rx_queue_offloads(struct priv *priv)
 {
-	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER;
+	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
+			    DEV_RX_OFFLOAD_CRC_STRIP;
 
-	if (priv->hw_fcs_strip)
-		offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
 	return offloads;
-- 
2.7.4

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

end of thread, other threads:[~2018-05-03  5:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 12:23 [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report Ophir Munk
2018-04-30 13:42 ` Luca Boccassi
2018-04-30 13:47   ` Thomas Monjalon
2018-04-30 12:25 Ophir Munk
2018-05-03  5:47 ` 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).