Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2813320rdh; Sun, 26 Nov 2023 22:05:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVIvx95u+bLHjtXkIehTvoffylF3ehldk1w9UYHT98G5dC7Hlp70LguJ1lQ17f+PxoRcr5 X-Received: by 2002:a05:6808:4185:b0:3b8:5ab0:c465 with SMTP id dj5-20020a056808418500b003b85ab0c465mr7582795oib.15.1701065134001; Sun, 26 Nov 2023 22:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701065133; cv=none; d=google.com; s=arc-20160816; b=gmwVjaGraD29Ro561drMomRBHVOFyTjddx0WrogvHw2Rt90vyY2Gop0Q/9nT1us5BH 6rdXIzPiDappdVucYLfcvJdhldwHeqkJmWBgeFnFo2wVNvVUrM66AGomDEaoJW4uE+se ug7Ns1lnhiFhEZBsxGbdRpjUaomzaT7ckrC0mwib/ujYB0fSADC26432vwAgl0qjBdBS SFO8w621c0Ny/pY6scmV3nJloYD1VV+RC367+3i2taePgELfudZfqMzs57gaA+d2FJm9 Jmze+3gPZYRrhetiaKLO5A+a4cjYZSsvNypELTjm+rQuSdRtts5CWQpOAtTu/9K3BxvH 4UMw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=BCHTUNOmn3M8u8e6jU0DPT1JPOnmDWrbA5SjlizfCHU=; fh=mKo+5T3NYiFJqu1G9JA9eMK8mGWwfrvCYkr3rPImbmI=; b=E4yAlbfFawxgTvnxL3dLAUEZJzutBZqa9OomDvnFAp9rpBeTeG2MEzIxtYzD5qsVY4 yzRmT9pbywrXnFD2m3/kkyp085TfE9DUHuR80SCp7h3308c9zYwW7Jg1R2yQH+3NeJC1 vilLvDSaabJ0lfTJyH03WIPzBuX8gHK9LeVeFBMVz+kwKQ6k+pYGNvqtsAC5qP3SNfqk 8fdTtJzdyioWnrgap+qCv7/FwD0m6RakbaoGpbaUruyjqhKLgBXw+tBiwz2bWbERqrD8 jgfd8d1OpyUvotWN+bSfgGW9Stg3rpWP4TO07GvblOKljQqxSmaUWRU4OJjVT5aDIkyJ ftGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DV7ku2DI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id x9-20020a63fe49000000b005c1ce3c9609si9234962pgj.889.2023.11.26.22.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 22:05:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DV7ku2DI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1879C808BD01; Sun, 26 Nov 2023 22:05:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbjK0GFP (ORCPT + 99 others); Mon, 27 Nov 2023 01:05:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbjK0GFM (ORCPT ); Mon, 27 Nov 2023 01:05:12 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE31D13D; Sun, 26 Nov 2023 22:05:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701065119; x=1732601119; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jl2n3DOTd1DIka9IKBM+HJnvzYRs320kDKrmGMGFtSM=; b=DV7ku2DI0sYRh0xc32QFihO9/M4fFD51OQzJa7I7SLSO/mK33Jcisb7y KqMag0Xcnq6c3+GpYDmk7YzxkEdttrHmQk9C9ego3B+AxLX3ktS/Y7OmR 6I1CHlzovNt/4QXDNXsv54EdhiYygwduNmeZ2zZ1fjFeM4CIYtgnJsJAb G1IiK19qinE+QUN8IU5qAWb2szfc2Wc6VOsfr3RPyeypkb0MXLZtpx1ae eHrfo1PvdiS89m+En22mS/8dGzJdjg79bVn+oZd/Psr1KD4YVQFz+Y8PE 1NOMXE8Q+ZXLB1hIUf3B/hFMtTXJQEnvx2ZY1Rgi9EsedwLC5y/YL6hLj Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="11341583" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="11341583" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2023 22:05:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="717933496" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="717933496" Received: from sbahadur1-bxdsw.sj.intel.com ([10.232.237.139]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2023 22:05:17 -0800 From: Sachin Bahadur To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH iwl-net v4] ice: Block PF reinit if attached to bond Date: Sun, 26 Nov 2023 22:05:12 -0800 Message-Id: <20231127060512.1283336-1-sachin.bahadur@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 26 Nov 2023 22:05:31 -0800 (PST) PF interface part of Bond should not allow driver reinit via devlink. Bond config will be lost due to PF reinit. PF needs to be re-added to Bond after PF reinit. ice_devlink_reload_down is called before PF driver reinit. If PF is attached to bond, ice_devlink_reload_down returns error. Fixes: trailer Reviewed-by: Jacob Keller Signed-off-by: Sachin Bahadur --- drivers/net/ethernet/intel/ice/ice_devlink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c index f4e24d11ebd0..5fe88e949b09 100644 --- a/drivers/net/ethernet/intel/ice/ice_devlink.c +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c @@ -457,6 +457,10 @@ ice_devlink_reload_down(struct devlink *devlink, bool netns_change, "Remove all VFs before doing reinit\n"); return -EOPNOTSUPP; } + if (pf->lag && pf->lag->bonded) { + NL_SET_ERR_MSG_MOD(extack, "Remove all associated Bonds before doing reinit"); + return -EBUSY; + } ice_unload(pf); return 0; case DEVLINK_RELOAD_ACTION_FW_ACTIVATE: -- 2.25.1