All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs
@ 2017-08-23  5:37 Leon Romanovsky
       [not found] ` <20170823053721.18510-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2017-08-23  5:37 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Feras Daoud, Eitan Rabin,
	Leon Romanovsky

From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Adds support for ioctl callback in the RDMA netdevs to allow
supporting functions not handled by the generic interface code.

Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Eitan Rabin <rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 9e8dce6e9fc2..cc3615dd6f1a 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -99,6 +99,8 @@ static struct net_device *ipoib_get_net_dev_by_params(
 		const union ib_gid *gid, const struct sockaddr *addr,
 		void *client_data);
 static int ipoib_set_mac(struct net_device *dev, void *addr);
+static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
+		       int cmd);

 static struct ib_client ipoib_client = {
 	.name   = "ipoib",
@@ -1680,6 +1682,17 @@ static int ipoib_dev_init_default(struct net_device *dev)
 	return -ENOMEM;
 }

+static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
+		       int cmd)
+{
+	struct ipoib_dev_priv *priv = ipoib_priv(dev);
+
+	if (!priv->rn_ops->ndo_do_ioctl)
+		return -EOPNOTSUPP;
+
+	return priv->rn_ops->ndo_do_ioctl(dev, ifr, cmd);
+}
+
 int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
 {
 	struct ipoib_dev_priv *priv = ipoib_priv(dev);
@@ -1834,6 +1847,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
 	.ndo_set_vf_guid	 = ipoib_set_vf_guid,
 	.ndo_set_mac_address	 = ipoib_set_mac,
 	.ndo_get_stats64	 = ipoib_get_stats,
+	.ndo_do_ioctl		 = ipoib_ioctl,
 };

 static const struct net_device_ops ipoib_netdev_ops_vf = {
@@ -1847,6 +1861,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
 	.ndo_set_rx_mode	 = ipoib_set_mcast_list,
 	.ndo_get_iflink		 = ipoib_get_iflink,
 	.ndo_get_stats64	 = ipoib_get_stats,
+	.ndo_do_ioctl		 = ipoib_ioctl,
 };

 void ipoib_setup_common(struct net_device *dev)
--
2.14.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] 6+ messages in thread

* Re: [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs
       [not found] ` <20170823053721.18510-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-08-24  8:11   ` Yuval Shaia
  2017-08-24  9:20     ` Leon Romanovsky
  2017-08-24 21:36   ` Doug Ledford
  1 sibling, 1 reply; 6+ messages in thread
From: Yuval Shaia @ 2017-08-24  8:11 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Feras Daoud,
	Eitan Rabin

On Wed, Aug 23, 2017 at 08:37:21AM +0300, Leon Romanovsky wrote:
> From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> Adds support for ioctl callback in the RDMA netdevs to allow
> supporting functions not handled by the generic interface code.

Suggesting:
s/supporting functions/supporting ioctl functions

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

> 
> Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Eitan Rabin <rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 9e8dce6e9fc2..cc3615dd6f1a 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -99,6 +99,8 @@ static struct net_device *ipoib_get_net_dev_by_params(
>  		const union ib_gid *gid, const struct sockaddr *addr,
>  		void *client_data);
>  static int ipoib_set_mac(struct net_device *dev, void *addr);
> +static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
> +		       int cmd);
> 
>  static struct ib_client ipoib_client = {
>  	.name   = "ipoib",
> @@ -1680,6 +1682,17 @@ static int ipoib_dev_init_default(struct net_device *dev)
>  	return -ENOMEM;
>  }
> 
> +static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
> +		       int cmd)
> +{
> +	struct ipoib_dev_priv *priv = ipoib_priv(dev);
> +
> +	if (!priv->rn_ops->ndo_do_ioctl)
> +		return -EOPNOTSUPP;
> +
> +	return priv->rn_ops->ndo_do_ioctl(dev, ifr, cmd);
> +}
> +
>  int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
>  {
>  	struct ipoib_dev_priv *priv = ipoib_priv(dev);
> @@ -1834,6 +1847,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
>  	.ndo_set_vf_guid	 = ipoib_set_vf_guid,
>  	.ndo_set_mac_address	 = ipoib_set_mac,
>  	.ndo_get_stats64	 = ipoib_get_stats,
> +	.ndo_do_ioctl		 = ipoib_ioctl,
>  };
> 
>  static const struct net_device_ops ipoib_netdev_ops_vf = {
> @@ -1847,6 +1861,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
>  	.ndo_set_rx_mode	 = ipoib_set_mcast_list,
>  	.ndo_get_iflink		 = ipoib_get_iflink,
>  	.ndo_get_stats64	 = ipoib_get_stats,
> +	.ndo_do_ioctl		 = ipoib_ioctl,
>  };
> 
>  void ipoib_setup_common(struct net_device *dev)
> --
> 2.14.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] 6+ messages in thread

* Re: [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs
  2017-08-24  8:11   ` Yuval Shaia
@ 2017-08-24  9:20     ` Leon Romanovsky
       [not found]       ` <20170824092035.GE1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2017-08-24  9:20 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Feras Daoud,
	Eitan Rabin

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

On Thu, Aug 24, 2017 at 11:11:57AM +0300, Yuval Shaia wrote:
> On Wed, Aug 23, 2017 at 08:37:21AM +0300, Leon Romanovsky wrote:
> > From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > Adds support for ioctl callback in the RDMA netdevs to allow
> > supporting functions not handled by the generic interface code.
>
> Suggesting:
> s/supporting functions/supporting ioctl functions

I think the "ioctl" word in the line above catches all readers who are
doing grep in the commit message to find relevant for them, but if you
still not convinced and think that it needs to be updated, please say it
and I'll resend.

>
> Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Thanks


>
> >
> > Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Eitan Rabin <rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > index 9e8dce6e9fc2..cc3615dd6f1a 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > @@ -99,6 +99,8 @@ static struct net_device *ipoib_get_net_dev_by_params(
> >  		const union ib_gid *gid, const struct sockaddr *addr,
> >  		void *client_data);
> >  static int ipoib_set_mac(struct net_device *dev, void *addr);
> > +static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
> > +		       int cmd);
> >
> >  static struct ib_client ipoib_client = {
> >  	.name   = "ipoib",
> > @@ -1680,6 +1682,17 @@ static int ipoib_dev_init_default(struct net_device *dev)
> >  	return -ENOMEM;
> >  }
> >
> > +static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
> > +		       int cmd)
> > +{
> > +	struct ipoib_dev_priv *priv = ipoib_priv(dev);
> > +
> > +	if (!priv->rn_ops->ndo_do_ioctl)
> > +		return -EOPNOTSUPP;
> > +
> > +	return priv->rn_ops->ndo_do_ioctl(dev, ifr, cmd);
> > +}
> > +
> >  int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
> >  {
> >  	struct ipoib_dev_priv *priv = ipoib_priv(dev);
> > @@ -1834,6 +1847,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
> >  	.ndo_set_vf_guid	 = ipoib_set_vf_guid,
> >  	.ndo_set_mac_address	 = ipoib_set_mac,
> >  	.ndo_get_stats64	 = ipoib_get_stats,
> > +	.ndo_do_ioctl		 = ipoib_ioctl,
> >  };
> >
> >  static const struct net_device_ops ipoib_netdev_ops_vf = {
> > @@ -1847,6 +1861,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
> >  	.ndo_set_rx_mode	 = ipoib_set_mcast_list,
> >  	.ndo_get_iflink		 = ipoib_get_iflink,
> >  	.ndo_get_stats64	 = ipoib_get_stats,
> > +	.ndo_do_ioctl		 = ipoib_ioctl,
> >  };
> >
> >  void ipoib_setup_common(struct net_device *dev)
> > --
> > 2.14.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: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs
       [not found]       ` <20170824092035.GE1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-08-24 10:26         ` Yuval Shaia
  2017-08-24 10:59           ` Leon Romanovsky
  0 siblings, 1 reply; 6+ messages in thread
From: Yuval Shaia @ 2017-08-24 10:26 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Feras Daoud,
	Eitan Rabin

On Thu, Aug 24, 2017 at 12:20:35PM +0300, Leon Romanovsky wrote:
> On Thu, Aug 24, 2017 at 11:11:57AM +0300, Yuval Shaia wrote:
> > On Wed, Aug 23, 2017 at 08:37:21AM +0300, Leon Romanovsky wrote:
> > > From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > >
> > > Adds support for ioctl callback in the RDMA netdevs to allow
> > > supporting functions not handled by the generic interface code.
> >
> > Suggesting:
> > s/supporting functions/supporting ioctl functions
> 
> I think the "ioctl" word in the line above catches all readers who are
> doing grep in the commit message to find relevant for them, but if you
> still not convinced and think that it needs to be updated, please say it
> and I'll resend.

No. This is minor, no need for new post just for that.

> 
> >
> > Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> 
> Thanks
> 
> 
> >
> > >
> > > Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > > Signed-off-by: Eitan Rabin <rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > > ---
> > >  drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> > >
> > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > > index 9e8dce6e9fc2..cc3615dd6f1a 100644
> > > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > > @@ -99,6 +99,8 @@ static struct net_device *ipoib_get_net_dev_by_params(
> > >  		const union ib_gid *gid, const struct sockaddr *addr,
> > >  		void *client_data);
> > >  static int ipoib_set_mac(struct net_device *dev, void *addr);
> > > +static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
> > > +		       int cmd);
> > >
> > >  static struct ib_client ipoib_client = {
> > >  	.name   = "ipoib",
> > > @@ -1680,6 +1682,17 @@ static int ipoib_dev_init_default(struct net_device *dev)
> > >  	return -ENOMEM;
> > >  }
> > >
> > > +static int ipoib_ioctl(struct net_device *dev, struct ifreq *ifr,
> > > +		       int cmd)
> > > +{
> > > +	struct ipoib_dev_priv *priv = ipoib_priv(dev);
> > > +
> > > +	if (!priv->rn_ops->ndo_do_ioctl)
> > > +		return -EOPNOTSUPP;
> > > +
> > > +	return priv->rn_ops->ndo_do_ioctl(dev, ifr, cmd);
> > > +}
> > > +
> > >  int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
> > >  {
> > >  	struct ipoib_dev_priv *priv = ipoib_priv(dev);
> > > @@ -1834,6 +1847,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
> > >  	.ndo_set_vf_guid	 = ipoib_set_vf_guid,
> > >  	.ndo_set_mac_address	 = ipoib_set_mac,
> > >  	.ndo_get_stats64	 = ipoib_get_stats,
> > > +	.ndo_do_ioctl		 = ipoib_ioctl,
> > >  };
> > >
> > >  static const struct net_device_ops ipoib_netdev_ops_vf = {
> > > @@ -1847,6 +1861,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
> > >  	.ndo_set_rx_mode	 = ipoib_set_mcast_list,
> > >  	.ndo_get_iflink		 = ipoib_get_iflink,
> > >  	.ndo_get_stats64	 = ipoib_get_stats,
> > > +	.ndo_do_ioctl		 = ipoib_ioctl,
> > >  };
> > >
> > >  void ipoib_setup_common(struct net_device *dev)
> > > --
> > > 2.14.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] 6+ messages in thread

* Re: [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs
  2017-08-24 10:26         ` Yuval Shaia
@ 2017-08-24 10:59           ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2017-08-24 10:59 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Feras Daoud,
	Eitan Rabin

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

On Thu, Aug 24, 2017 at 01:26:58PM +0300, Yuval Shaia wrote:
> On Thu, Aug 24, 2017 at 12:20:35PM +0300, Leon Romanovsky wrote:
> > On Thu, Aug 24, 2017 at 11:11:57AM +0300, Yuval Shaia wrote:
> > > On Wed, Aug 23, 2017 at 08:37:21AM +0300, Leon Romanovsky wrote:
> > > > From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > > >
> > > > Adds support for ioctl callback in the RDMA netdevs to allow
> > > > supporting functions not handled by the generic interface code.
> > >
> > > Suggesting:
> > > s/supporting functions/supporting ioctl functions
> >
> > I think the "ioctl" word in the line above catches all readers who are
> > doing grep in the commit message to find relevant for them, but if you
> > still not convinced and think that it needs to be updated, please say it
> > and I'll resend.
>
> No. This is minor, no need for new post just for that.
>

Thanks.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs
       [not found] ` <20170823053721.18510-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-08-24  8:11   ` Yuval Shaia
@ 2017-08-24 21:36   ` Doug Ledford
  1 sibling, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2017-08-24 21:36 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Feras Daoud, Eitan Rabin

On Wed, 2017-08-23 at 08:37 +0300, Leon Romanovsky wrote:
> From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> Adds support for ioctl callback in the RDMA netdevs to allow
> supporting functions not handled by the generic interface code.
> 
> Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Eitan Rabin <rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
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] 6+ messages in thread

end of thread, other threads:[~2017-08-24 21:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  5:37 [PATCH rdma-next] IB/ipoib: Enable ioctl for to IPoIB rdma netdevs Leon Romanovsky
     [not found] ` <20170823053721.18510-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-24  8:11   ` Yuval Shaia
2017-08-24  9:20     ` Leon Romanovsky
     [not found]       ` <20170824092035.GE1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-24 10:26         ` Yuval Shaia
2017-08-24 10:59           ` Leon Romanovsky
2017-08-24 21:36   ` Doug Ledford

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.