netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Flavio Leitner <fbl@redhat.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [patch net] team: fix mtu setting
Date: Thu, 29 May 2014 16:33:19 -0300	[thread overview]
Message-ID: <20140529193319.GB13007@t520.home> (raw)
In-Reply-To: <1401389177-10463-1-git-send-email-jiri@resnulli.us>

On Thu, May 29, 2014 at 08:46:17PM +0200, Jiri Pirko wrote:
> Now it is not possible to set mtu to team device which has a port
> enslaved to it. The reason is that when team_change_mtu() calls
> dev_set_mtu() for port device, notificator for NETDEV_PRECHANGEMTU
> event is called and team_device_event() returns NOTIFY_BAD forbidding
> the change. So fix this by returning NOTIFY_DONE here in case team is
> changing mtu in team_change_mtu().
> 
> Introduced-by: 3d249d4c "net: introduce ethernet teaming device"
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---

Alright, so changing the team's mtu is now allowed but changing
port's mtu isn't allowed.
LGTM.

Since there are some common code between the unwide and the
successful code paths, I'd suggest to simply use:
...
	list_for_each_entry() {
		err = 
		if (err)
			break
	}

	if (err) {
		unwind
	}
	else
		dev->mtu = new_mtu;

	<common code>

But I suspect that due to the long function name, any
additional indentation there will cause the code to look
less readable.

Acked-by: Flavio Leitner <fbl@redhat.com>

  reply	other threads:[~2014-05-29 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 18:46 [patch net] team: fix mtu setting Jiri Pirko
2014-05-29 19:33 ` Flavio Leitner [this message]
2014-05-29 19:55   ` Jiri Pirko
2014-06-02 21:56 ` David Miller

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=20140529193319.GB13007@t520.home \
    --to=fbl@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.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 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).