[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tv7g5v3e.fsf@mpe.ellerman.id.au>
Date: Thu, 07 Nov 2019 12:33:09 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Thomas Falcon <tlfalcon@...ux.ibm.com>, linuxppc-dev@...abs.org
Cc: nathanl@...ux.ibm.com, netdev@...r.kernel.org,
Thomas Falcon <tlfalcon@...ux.ibm.com>, msuchanek@...e.com,
tyreld@...ux.ibm.com
Subject: Re: [RFC PATCH] powerpc/pseries/mobility: notify network peers after migration
Hi Thomas,
Thomas Falcon <tlfalcon@...ux.ibm.com> writes:
> After a migration, it is necessary to send a gratuitous ARP
> from all running interfaces so that the rest of the network
> is aware of its new location. However, some supported network
> devices are unaware that they have been migrated. To avoid network
> interruptions and other unwanted behavior, force a GARP on all
> valid, running interfaces as part of the post_mobility_fixup
> routine.
>
> Signed-off-by: Thomas Falcon <tlfalcon@...ux.ibm.com>
> ---
> arch/powerpc/platforms/pseries/mobility.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
This patch is in powerpc code, but it's doing networking stuff that I
don't really understand.
So I'd like an Ack from Dave or someone else in netdev land before I
merge it.
cheers
> diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
> index b571285f6c14..c1abc14cf2bb 100644
> --- a/arch/powerpc/platforms/pseries/mobility.c
> +++ b/arch/powerpc/platforms/pseries/mobility.c
> @@ -17,6 +17,9 @@
> #include <linux/delay.h>
> #include <linux/slab.h>
> #include <linux/stringify.h>
> +#include <linux/netdevice.h>
> +#include <linux/rtnetlink.h>
> +#include <net/net_namespace.h>
>
> #include <asm/machdep.h>
> #include <asm/rtas.h>
> @@ -331,6 +334,8 @@ void post_mobility_fixup(void)
> {
> int rc;
> int activate_fw_token;
> + struct net_device *netdev;
> + struct net *net;
>
> activate_fw_token = rtas_token("ibm,activate-firmware");
> if (activate_fw_token == RTAS_UNKNOWN_SERVICE) {
> @@ -371,6 +376,21 @@ void post_mobility_fixup(void)
> /* Possibly switch to a new RFI flush type */
> pseries_setup_rfi_flush();
>
> + /* need to force a gratuitous ARP on running interfaces */
> + rtnl_lock();
> + for_each_net(net) {
> + for_each_netdev(net, netdev) {
> + if (netif_device_present(netdev) &&
> + netif_running(netdev) &&
> + !(netdev->flags & (IFF_NOARP | IFF_LOOPBACK)))
> + call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
> + netdev);
> + call_netdevice_notifiers(NETDEV_RESEND_IGMP,
> + netdev);
> + }
> + }
> + rtnl_unlock();
> +
> return;
> }
>
> --
> 2.12.3
Powered by blists - more mailing lists