Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp403767pxu; Tue, 1 Dec 2020 14:23:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTKz1CyYOrkAmBTQ5i0hDRB3XSrrgKLQXrXj0ym4oBUobDnC1MeNhCtXO1V2AIHSjXXzVe X-Received: by 2002:a17:906:b53:: with SMTP id v19mr5378787ejg.136.1606861418525; Tue, 01 Dec 2020 14:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861418; cv=none; d=google.com; s=arc-20160816; b=y0I8GMpQoX9CELbzVshei046HLHRwvsyfOiKAaJt8l4KIZahUkBom7sFeFIYiJLJDU q1KN9438keYu1mzaWVVbVGK9B0vGq1YdiDDEaPTI/uy6a6BKAr8MR8aHETRouyBVajBq 6XWi6l9ZWU6EHlgFcuqmdzrIb4EquKLAmpJx+N8nwgvvmL5RrQf4WDFQi/vzQu5tCvgP KeCPWWYS3WhbaV2icw8y73IoGWd1f+N+N0lx8o5MhyqRGucQomeIRLJItRF5zZ17Z0Lj E4m0m25jrEnoyl0eVYUI/diNKXJRhdWN+JTnX8HAptHhOOIYSlZxFqvnNWqAhi5ENOoY oZTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0+zzzfj+NRYzYpoPqI9ls0ujSuW3PGjbH/83BIIxQBs=; b=Rgossy0nbR6NX0enetY1LiayyXhiEUKF7eP4AcYkkWVWBJrRT0BV2i7cptwU4UYDiF vcyjlCPWGp/xqYj+ZoI/9PZ1txNffKNmvcs8D9b2t4X27I/S028mp+ir+Rxo1icVLw4c obieT0yBS8Sp5zoOlZBXQmVe2MU8v3K7Sz9o5B1s+e8/ekDh81tXf8yd+v9tZiRq1Kwd EENkrdfwUl0oo5Rq5UI0KsjDZsiw2G5wHKpz5v4NjhCpnYe1jBJYIUBgKx5ukVrqXIjp XwaaLRES6FldLwIhQqhcV/VFbwsrj+ZyOrKIkWiihoRn49r+LhtyEtCaWfgkG+kR+wwB 5nrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SYZpcZDB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd2si828101ejb.215.2020.12.01.14.23.16; Tue, 01 Dec 2020 14:23:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SYZpcZDB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389247AbgLAJIa (ORCPT + 99 others); Tue, 1 Dec 2020 04:08:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:43818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388888AbgLAJG4 (ORCPT ); Tue, 1 Dec 2020 04:06:56 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2D71020656; Tue, 1 Dec 2020 09:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813575; bh=eYLZ2RtVDb4ffQcW9oBSH3pzI9Tev54mpCfvfSnia5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SYZpcZDB11eeML31wbxQEG7FGPvsT9tpxhqNrFsner6ZmKU14d6vhEhdaWgRxFckO P+YqALVQCsZIopd51xGhDuYNOA9JwwHI3VnrRPemohopDaYK6TrIrjpT3wZBAxVgLG 2JHUXas3QateFPOw9dZweiPgMxludHsO3+sGYMNQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brian King , Pradeep Satyanarayana , Dany Madden , Lijun Pan , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 59/98] ibmvnic: notify peers when failover and migration happen Date: Tue, 1 Dec 2020 09:53:36 +0100 Message-Id: <20201201084657.981073634@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084652.827177826@linuxfoundation.org> References: <20201201084652.827177826@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lijun Pan [ Upstream commit 98025bce3a6200a0c4637272a33b5913928ba5b8 ] Commit 61d3e1d9bc2a ("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: 61d3e1d9bc2a ("ibmvnic: Remove netdev notify for failover resets") Suggested-by: Brian King Suggested-by: Pradeep Satyanarayana Signed-off-by: Dany Madden Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 8d9e95c2725fb..717f793455056 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1994,7 +1994,8 @@ static int do_reset(struct ibmvnic_adapter *adapter, for (i = 0; i < adapter->req_rx_queues; i++) napi_schedule(&adapter->napi[i]); - if (adapter->reset_reason != VNIC_RESET_FAILOVER) { + if (adapter->reset_reason == VNIC_RESET_FAILOVER || + adapter->reset_reason == VNIC_RESET_MOBILITY) { call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev); call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev); } @@ -2067,6 +2068,9 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter, if (rc) return IBMVNIC_OPEN_FAILED; + call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev); + call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev); + return 0; } -- 2.27.0