Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2905918rdh; Mon, 27 Nov 2023 01:41:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFawMsuebn5wr4jwwIenEpCxKXTzcmfn6wJDvL8WFv8razpXTXw/zd5jvVz8IozsNsU+rtf X-Received: by 2002:a17:902:82c3:b0:1cc:237c:75d6 with SMTP id u3-20020a17090282c300b001cc237c75d6mr9447049plz.67.1701078113224; Mon, 27 Nov 2023 01:41:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701078113; cv=none; d=google.com; s=arc-20160816; b=QSySCoWXOHO6fN+OelvneIaqyOmOKzNf3jDTcWInt6Bzl8+Tt5sR794K3E2s6vz15A KvztmAQ7AOfjD7UU0UopDt3m37RsPTaTEFOM8B6jBDyBN1ARn8gaPecWNF5rdFbSkC47 Z+qTPBFfn1kJ2zadcd0FsriHnKqxC5NLi9+Kqwhbz8Rs1gkY3eFgKvoGEq5GZu//vMRu wpDCgSJ7bUCDl1vyvz4qsK1mEEm3WwBckm8oyrfyr0AqBT4I1gY2ZuzUqq821JRytot6 BcRLw/CIGcxpXc7mkyaCiTEUygainyfFSr8gmcZocuDICyJkMfBg/PxRwBpg/j3VwcVh CzLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vUCQNPnxA0WhE9IVSXozKQomqPo1RPr5tq7lygXHnZw=; fh=c7GaaWQy5sxGAmN4ZMeRKd0KFpswfbqDKTFE/zDfZXA=; b=MdaY64PnUbs8X3IS7svL9fr2vksJHW/JTtYgPycWua+m1Q87YOF9kccKQb9/RG+fGU 68B+E3gO79JwXZ6VWKUfZqKWGe9U3hEOIhnlQPhz1MitK+0EWqhwNVVKA+4VCJHaXYFn 288AawuI88PJNqToF4paof0w/WPeW2iqtUZADTR7Weece02QSUA5eaW9DZ0EZWRC/Z3K /vB5sWLFKpjuHv1BP8d7of5ABI3P9PJrmixTaZKIc+mRfUDGX3W5aR0vu7m/RC5Pcm+T IjpAda3J8PdRIWg5Ae5Bbj8oLwskNUXUH5FPgP3cTJOyxXi1kJgKKSuRnqxaucbC3esh egMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=PSWLExw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bd7-20020a170902830700b001c60c5bbff2si6101406plb.201.2023.11.27.01.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 01:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=PSWLExw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B83A68068FC1; Mon, 27 Nov 2023 01:41:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232880AbjK0JlM (ORCPT + 99 others); Mon, 27 Nov 2023 04:41:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbjK0JlJ (ORCPT ); Mon, 27 Nov 2023 04:41:09 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8842186 for ; Mon, 27 Nov 2023 01:41:14 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-544455a4b56so5260931a12.1 for ; Mon, 27 Nov 2023 01:41:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1701078073; x=1701682873; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vUCQNPnxA0WhE9IVSXozKQomqPo1RPr5tq7lygXHnZw=; b=PSWLExw4Qo895aEHnG4Gm5EW/d6TYz4++ADzxLY2kZiKJB2IMnjiXbl0CA86YYd9j9 H+UzEiKPuF2gi2FPgvnoUQh53XkmDwS+U3hAOLOLnY02Q3CsCImSZ2BaG1JpTYu+MLGh kzb/5NXrpwygR6NO5reYlqB2Dcb9YeHtPzdcTdP7fPfP8dbynMWfBEEDH+fvNG5OVufD Get5ONdnCmmxcFYiAP+2moKsgjoFGWPgnK6p6mskCtKI0JTGLmmemqWSQeFi4alaqgbg UyZvsioRLl2pmUrpJak29FUtsWdtlXp67X/WEsRsQWCo9DioRDF/lQSwAaSZHjCisyWN 4VCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701078073; x=1701682873; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vUCQNPnxA0WhE9IVSXozKQomqPo1RPr5tq7lygXHnZw=; b=xUNKfV0pXvGlWaulSxRppRPml4Lh4L6hUswR39pdWKNekLHW9dyaKYRLGvEm6fEcRM 3DJORQa5tzc96EGraS+VuzXBiEPAzcWJFqBizwIa1QY+CxjadNfEOdC7hFd8gxL/dFIZ iM3w8NYiEJZR0H5bKECEoSiCb3vNsHLsUdaczbCa1jMmARjt0xIw68Doj/jP63znZa47 ae8bsjI5IPxGDQr7tOLrM/rmcneG9mIzPAVpmEVp/Gubg38MV9B8qun30WKuBrzAzaWm kF+7Pug/Lo37/3jI9aks5xRx0FScGlOXkWW1Bs9iFXynKPIBsGeyQ7hb8oCZ/O/ROvQu 5xeg== X-Gm-Message-State: AOJu0YzlaiJroQ5gPb7j4ieKY8XS73uI2sQDT0d2rbDA7CH5mMloTrSf 69cD1FsXrUHm9W0sDOtGfyHKqA== X-Received: by 2002:a50:9e0f:0:b0:547:b96:1172 with SMTP id z15-20020a509e0f000000b005470b961172mr7473450ede.28.1701078073323; Mon, 27 Nov 2023 01:41:13 -0800 (PST) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id m11-20020a056402050b00b00548a2d1737bsm5053723edv.35.2023.11.27.01.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 01:41:12 -0800 (PST) Date: Mon, 27 Nov 2023 10:41:11 +0100 From: Jiri Pirko To: Sachin Bahadur Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH iwl-net v4] ice: Block PF reinit if attached to bond Message-ID: References: <20231127060512.1283336-1-sachin.bahadur@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127060512.1283336-1-sachin.bahadur@intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 01:41:31 -0800 (PST) Mon, Nov 27, 2023 at 07:05:12AM CET, sachin.bahadur@intel.com wrote: >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"); Nack. Remove the netdev during re-init, that would solve your issue. Looks like some checks are needed to be added in devlink code to make sure drivers behave properly. I'm on in. >+ return -EBUSY; >+ } > ice_unload(pf); > return 0; > case DEVLINK_RELOAD_ACTION_FW_ACTIVATE: >-- >2.25.1 > >