From: Jiri Pirko <jiri@resnulli.us>
To: Veaceslav Falico <vfalico@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] team: block mtu change before it happens via NETDEV_PRECHANGEMTU
Date: Thu, 16 Jan 2014 08:18:14 +0100 [thread overview]
Message-ID: <20140116071814.GC2815@minipsycho.orion> (raw)
In-Reply-To: <1389826939-20691-2-git-send-email-vfalico@redhat.com>
Thu, Jan 16, 2014 at 12:02:19AM CET, vfalico@redhat.com wrote:
>Now it catches the NETDEV_CHANGEMTU notification, which is signaled after
>the actual change happened on the device, and returns NOTIFY_BAD, so that
>the change on the device is reverted.
>
>This might be quite costly and messy, so use the new NETDEV_PRECHANGEMTU to
>catch the MTU change before the actual change happens and signal that it's
>forbidden to do it.
>
>CC: Jiri Pirko <jiri@resnulli.us>
>Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
>---
> drivers/net/team/team.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>index b75ae5b..dff24e3 100644
>--- a/drivers/net/team/team.c
>+++ b/drivers/net/team/team.c
>@@ -2851,7 +2851,7 @@ static int team_device_event(struct notifier_block *unused,
> case NETDEV_FEAT_CHANGE:
> team_compute_features(port->team);
> break;
>- case NETDEV_CHANGEMTU:
>+ case NETDEV_PRECHANGEMTU:
> /* Forbid to change mtu of underlaying device */
> return NOTIFY_BAD;
> case NETDEV_PRE_TYPE_CHANGE:
>--
>1.8.4
>
Acked-by: Jiri Pirko <jiri@resnulli.us>
next prev parent reply other threads:[~2014-01-16 7:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 23:02 [PATCH net-next 1/2] net: add NETDEV_PRECHANGEMTU to notify before mtu change happens Veaceslav Falico
2014-01-15 23:02 ` [PATCH net-next 2/2] team: block mtu change before it happens via NETDEV_PRECHANGEMTU Veaceslav Falico
2014-01-16 7:18 ` Jiri Pirko [this message]
2014-01-17 1:16 ` David Miller
2014-01-16 7:18 ` [PATCH net-next 1/2] net: add NETDEV_PRECHANGEMTU to notify before mtu change happens Jiri Pirko
2014-01-17 1:16 ` 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=20140116071814.GC2815@minipsycho.orion \
--to=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=vfalico@redhat.com \
/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