public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/ipoib: Block PKEY creation using ip link
@ 2017-10-26  9:47 Denis Drozdov
       [not found] ` <DB5PR05MB16704ACD20AE16C44B838486B4450-8IvNv+8VlcDlcZmNi56Wl9qRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Drozdov @ 2017-10-26  9:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
  Cc: Alex Vesker, Feras Daoud

Temporary commit that blocks pkey creation using
ip link. Example:

ip link add link ib2 name ib2.1 type ipoib
        RTNETLINK answers: Operation not supported

Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Denis Drozdov <denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
index dd1f256..b507a6e 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
@@ -101,6 +101,9 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev,
        u16 child_pkey;
        int err;

+       /* TODO This change should be removed after adding netlink support */
+       return -EOPNOTSUPP;
+
        if (!tb[IFLA_LINK])
                return -EINVAL;

--
1.8.3.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/ipoib: Block PKEY creation using ip link
       [not found] ` <DB5PR05MB16704ACD20AE16C44B838486B4450-8IvNv+8VlcDlcZmNi56Wl9qRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-10-26 10:06   ` Leon Romanovsky
       [not found]     ` <20171026100634.GG16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2017-10-26 10:06 UTC (permalink / raw)
  To: Denis Drozdov
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alex Vesker,
	Feras Daoud

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

On Thu, Oct 26, 2017 at 09:47:44AM +0000, Denis Drozdov wrote:
> Temporary commit that blocks pkey creation using
> ip link. Example:
>
> ip link add link ib2 name ib2.1 type ipoib
>         RTNETLINK answers: Operation not supported
>
> Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Denis Drozdov <denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 3 +++
>  1 file changed, 3 insertions(+)

NAK,
It is completely wrong and this bug relevant for mlx5 enhanced IPoIB devices,
but you are disabling all IPoIB capable devices.

Thanks

>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
> index dd1f256..b507a6e 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
> @@ -101,6 +101,9 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev,
>         u16 child_pkey;
>         int err;
>
> +       /* TODO This change should be removed after adding netlink support */
> +       return -EOPNOTSUPP;
> +
>         if (!tb[IFLA_LINK])
>                 return -EINVAL;
>
> --
> 1.8.3.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] 3+ messages in thread

* Re: [PATCH] IB/ipoib: Block PKEY creation using ip link
       [not found]     ` <20171026100634.GG16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-10-26 16:57       ` Jason Gunthorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2017-10-26 16:57 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Denis Drozdov, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Alex Vesker, Feras Daoud

On Thu, Oct 26, 2017 at 01:06:34PM +0300, Leon Romanovsky wrote:
> On Thu, Oct 26, 2017 at 09:47:44AM +0000, Denis Drozdov wrote:
> > Temporary commit that blocks pkey creation using
> > ip link. Example:
> >
> > ip link add link ib2 name ib2.1 type ipoib
> >         RTNETLINK answers: Operation not supported
> >
> > Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Denis Drozdov <denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >  drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 3 +++
> >  1 file changed, 3 insertions(+)
> 
> NAK,
> It is completely wrong and this bug relevant for mlx5 enhanced IPoIB devices,
> but you are disabling all IPoIB capable devices.

+1

If this flow doesn't work with netdev offload, then disable the entire
netdev offload completely until it can be fixed properly.

It is absolutely not OK to selectively break established user APIs like
'ip link' just because a kernel-side optimization is not implemented
correctly, you don't get to do that.

If we knew that the netdev offload patches broke 'ip link' they would
not have been accepted.

Jason
--
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:[~2017-10-26 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-26  9:47 [PATCH] IB/ipoib: Block PKEY creation using ip link Denis Drozdov
     [not found] ` <DB5PR05MB16704ACD20AE16C44B838486B4450-8IvNv+8VlcDlcZmNi56Wl9qRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-26 10:06   ` Leon Romanovsky
     [not found]     ` <20171026100634.GG16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-26 16:57       ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox