All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/iopib: Report SG feature regardless of HW UD CSUM capability
@ 2016-07-17 11:08 Yuval Shaia
       [not found] ` <1468753728-13369-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Yuval Shaia @ 2016-07-17 11:08 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w

Decouple SG support from HW ability to do UD checksum.
This coupling is for historical reasons and removed with commit
ec5f06156423 ("net: Kill link between CSUM and SG features.")

Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 5f58c41..119790c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1967,8 +1967,7 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
 	priv->hca_caps = hca->attrs.device_cap_flags;
 
 	if (priv->hca_caps & IB_DEVICE_UD_IP_CSUM) {
-		priv->dev->hw_features = NETIF_F_SG |
-			NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
+		priv->dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
 
 		if (priv->hca_caps & IB_DEVICE_UD_TSO)
 			priv->dev->hw_features |= NETIF_F_TSO;
@@ -1976,6 +1975,8 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
 		priv->dev->features |= priv->dev->hw_features;
 	}
 
+	priv->dev->features |= NETIF_F_SG;
+
 	return 0;
 }
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] IB/iopib: Report SG feature regardless of HW UD CSUM capability
       [not found] ` <1468753728-13369-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2016-07-17 13:54   ` Leon Romanovsky
       [not found]     ` <20160717135445.GB20674-2ukJVAZIZ/Y@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2016-07-17 13:54 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w

[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]

On Sun, Jul 17, 2016 at 04:08:48AM -0700, Yuval Shaia wrote:
> Decouple SG support from HW ability to do UD checksum.
> This coupling is for historical reasons and removed with commit
> ec5f06156423 ("net: Kill link between CSUM and SG features.")
> 
> Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 5f58c41..119790c 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1967,8 +1967,7 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
>  	priv->hca_caps = hca->attrs.device_cap_flags;
>  
>  	if (priv->hca_caps & IB_DEVICE_UD_IP_CSUM) {
> -		priv->dev->hw_features = NETIF_F_SG |
> -			NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
> +		priv->dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
>  
>  		if (priv->hca_caps & IB_DEVICE_UD_TSO)
>  			priv->dev->hw_features |= NETIF_F_TSO;
> @@ -1976,6 +1975,8 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
>  		priv->dev->features |= priv->dev->hw_features;
>  	}
>  
> +	priv->dev->features |= NETIF_F_SG;
> +

I don't know about it for sure, but maybe the more appropriate place
to place it will be in ipoib_setup() function?

1764         dev->features            = (NETIF_F_VLAN_CHALLENGED     |
1765                                     NETIF_F_HIGHDMA);

What do you think?

>  	return 0;
>  }
>  
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] IB/iopib: Report SG feature regardless of HW UD CSUM capability
       [not found]     ` <20160717135445.GB20674-2ukJVAZIZ/Y@public.gmane.org>
@ 2016-07-18  7:39       ` Yuval Shaia
  0 siblings, 0 replies; 3+ messages in thread
From: Yuval Shaia @ 2016-07-18  7:39 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w

On Sun, Jul 17, 2016 at 04:54:45PM +0300, Leon Romanovsky wrote:
> On Sun, Jul 17, 2016 at 04:08:48AM -0700, Yuval Shaia wrote:
> > Decouple SG support from HW ability to do UD checksum.
> > This coupling is for historical reasons and removed with commit
> > ec5f06156423 ("net: Kill link between CSUM and SG features.")
> > 
> > Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > ---
> >  drivers/infiniband/ulp/ipoib/ipoib_main.c |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > index 5f58c41..119790c 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > @@ -1967,8 +1967,7 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
> >  	priv->hca_caps = hca->attrs.device_cap_flags;
> >  
> >  	if (priv->hca_caps & IB_DEVICE_UD_IP_CSUM) {
> > -		priv->dev->hw_features = NETIF_F_SG |
> > -			NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
> > +		priv->dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
> >  
> >  		if (priv->hca_caps & IB_DEVICE_UD_TSO)
> >  			priv->dev->hw_features |= NETIF_F_TSO;
> > @@ -1976,6 +1975,8 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
> >  		priv->dev->features |= priv->dev->hw_features;
> >  	}
> >  
> > +	priv->dev->features |= NETIF_F_SG;
> > +
> 
> I don't know about it for sure, but maybe the more appropriate place

Not sure about the place or the idea itself?

> to place it will be in ipoib_setup() function?
> 
> 1764         dev->features            = (NETIF_F_VLAN_CHALLENGED     |
> 1765                                     NETIF_F_HIGHDMA);
> 
> What do you think?

Much better.
Please check my v1.

> 
> >  	return 0;
> >  }
> >  
> > -- 
> > 1.7.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-07-18  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-17 11:08 [PATCH] IB/iopib: Report SG feature regardless of HW UD CSUM capability Yuval Shaia
     [not found] ` <1468753728-13369-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-07-17 13:54   ` Leon Romanovsky
     [not found]     ` <20160717135445.GB20674-2ukJVAZIZ/Y@public.gmane.org>
2016-07-18  7:39       ` Yuval Shaia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.