* [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
@ 2014-01-24 9:43 Ding Tianhong
2014-01-24 9:55 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Ding Tianhong @ 2014-01-24 9:43 UTC (permalink / raw)
To: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, David S. Miller,
Netdev
I have come to a conclusion by testing every mode for mtu changing:
1). If the slaves support changing mtu and no need to restart the device,
just like virtual nic, the master will not lost any packages for every
mode.
2). If the slaves support changing mtu and need to restart the device,
just like Intel 82599, the AB, 802.3, ALB and TLB mode may lost
packages, but other modes could work well.
The reason is that when the slave's mtu has been changed, the slave will
restart, if the slave is current active slave, the master may set the
slave to backup state and reselect a new slave, after the reselect processing,
the master could work again, but if in load-balance mode, the master could
select another active slave to send and recv packages.
So the best way to fix the problem is don't permit slave to change their
mtu independently.
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
drivers/net/bonding/bond_main.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2ca949f..e127031c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2808,20 +2808,12 @@ static int bond_slave_netdev_event(unsigned long event,
* ... Or is it this?
*/
break;
- case NETDEV_CHANGEMTU:
- /*
- * TODO: Should slaves be allowed to
- * independently alter their MTU? For
- * an active-backup bond, slaves need
- * not be the same type of device, so
- * MTUs may vary. For other modes,
- * slaves arguably should have the
- * same MTUs. To do this, we'd need to
- * take over the slave's change_mtu
- * function for the duration of their
- * servitude.
+ case NETDEV_PRECHANGEMTU:
+ /* The master and slaves should have the
+ * same mtu, so don't permit slaves to
+ * change their mtu independently.
*/
- break;
+ return NOTIFY_BAD;
case NETDEV_CHANGENAME:
/* we don't care if we don't have primary set */
if (!USES_PRIMARY(bond->params.mode) ||
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
2014-01-24 9:43 [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently Ding Tianhong
@ 2014-01-24 9:55 ` David Miller
2014-01-24 11:50 ` Jiri Pirko
2014-01-24 13:58 ` Ding Tianhong
0 siblings, 2 replies; 4+ messages in thread
From: David Miller @ 2014-01-24 9:55 UTC (permalink / raw)
To: dingtianhong; +Cc: fubar, vfalico, andy, netdev
Diag, your commit messages and subject lines chronically have
many typos.
Please take the time out necessary to correct such errors before
sending your patches.
This subject line shows a complete lack of care.
Subject: Re: [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
2014-01-24 9:55 ` David Miller
@ 2014-01-24 11:50 ` Jiri Pirko
2014-01-24 13:58 ` Ding Tianhong
1 sibling, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2014-01-24 11:50 UTC (permalink / raw)
To: David Miller; +Cc: dingtianhong, fubar, vfalico, andy, netdev
Fri, Jan 24, 2014 at 10:55:38AM CET, davem@davemloft.net wrote:
>
>Diag, your commit messages and subject lines chronically have
^^^^
Also typo :)
>many typos.
>
>Please take the time out necessary to correct such errors before
>sending your patches.
>
>This subject line shows a complete lack of care.
>
>Subject: Re: [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
This patch (leaving the typos out of the equation) looks correct to me.
Acked-by: Jiri Pirko <jiri@resnulli.us>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
2014-01-24 9:55 ` David Miller
2014-01-24 11:50 ` Jiri Pirko
@ 2014-01-24 13:58 ` Ding Tianhong
1 sibling, 0 replies; 4+ messages in thread
From: Ding Tianhong @ 2014-01-24 13:58 UTC (permalink / raw)
To: David Miller, dingtianhong; +Cc: fubar, vfalico, andy, netdev
于 2014/1/24 17:55, David Miller 写道:
>
> Diag, your commit messages and subject lines chronically have
> many typos.
>
> Please take the time out necessary to correct such errors before
> sending your patches.
>
> This subject line shows a complete lack of care.
>
I am very sorry, I was not in my office, so I could not resend now by office email, sorry for that.
Ding
> Subject: Re: [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-24 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 9:43 [PATCH net-next] bonding: do't permit slaves to change their mtu ndependently Ding Tianhong
2014-01-24 9:55 ` David Miller
2014-01-24 11:50 ` Jiri Pirko
2014-01-24 13:58 ` Ding Tianhong
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).