All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Noa Osherovich <noaos-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-next V1 1/9] IB/ipoib: Add warning message when changing the MTU in UD over the max range
Date: Thu, 12 Jan 2017 21:35:08 +0200	[thread overview]
Message-ID: <20170112193508.GO20392@mtr-leonro.local> (raw)
In-Reply-To: <1484246776.123135.19.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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

On Thu, Jan 12, 2017 at 01:46:16PM -0500, Doug Ledford wrote:
> On Wed, 2016-12-28 at 14:47 +0200, Leon Romanovsky wrote:
> > From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > In datagram mode, the IB UD (Unreliable Datagram) transport is used
> > so the MTU of the interface is equal to the IB L2 MTU minus the
> > IPoIB encapsulation header. Any request to change the MTU value
> > above the maximum range will change the MTU to the max allowed, but
> > will not show any warning message. An ipoib_warn is issued in such
> > cases, letting the user know that even though the value is legal,
> > it can't be currently applied.
> >
> > Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Noa Osherovich <noaos-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > index 3ce0765..a550cc6 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > @@ -229,6 +229,10 @@ static int ipoib_change_mtu(struct net_device
> > *dev, int new_mtu)
> >  
> >  	priv->admin_mtu = new_mtu;
> >  
> > +	if (priv->mcast_mtu < priv->admin_mtu)
> > +		ipoib_warn(priv, "MTU must be smaller than mcast_mtu
> > (%u)\n",
> > +			   priv->mcast_mtu);
> > +
> >  	dev->mtu = min(priv->mcast_mtu, priv->admin_mtu);
> >  
> >  	return 0;
>
> I don't like this patch.  First, there's no need for a warning here.
>  That's entirely too noisy for this issue.  Second, the wording of the
> message is poor.  The user thinks they are setting the MTU, and there
> is no means of setting a multicast MTU, so telling them that their new
> MTU must be less than the mcast MTU that they can't do anything about
> and don't necessarily know how it is generated makes no sense.  This
> should be no more than ipoib_dbg if we even print anything out at all,
> and the message should be more like "MTU must be <= the link layer MTU
> - 4, use ibv_devinfo on the RDMA device to get the link layer MTU"

First of all, thank you for fixing wording, for me it is the hardest
part of every commit.

Second, I have a different view from you on the issue. User configured
some value, which is not correct for IPoIB. In ideal world (without legacy),
we were supposed to return error to him with proper message, but in our
case (legacy applications) we can't (we tried and it broke some legacy
ifcongfig, if I remember well). So it leaves us with one available
option is to warn user about improper value.

User should know that he supplied wrong parameter.

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



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

  parent reply	other threads:[~2017-01-12 19:35 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28 12:47 [PATCH rdma-next V1 0/9] IPoIB fixes for 4.11 Leon Romanovsky
     [not found] ` <20161228124728.26619-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 12:47   ` [PATCH rdma-next V1 1/9] IB/ipoib: Add warning message when changing the MTU in UD over the max range Leon Romanovsky
     [not found]     ` <20161228124728.26619-2-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-12 18:46       ` Doug Ledford
     [not found]         ` <1484246776.123135.19.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-12 19:35           ` Leon Romanovsky [this message]
     [not found]             ` <20170112193508.GO20392-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-12 20:16               ` Jason Gunthorpe
     [not found]                 ` <20170112201622.GA14584-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-13 15:08                   ` Leon Romanovsky
     [not found]                     ` <20170113150824.GQ20392-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-13 17:12                       ` Jason Gunthorpe
     [not found]                         ` <20170113171234.GA30551-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-13 20:31                           ` Leon Romanovsky
     [not found]                             ` <20170113203127.GT20392-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-13 21:27                               ` Jason Gunthorpe
     [not found]                                 ` <20170113212721.GB1463-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-15  8:35                                   ` Leon Romanovsky
     [not found]                                     ` <20170115083543.GA20392-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-16 20:12                                       ` Jason Gunthorpe
     [not found]                                         ` <20170116201218.GA7890-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-17 19:31                                           ` Leon Romanovsky
2017-01-19 13:12                                           ` Leon Romanovsky
     [not found]                                             ` <20170119131258.GT32481-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-19 17:33                                               ` Jason Gunthorpe
     [not found]                                                 ` <20170119173352.GA8109-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-22  8:05                                                   ` Leon Romanovsky
2017-01-12 21:58               ` Doug Ledford
     [not found]                 ` <1484258308.123135.41.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-13 15:15                   ` Leon Romanovsky
     [not found]                     ` <20170113151507.GR20392-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-17 19:34                       ` Leon Romanovsky
2016-12-28 12:47   ` [PATCH rdma-next V1 2/9] IB/ipoib: Set device connection mode only when needed Leon Romanovsky
     [not found]     ` <20161228124728.26619-3-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-12 18:47       ` Doug Ledford
     [not found]         ` <1484246826.123135.20.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-12 19:25           ` Leon Romanovsky
2016-12-28 12:47   ` [PATCH rdma-next V1 3/9] IB/ipoib: Fix deadlock over vlan_mutex Leon Romanovsky
2016-12-28 12:47   ` [PATCH rdma-next V1 4/9] IB/ipoib: Fix deadlock between rmmod and set_mode Leon Romanovsky
2016-12-28 12:47   ` [PATCH rdma-next V1 5/9] IB/ipoib: rtnl_unlock can not come after free_netdev Leon Romanovsky
     [not found]     ` <20161228124728.26619-6-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-29 20:55       ` Or Gerlitz
     [not found]         ` <CAJ3xEMg+UuvUqqaFrBXa+S+S2qLg_FowZLrwvhYzaB7JTkn=pQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-01  6:39           ` Leon Romanovsky
     [not found]             ` <20170101063945.GP26885-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-01  7:19               ` Or Gerlitz
     [not found]                 ` <CAJ3xEMj-6aLraLqH+VBeyqTivSnB0hRo_Hzaiy_LChX8yXDjVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-01  7:45                   ` Erez Shitrit
2016-12-28 12:47   ` [PATCH rdma-next V1 6/9] IB/ipoib: Add detailed error message to dev_queue_xmit call Leon Romanovsky
2016-12-28 12:47   ` [PATCH rdma-next V1 7/9] IB/ipoib: Use debug prints instead of warnings in RNR WC status Leon Romanovsky
     [not found]     ` <20161228124728.26619-8-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 13:11       ` Yuval Shaia
2016-12-28 12:47   ` [PATCH rdma-next V1 8/9] IB/ipoib: Replace list_del of the neigh->list with list_del_init Leon Romanovsky
     [not found]     ` <20161228124728.26619-9-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-02 12:29       ` Yuval Shaia
     [not found]         ` <20170102122917.GB25669-Hxa29pjIrETlQW142y8m19+IiqhCXseY@public.gmane.org>
2017-01-02 18:19           ` Leon Romanovsky
2016-12-28 12:47   ` [PATCH rdma-next V1 9/9] IB/ipoib: Change list_del to list_del_init in the tx object Leon Romanovsky
     [not found]     ` <20161228124728.26619-10-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-02 12:21       ` Yuval Shaia
2017-01-12 19:02   ` [PATCH rdma-next V1 0/9] IPoIB fixes for 4.11 Doug Ledford
     [not found]     ` <1484247737.123135.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-12 19:24       ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170112193508.GO20392@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=noaos-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.