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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 D125CCD37B4 for ; Wed, 4 Sep 2024 13:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EcbQbaIVPohzYKpW0NAJ6739Zodc4w16fXaT/0eJq+0=; b=mq61m8fqWCwCv0MQkpg2paK3Rd ERoOnc+y+IjHvjcF/3+m+YvPedYHF92lwCbPYKAA+GpbDfMERWl8l/B9TEPvRk4BAyH+pYQz6kND6 trrz6PlGEKeQJCGfYBK16+nsDDiYUtfzuQ955WokgCVhC50+1S17hRFHcJ9AbA4/uWYMxCwRqhzoL ZGG+R1CGynnDojIaOHDew7bOyrtUVSHFeH0Wx4btT54ieOEvAmyeV7KS7+W4+FKKwTNvqlDhCeF3E tDPun683cj+S1iDhazjc+k7TNBPoLDIxzUEP6j1GtsvLRMVtnGU2pwVyzUu/PODc71rLg8Y1eOrjc h0A6Cv4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slpfX-00000004T5c-0xhB; Wed, 04 Sep 2024 13:03:31 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slpeZ-00000004SqW-1yyr for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 13:02:33 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42c88128315so3140555e9.0 for ; Wed, 04 Sep 2024 06:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725454949; x=1726059749; darn=lists.infradead.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=EcbQbaIVPohzYKpW0NAJ6739Zodc4w16fXaT/0eJq+0=; b=kFbwUrHTTdMLFBY+J5MTPLbKOn+QTZeNOyaNSKTKbYg6BHfRkVscgz+vQAqBulYrzw sVRD8frq+n3iZVR3+DF5qNStNe7xF1GYwAiX3C+DNhRuutxP6lH8aExklp4auJDcSruw en+l48eGd+2NEftOS5Gkh975S5MPjDj2cSe0GeypsS3S3mgnpjTHN2OKIQAcDZDAbQ+C LCPdZ/vk8xhKaixWTgG3aY/dQGXpljqkVkSsYB6pCODNjtNGfHhFj6lkeWC9JpgJdZtL GpGCnZIlB0RiwRPoBubPRji0ct99G11s6VLjGl8uu+7dFq5Z61vH5/u8uHzxUXuHH6ZJ bkIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725454949; x=1726059749; 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=EcbQbaIVPohzYKpW0NAJ6739Zodc4w16fXaT/0eJq+0=; b=BRmzg/iMB1GAOeo4/15zUXZoOooqCWWyNYw0SGvH7d6sLVsN/4fG3HvO+O8jYlqeiI qVE9/8Jpz1nbRVMwdzg0I547Ct8jVr5eOmkICBqKoKLiQLj77pCRrl+7ooUAlcyePxR4 QVDqBOJuFtO/K//iP+d5ZrNFYfZURbnjxmOPKe46C7PtvN0lW1L5pZVzYKrbL6ZixZxQ 20MNRIe2Clkmoa3RmwRNqWWOw03dBGRTAiZbRAU+LE874ZhrgcrBgbWNfkglzZoFDRQf mmYO93qwfK1f2hh7xkLf9S9MK5uRP2vWmxSTbQYrE3sEGS30/wkgRs3hul23IBAfn83V i8WQ== X-Forwarded-Encrypted: i=1; AJvYcCWeJ3bhgKaFBM+LOVCqrY81/xjdJYVtFiNQkhMfpAMhx/BXeCApm1NCerrQtoH37wuRAt5mac5XjTMP+uyhz7oj@lists.infradead.org X-Gm-Message-State: AOJu0YyN+NEU7lu5Pya/olERFVfiIegrgRKXqzJLGKCTzqLThC3svQJr 0k2fsAYA6FIXzLKnxxW5LJMtyYkCdkahQL7ExvsdBlUEXnAUacOg5/Rpev1QIss= X-Google-Smtp-Source: AGHT+IH7hReguc+nH4lTt0jjKw5fmY4WB2guwukGV6szfSaPGtYeUcThT/DU2IKUCSeJ3RODNpc+Zw== X-Received: by 2002:a05:600c:4fd6:b0:425:6dfa:c005 with SMTP id 5b1f17b1804b1-42bbb204f9dmr68776885e9.2.1725454946828; Wed, 04 Sep 2024 06:02:26 -0700 (PDT) Received: from skbuf ([188.25.134.29]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6df9705sm202738055e9.27.2024.09.04.06.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 06:02:25 -0700 (PDT) Date: Wed, 4 Sep 2024 16:02:23 +0300 From: Vladimir Oltean To: Furong Xu <0x1207@gmail.com> Cc: Alexander Lobakin , Serge Semin , "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rmk+kernel@armlinux.org.uk, linux@armlinux.org.uk, xfr@outlook.com, Vladimir Oltean Subject: Re: [PATCH net-next v7 3/7] net: stmmac: refactor FPE verification process Message-ID: <20240904130223.py2yxmwo5kp6yvnu@skbuf> References: <1e452525e496b28c0b1ea43afbdc3533c92930c6.1725441317.git.0x1207@gmail.com> <1e452525e496b28c0b1ea43afbdc3533c92930c6.1725441317.git.0x1207@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e452525e496b28c0b1ea43afbdc3533c92930c6.1725441317.git.0x1207@gmail.com> <1e452525e496b28c0b1ea43afbdc3533c92930c6.1725441317.git.0x1207@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_060231_533304_6803DB02 X-CRM114-Status: GOOD ( 11.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 04, 2024 at 05:21:18PM +0800, Furong Xu wrote: > +static void stmmac_fpe_verify_timer_arm(struct stmmac_fpe_cfg *fpe_cfg) > +{ > + struct ethtool_mm_state *state = &fpe_cfg->state; > + > + if (state->pmac_enabled && state->tx_enabled && > + state->verify_enabled && > + state->verify_status != ETHTOOL_MM_VERIFY_STATUS_FAILED && > + state->verify_status != ETHTOOL_MM_VERIFY_STATUS_SUCCEEDED) { > + /* give caller a chance to release the spinlock */ > + mod_timer(&fpe_cfg->verify_timer, jiffies + 1); > + } > +} Why do you need to give the caller a chance to release the spinlock? Isn't the timer code blocked anyway, as stmmac_fpe_verify_timer_arm() runs under irqsoff?