From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D16C51DA5F for ; Wed, 26 Jul 2023 15:37:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A33DAC433C8; Wed, 26 Jul 2023 15:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690385829; bh=Dq3Ew/vR82lY45pv151dWz7lZf5a3r9zNeKkTHvnIOw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dAQKLJHUSj7N6nB7nqA7D2wq15UgMU1sLUJhsItCoNbGWx4RxK/3tXHA+BPterl62 IYer6rwkc8fXxRR6BkXxWk57IIMvem1Hq8En3KDwJf5aIqOy64ned6rFuerVgujt4V L96DFs3RQSj5w1or8/1IJkMBeIJTb6i9aNPCTMTy7sF483rM5//aNHO/Ap4Op1WFfD wmvdpqeGbRHyKj72DzAknDRiRG7Xuj9kHb2muJvDfq4b9vO0pMKnxpOk+KbW/VZmQm siPALaGza9JQOWmBfhuXwLQBT/XDS50RYBpeFh/Rz4sERMaGo3BpnM89CZ14zsqJvk WOfa35WGIIpGw== Date: Wed, 26 Jul 2023 08:37:07 -0700 From: Jakub Kicinski To: Md Danish Anwar Cc: MD Danish Anwar , Randy Dunlap , Roger Quadros , Simon Horman , Vignesh Raghavendra , Andrew Lunn , Richard Cochran , Conor Dooley , Krzysztof Kozlowski , Rob Herring , Paolo Abeni , Eric Dumazet , "David S. Miller" , , , , , , , Subject: Re: [EXTERNAL] Re: [PATCH v11 06/10] net: ti: icssg-prueth: Add ICSSG ethernet driver Message-ID: <20230726083707.623da581@kernel.org> In-Reply-To: <9b11e602-6503-863a-f825-b595effd5e1d@ti.com> References: <20230724112934.2637802-1-danishanwar@ti.com> <20230724112934.2637802-7-danishanwar@ti.com> <20230725210939.56d77726@kernel.org> <9b11e602-6503-863a-f825-b595effd5e1d@ti.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-Transfer-Encoding: 7bit On Wed, 26 Jul 2023 16:01:23 +0530 Md Danish Anwar wrote: > I think MAX_SKB_FRAGS is OK. If the available pool = MAX_SKB_FRAGS we should be > able to wake the queue. MAX_SKB_FRAGS only counts frags and you also need space to map the head, no? In general we advise to wait until there's at least 2 * MAX_SKB_FRAGS to avoid frequent sleep/wake cycles. But IDK how long your queue is, maybe it's too much. > No I don't think any lock is required here. emac_set_port_state() aquires lock > before updating port status. Also emac_ndo_set_rx_mode_work() is scheduled by a > singlethreaded workqueue. if (netif_running()) outside of any locks is usually a red flag, but if you're confident it's fine it's fine :)