Skip to content

Commit 98025bc

Browse files
Lijun Pankuba-moo
authored andcommitted
ibmvnic: notify peers when failover and migration happen
Commit 61d3e1d ("ibmvnic: Remove netdev notify for failover resets") excluded the failover case for notify call because it said netdev_notify_peers() can cause network traffic to stall or halt. Current testing does not show network traffic stall or halt because of the notify call for failover event. netdev_notify_peers may be used when a device wants to inform the rest of the network about some sort of a reconfiguration such as failover or migration. It is unnecessary to call that in other events like FATAL, NON_FATAL, CHANGE_PARAM, and TIMEOUT resets since in those scenarios the hardware does not change. If the driver must do a hard reset, it is necessary to notify peers. Fixes: 61d3e1d ("ibmvnic: Remove netdev notify for failover resets") Suggested-by: Brian King <brking@linux.vnet.ibm.com> Suggested-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com> Signed-off-by: Dany Madden <drt@linux.ibm.com> Signed-off-by: Lijun Pan <ljp@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8393597 commit 98025bc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
20742074
for (i = 0; i < adapter->req_rx_queues; i++)
20752075
napi_schedule(&adapter->napi[i]);
20762076

2077-
if (adapter->reset_reason != VNIC_RESET_FAILOVER) {
2077+
if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
2078+
adapter->reset_reason == VNIC_RESET_MOBILITY) {
20782079
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
20792080
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
20802081
}
@@ -2147,6 +2148,9 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
21472148
if (rc)
21482149
return IBMVNIC_OPEN_FAILED;
21492150

2151+
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
2152+
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
2153+
21502154
return 0;
21512155
}
21522156

0 commit comments

Comments
 (0)