From: Mark Bloch <mbloch@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>,
"huangjunxian (C)" <huangjunxian6@hisilicon.com>,
Mark Bloch <markb@nvidia.com>
Cc: "jgg@nvidia.com" <jgg@nvidia.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: A question about FAILOVER event in RoCE LAG
Date: Sun, 26 Feb 2023 15:57:14 +0200 [thread overview]
Message-ID: <afd9c082-db31-da9e-8cc9-44410d110ccf@nvidia.com> (raw)
In-Reply-To: <Y/tWPpJNz3EHtMgB@unreal>
On 26/02/2023 14:53, Leon Romanovsky wrote:
> +Mark
>
> On Fri, Feb 24, 2023 at 11:14:47AM +0000, huangjunxian (C) wrote:
>> Hi folks!
>>
>> We've been working on LAG in hns RoCE driver, and we notice that when a FAILOVER event
>> occurs in active-backup mode, all GIDs of the RDMA bond device are deleted and new GIDs
>> are added, triggered by the event handler listed below.
>>
>> So, when a FAILOVER event occurs on a RDMA bond device with running traffic, does it make
>> sense that the traffic is terminated since its GIDs are deleted?
Yep, please read the original commit message:
commit 238fdf48f2b54a01cedb5774c3a1e81c94e1a3a0
Author: Matan Barak <matanb@mellanox.com>
Date: Thu Jul 30 18:33:27 2015 +0300
IB/core: Add RoCE table bonding support
Handling bonding and other devices require us to all all GIDs of the
net-devices which are upper-devices of the RoCE port related
net-device.
Active-backup configurations imposes even more challenges as the
default GID should only be set on the active devices (this is
necessary as otherwise the same MAC could be used for several
slaves and thus several slaves will have identical GIDs).
Managing these configurations are done by listening to:
(a) NETDEV_CHANGEUPPER event
(1) if a related net-device is linked, delete all inactive
slaves default GIDs and add the upper device GIDs.
(2) if a related net-device is unlinked, delete all upper GIDs
and add the default GIDs.
(b) NETDEV_BONDING_FAILOVER:
(1) delete the bond GIDs from inactive slaves
(2) delete the inactive slave's default GIDs
(3) Add the bond GIDs to the active slave.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
and please read: https://wiki.linuxfoundation.org/networking/bonding
especially the section that explains some of the restrictions of
active-backup mode.
Mark
>>
>> The FAILOVER event handler mentioned above:
>> static int netdevice_event(struct notifier_block *this, unsigned long event, void *ptr)
>> {
>> ......
>> static const struct netdev_event_work_cmd bonding_event_ips_del_cmd = {
>> .cb = del_netdev_upper_ips, .filter = upper_device_filter};
>> ......
>> switch (event) {
>> ......
>> case NETDEV_BONDING_FAILOVER:
>> cmds[0] = bonding_event_ips_del_cmd;
>> /* Add default GIDs of the bond device */
>> cmds[1] = bonding_default_add_cmd;
>> /* Add IP based GIDs of the bond device */
>> cmds[2] = add_cmd_upper_ips;
>> break;
>> ......
>> }
>> ......
>> }
>>
>> Thanks,
>> Junxian
next prev parent reply other threads:[~2023-02-26 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <26b0d23202814f60b994ce123830353d@hisilicon.com>
2023-02-26 12:53 ` A question about FAILOVER event in RoCE LAG Leon Romanovsky
2023-02-26 13:57 ` Mark Bloch [this message]
2023-03-03 2:36 ` Junxian Huang
2023-03-03 5:34 ` Mark Bloch
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=afd9c082-db31-da9e-8cc9-44410d110ccf@nvidia.com \
--to=mbloch@nvidia.com \
--cc=huangjunxian6@hisilicon.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=markb@nvidia.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