Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1142322rwl; Wed, 29 Mar 2023 13:21:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ajqeWvDs/R5B23W/CJ061LbCdZNQcfeknEcgdfwD5Lsz4P8LHeR12cdcwf76ic1HgprkiO X-Received: by 2002:a17:906:9bea:b0:930:6d59:d1f8 with SMTP id de42-20020a1709069bea00b009306d59d1f8mr3645431ejc.10.1680121280173; Wed, 29 Mar 2023 13:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680121280; cv=none; d=google.com; s=arc-20160816; b=AEcJKh2Pbb0fbaJ4LfcYGyAA/Cj9haZ9vyze0VDDrRjlD0IfMNwhSCr6vlTzZYURzd ofP+zuEWr1wKSCG3ufO3p4atU0TUzE5uC7YRqMne20K+fl5APVOFe6A88Uvo9Fl9xPSr dxF096AQ3tukvg65Ea6FUrPSah4TYY7ujupTm/YPI517OR3DMHg+B8s27zhDbKhIQmKf Cne/nZML004qahjhMMFlqVPpPv0b7MHiyQ0aGDcl12xI5b+oH+noi0X+nRjLFNTSrUh1 fmBxiRJtmblGRBvPg0CIXYcxjtSQUVBv10xy10asBY5nZ/01P4mm9kTPOh76JOquErQo pprA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=DNVX2oAZVzLpMZ1vlK53N7PiE/o62/uy/O45gih2P/4=; b=NMDJ/SkHMh+ASkTyQ2AdkgaMA5BVoUurRE46RDFb98qTvetieO7loOLwQ5vR9BZsSH A2ilCzKAmE21bbL887bO1OUm8NE+PeYPVvwDw/VpbkKNj8YacRRTUcWaeipQqi0S1SI3 YRLsOlfnyJaYy0pHp9Z5Je7HDJGMtHr3geMFrCamd/O95vUjWLtkiSXzvHEvT9ofl6Da iScV0CNYwrR0Puz6sQUqyvN3DNg8fWE5og9aBgjgJiT6OjY6jY20buFEK28QXGG/0/y2 jjwUxSgcsLIqCnD16ISa46MMvuK+JWCIxfOCddlFMBt1dlZNn4Kux3K7OQygrAa5EWdb P2xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AyaxrvXA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vv8-20020a170907a68800b009327ff6d591si28983035ejc.224.2023.03.29.13.20.54; Wed, 29 Mar 2023 13:21:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AyaxrvXA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbjC2UR3 (ORCPT + 99 others); Wed, 29 Mar 2023 16:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjC2UR3 (ORCPT ); Wed, 29 Mar 2023 16:17:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3025F30C7; Wed, 29 Mar 2023 13:17:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C8C56B82460; Wed, 29 Mar 2023 20:17:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47706C433EF; Wed, 29 Mar 2023 20:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680121045; bh=hL8RFP5Ifh21s7G7hUUcfXFMHxET6E1fGbTTxImEWGk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AyaxrvXAafae+DWlZ93pHbIZtf62VRj2NcOItL1m7RPnDFpfHTUBBSBo0HhJTlCIy RF2/QaMC2mYyoL2P7uv3OAV/kum55UPhYmlz1l6ueAbuKefnVWhlPSJp5UcpXf8rKC uG0n+bwyS+DvDNcq+jgHxY1sa9vaIcOahqw9o5smu7+0w1mfSPOvZMdgQl4b/Bwb+V HW+bGftGJI5VOBuGlUWFCuIcmgxiib+LkvUB/Ii7JLl+d0NVnaEdvB9i1ic4PdT/4k Rjbx+4SxyKtg86hdHUuJ/DOLY0s48924etUpzDVtGV64BMo0K6yeJQp1BlTwUIhJ94 w27V/xR/KWkRw== Date: Wed, 29 Mar 2023 13:17:24 -0700 From: Jakub Kicinski To: Wolfram Sang Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Steve Glendinning , "David S. Miller" , Eric Dumazet , Paolo Abeni , Geert Uytterhoeven , linux-kernel@vger.kernel.org Subject: Re: [PATCH net v4] smsc911x: only update stats when interface is up Message-ID: <20230329131724.4484a881@kernel.org> In-Reply-To: References: <20230329064010.24657-1-wsa+renesas@sang-engineering.com> <20230329123958.045c9861@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Mar 2023 21:48:55 +0200 Wolfram Sang wrote: > > Hm, so you opted to not add the flag in the core? > > To keep the backport small? I think we should just add it.. > > Clearly multiple drivers would benefit and it's not a huge change. > > I did it this way for two reasons. First, yes, this is a minimal patch > for backporting. No dependency on core changes, very easy. Second, this > is a solution I could develop quickly. I am interested in finding > another solution, but I guess it needs more time, especially as it > probably touches 15 drivers. I created an action item for it. I hope > I'll be able to work on it somewhen. But for now, I just need the SMSC > bug fixed and need to move to the next issue. If we later have the > generic solution, converting this driver also won't make a lot of a > difference. Okay, core changes aside - does pm_runtime_put() imply an RCU sync? Otherwise your check in get_stats is racy...