From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7A43FC46CD2 for ; Tue, 30 Jan 2024 11:36:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D55D041A8B; Tue, 30 Jan 2024 11:36:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D55D041A8B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1706614585; bh=z589ah/E+arRK+98FIzjabP+mwM/CT6Cv5/SEuddldo=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=9U/U6yQfVZeXsPmzBMkPLmzXm2pdkIWo6XyY+wbgIiwG7w+kQn6Ypxg9fwBcKuq9w 0Jxfzo3forxJvYhECzglgE3DaONHyclJgC4LO9G25Dr9+OWT98vdgeAiM7bJsiR9gj rtI8QzVWljhTTYbwu/bepsS8EdRRIRyDjE+jKCNge76oUZjpisRD5UfOvefHK/9hNj 0FhSnTi6wWyq3Rks0tDQL8ty6+ggnt7tMAhlcapWc+0MQNIHZP3wgR/6GnK/qUXW2B jHYOvor1fl2+i3ysAgsogo9z1y9LEqHHKwjmn5fkzh1qsngwzmwtkwj5PZnIW0P8c/ X7r+y+N/IxpJQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m16XejVA6jt9; Tue, 30 Jan 2024 11:36:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D60EC41A65; Tue, 30 Jan 2024 11:36:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D60EC41A65 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3F0171BF681 for ; Tue, 30 Jan 2024 11:36:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 23F91610BD for ; Tue, 30 Jan 2024 11:36:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 23F91610BD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AlfLR_8B5Bw5 for ; Tue, 30 Jan 2024 11:36:19 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5DDF9610AF for ; Tue, 30 Jan 2024 11:36:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5DDF9610AF Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5102e2ab56eso3323035e87.2 for ; Tue, 30 Jan 2024 03:36:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706614577; x=1707219377; 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=z589ah/E+arRK+98FIzjabP+mwM/CT6Cv5/SEuddldo=; b=PZAaNSjFMe84JXpoZwKtYyvnXWIpIAxuNWunQPmuSPFzX2BKavQn+q4C5BuRe2DoJm hh2aglluqR/QbYj1tY3tQ4jjZD8ueiPiCM6W2xpbPuVvtSDLDpjXdEV9RxlhnJtKZNNt /i6730GTDi+LKpGYKereQIigd0VaXVHX8p89goNE1X8aGRO4k1sGN8Zq1Kyscz9zsIYD j63xI/AwQ66DKGeCle+KyGTCNHlfnICA3ql66zb63nt4LSPNTXjhCVvOm6smNxa5oCv+ BT++R10mLGGpIbqtV9CXcUbdxb1tMLOboCqUGkizXWYEJ3kpPXyrO1AcoiD0vbQ4kY/z Ixfw== X-Gm-Message-State: AOJu0Yy/e9E8wTPeHhCP8rIQiQZAf2M62XF2THVtxy34qLYkzAtZ1ng6 BLrustJ0GSvp03PRsiThq18qcbTJwkxIn7gkZctoacEJQ0KXCm9EHA+3B+p00Sw= X-Google-Smtp-Source: AGHT+IGPy0uAw1buNJJZrWt9XnskuJ7XWCPeSlguGsvrKZhuhRZxrERWaw+BR+NwHlRl4eEuwszBng== X-Received: by 2002:a19:4316:0:b0:510:1624:d78a with SMTP id q22-20020a194316000000b005101624d78amr5164645lfa.48.1706614576641; Tue, 30 Jan 2024 03:36:16 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVe/u7U2u9Ln/gA3oj6ap3ovswULcaPor+4WIElnNSdl+h+6A880MWIFKr9qsIHLFnjEiU21Dzd2p7Yv37/fXKTvF4Fxm6Je3rSg+qcyMHLCnrho5ZxB3pMElQs3jzG5V7gxzMFNTn0Qi0VTS+M6qusiHzPm1UvYbYs+/O0pZHE2lo6HI0z30GETvvhtV5++qPJQcK784hHRzoWVUz10QoOGkA2er0hnJxK+x6B0lo0CHcuZltn/nP6Qp0Njr+JsqCYGw== Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id a13-20020a05600c348d00b0040f032787casm1518334wmq.38.2024.01.30.03.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:36:16 -0800 (PST) Date: Tue, 30 Jan 2024 12:36:13 +0100 From: Jiri Pirko To: Wojciech Drewek Message-ID: References: <20240130103101.88175-1-wojciech.drewek@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130103101.88175-1-wojciech.drewek@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1706614577; x=1707219377; darn=lists.osuosl.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=z589ah/E+arRK+98FIzjabP+mwM/CT6Cv5/SEuddldo=; b=yuFEMT3liqa2s/skf2Eol6kSj/V2zvcQiFqgZM13hksniKbgdl2EYOLqRWBeCYWsT+ GviVjA1jtvYnvoJd1/p2f01RRK7xbldU2K8+5jJto/DogvY3pdqSSevsBBIs0WzSH8P4 3DBlJwrnSsAEJUY/C/WOUl+jw4rEUV3pxpuyQvpiw2qTJ+xVdMo7rhPd27yXLVM1DqGW 0gfh3e+aqXSv4P7U3zvtBqnR/R7qFjPiFfyZez/HDJnXFhXhHowA6vI/VvrgTWsjJSXj A62FGNxCK6w9ATvK6UzdE0yyM3uVPNB9l0QgFsQbj+xzw9gMNfTRGoybZEQGVmnh/oK0 waSw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=yuFEMT3l Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4] ice: Remove and readd netdev during devlink reload X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bcreeley@amd.com, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, paul.m.stillwell.jr@intel.com, przemyslaw.kitszel@intel.com, vadim.fedorenko@linux.dev Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Tue, Jan 30, 2024 at 11:31:01AM CET, wojciech.drewek@intel.com wrote: >Recent changes to the devlink reload (commit 9b2348e2d6c9 >("devlink: warn about existing entities during reload-reinit")) >force the drivers to destroy devlink ports during reinit. >Adjust ice driver to this requirement, unregister netdvice, destroy s/netdvice/netdevice/ >devlink port. ice_init_eth() was removed and all the common code >between probe and reload was moved to ice_load(). > >During devlink reload we can't take devl_lock (it's already taken) >and in ice_probe() we have to lock it. Use devl_* variant of the API >which does not acquire and release devl_lock. Guard ice_load() >with devl_lock only in case of probe. > >Introduce ice_debugfs_pf_deinit() in order to release PF's >debugfs entries. Move ice_debugfs_exit() call to ice_module_exit(). Sounds something like 3 patches to me :) > >Suggested-by: Jiri Pirko >Reviewed-by: Przemek Kitszel >Reviewed-by: Vadim Fedorenko >Reviewed-by: Simon Horman >Reviewed-by: Brett Creeley >Signed-off-by: Wojciech Drewek >--- >v2: empty init removed in ice_devlink_reinit_up >v3: refactor locking pattern as Brett suggested >v4: fix wrong function name in commit message >--- > drivers/net/ethernet/intel/ice/ice.h | 3 + > drivers/net/ethernet/intel/ice/ice_debugfs.c | 10 + > drivers/net/ethernet/intel/ice/ice_devlink.c | 68 ++++++- > drivers/net/ethernet/intel/ice/ice_fwlog.c | 2 + > drivers/net/ethernet/intel/ice/ice_main.c | 189 ++++++------------- Yeah. Would be better to split. But up to you. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF546679F1 for ; Tue, 30 Jan 2024 11:36:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706614582; cv=none; b=QitSK9DfTJTZGk09KROZZN5wJQmKyunKAq5ZbKq/DCjvgQYSDkAD6BKlaOXEHqfa2V9yGOrwSFG8fo4DZ2Unc0healErK8SoJ4fztiPn0qNLSqyRjNjuhGjxS3QuI22AWeAW0imcAMMFQoZY71WHcLEPs2kj7ABhKdSmN/oMsVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706614582; c=relaxed/simple; bh=9+tpw6eqVoUx8DaCJOPQlB7e2IqZMzgG6zdL0c9ayVs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hZLINwoecBhY3pzgtx9UCYJ6lRPCR82G9bGqKhKZr8uN6paApfXS5M8QlU2kF31jtdCbcd7KoqlhU3ES0OilRtTNYKPNEZKKzJv109dCbPm/yhUgJexZLlYyBnRJMn1namStvSX8IUBp1Wh9CuscfNb7m4LdsNweYp4Bqep0QsA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=mQXbhnBK; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="mQXbhnBK" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5100cb238bcso6887142e87.3 for ; Tue, 30 Jan 2024 03:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1706614577; x=1707219377; 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=z589ah/E+arRK+98FIzjabP+mwM/CT6Cv5/SEuddldo=; b=mQXbhnBKxm4oQCURC62qAEF8jke1NsWKVD9pHO9c1SJcxDoHnkF2BvpNFgLBiWDK6f SAqaG8K8xCT+Tk+CEWz7OcSB4pNjWI1a2cHU875MCCxOZQcnxs66bH9vZ/oCz6Uc882g D0p9lyXd8Be5Od9mbpx6zq36RKaAaz2KS1xBUl7G2Gbc8X5cjndcAQm8AzaUO2sN0TBB 1Q8rkDgP9hEnjx8tqXjTylcJZJLg3BJXJmt2edpQZWB7CmHrFT0IrUZtVaaL+4tdrbHG KQI81Du+e2MobGUErGTxPBe5pNexzlYkwKwg74QQ3ihkVqJ56R+4DVHISmvGl3S0CBCu E2Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706614577; x=1707219377; 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=z589ah/E+arRK+98FIzjabP+mwM/CT6Cv5/SEuddldo=; b=dRohP7knrUOlBTZMYQj4fT4urUlI1KZsOwns2SbLo+NKLay5UqeydGQqZrnnsZ+04I l/fZ76MYlsmVsDR7N4GgLdcn1EYo9pGri2rarIG1PSi/sfpapjLwzk0fjfuWV02nsI1d hFPXFzTVGu0OuNSddXn+yxR+kOWuPpmovPaW9LJ83WwYQ4L7htO3AR02x3ijQm07UhRD EK4eXkkM2n8INM17v0eIL3tPQ3zs03v2gPeSiN2ePUBrFJanqX5dhL4XtRm3rOsAyBBg wiAfNNHZ8kh1OuOiTmXkw7nueG7AvqkY1YukIwVAqRkPA7bde43dCfpz6eX4iGq6XMoE l9sg== X-Gm-Message-State: AOJu0YwEdjwZE1xxwnIYq/jNwAlUusY4zdj4gvqjidS7O3iGdd4YwoI8 VHy0YvQJTvNlSfnP2RY++dHocbMJ61DL/Y56jTmJ+rVAAfVrV90sXAUeTw+Ccm8= X-Google-Smtp-Source: AGHT+IGPy0uAw1buNJJZrWt9XnskuJ7XWCPeSlguGsvrKZhuhRZxrERWaw+BR+NwHlRl4eEuwszBng== X-Received: by 2002:a19:4316:0:b0:510:1624:d78a with SMTP id q22-20020a194316000000b005101624d78amr5164645lfa.48.1706614576641; Tue, 30 Jan 2024 03:36:16 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVe/u7U2u9Ln/gA3oj6ap3ovswULcaPor+4WIElnNSdl+h+6A880MWIFKr9qsIHLFnjEiU21Dzd2p7Yv37/fXKTvF4Fxm6Je3rSg+qcyMHLCnrho5ZxB3pMElQs3jzG5V7gxzMFNTn0Qi0VTS+M6qusiHzPm1UvYbYs+/O0pZHE2lo6HI0z30GETvvhtV5++qPJQcK784hHRzoWVUz10QoOGkA2er0hnJxK+x6B0lo0CHcuZltn/nP6Qp0Njr+JsqCYGw== Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id a13-20020a05600c348d00b0040f032787casm1518334wmq.38.2024.01.30.03.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:36:16 -0800 (PST) Date: Tue, 30 Jan 2024 12:36:13 +0100 From: Jiri Pirko To: Wojciech Drewek Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, przemyslaw.kitszel@intel.com, vadim.fedorenko@linux.dev, paul.m.stillwell.jr@intel.com, bcreeley@amd.com Subject: Re: [PATCH iwl-next v4] ice: Remove and readd netdev during devlink reload Message-ID: References: <20240130103101.88175-1-wojciech.drewek@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130103101.88175-1-wojciech.drewek@intel.com> Tue, Jan 30, 2024 at 11:31:01AM CET, wojciech.drewek@intel.com wrote: >Recent changes to the devlink reload (commit 9b2348e2d6c9 >("devlink: warn about existing entities during reload-reinit")) >force the drivers to destroy devlink ports during reinit. >Adjust ice driver to this requirement, unregister netdvice, destroy s/netdvice/netdevice/ >devlink port. ice_init_eth() was removed and all the common code >between probe and reload was moved to ice_load(). > >During devlink reload we can't take devl_lock (it's already taken) >and in ice_probe() we have to lock it. Use devl_* variant of the API >which does not acquire and release devl_lock. Guard ice_load() >with devl_lock only in case of probe. > >Introduce ice_debugfs_pf_deinit() in order to release PF's >debugfs entries. Move ice_debugfs_exit() call to ice_module_exit(). Sounds something like 3 patches to me :) > >Suggested-by: Jiri Pirko >Reviewed-by: Przemek Kitszel >Reviewed-by: Vadim Fedorenko >Reviewed-by: Simon Horman >Reviewed-by: Brett Creeley >Signed-off-by: Wojciech Drewek >--- >v2: empty init removed in ice_devlink_reinit_up >v3: refactor locking pattern as Brett suggested >v4: fix wrong function name in commit message >--- > drivers/net/ethernet/intel/ice/ice.h | 3 + > drivers/net/ethernet/intel/ice/ice_debugfs.c | 10 + > drivers/net/ethernet/intel/ice/ice_devlink.c | 68 ++++++- > drivers/net/ethernet/intel/ice/ice_fwlog.c | 2 + > drivers/net/ethernet/intel/ice/ice_main.c | 189 ++++++------------- Yeah. Would be better to split. But up to you.