Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1217451rwb; Wed, 26 Jul 2023 09:09:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlGQ3S71cVQsTyhe/ao0FMse9roFCjbJDK7uu2wOaHUebThcONDixUWsYYFhnSrgmTtleNqN X-Received: by 2002:a05:6a21:7786:b0:13b:ceea:6b50 with SMTP id bd6-20020a056a21778600b0013bceea6b50mr1737800pzc.47.1690387764613; Wed, 26 Jul 2023 09:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690387764; cv=none; d=google.com; s=arc-20160816; b=jdgwGl/H9pu898upW9y+y5Le7TBwYo2y6c0SbrY0IpWsxu/yY4xfu3ETfKowJ7ABQs qAjxmpQJ3OSgPEoUh820QfuHaPstoFtsdMPgbyHT2Qu2ejbDK26ci325vVPuSNfnDN4S oMC8aTXke/2rfHakEgFZH5DmVUpo4/GWJSQBBUaq2Z2rPrduiN9ntG/4lOYFXa2ifCnN D31ANDy9H7SdaFc/sZrFNth9aCPwuMgrinRf2NUhGESV3P1xNLtDz5Av1g1R+OB7vJF3 I/AQXjGzBiF3EWfbLOF5piXzVWEx4aZ/Xs+2zsfY6Xh6NYK+R+vEi9UK0dpvfP3v0KiU d9eQ== 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=W7FYuZh4MTdQ3EB9JHNaJTelAZ47aUg4/I1VZifDKQE=; fh=7XwpytWNJWz9RDezMNrW/rL2XV2qZuDON/LcrcvJR9o=; b=vePD3CgcA/4/XuWEkVvkZioSPFLNFm951jnOGnq0WIugV6uSCqiLCm0MNmMNRTUKU1 d6F7grQXGS2TgRIhIbzrvizQifzJMBHYUmIGUBEmw7uxN+LFkYRV9NcmC+TqFI0NO7cr wML3G70ZzN1MgE1IS48yZJtpj8o4zYc7Mi/3lZNCn6Y2QFzXlRet4aEj/HS9ySn8MZ1L Yw0QHjGCSljP8EvJZqM6cHZvTSSROcdjy8IfYKOyEwe1ujphX+IxEg83bVYcjpYKnat/ KUcJOui9NRGDSKEG3NmfmSfGRSJOE/Kuq9525nm5NyNPvVblqtlnGEyPpsGQF3tuRHYE jq7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dAQKLJHU; 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 l8-20020a056a0016c800b00677429ef6b0si14006176pfc.13.2023.07.26.09.09.11; Wed, 26 Jul 2023 09:09:24 -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=dAQKLJHU; 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 S233472AbjGZPhM (ORCPT + 99 others); Wed, 26 Jul 2023 11:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbjGZPhL (ORCPT ); Wed, 26 Jul 2023 11:37:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69A09B5; Wed, 26 Jul 2023 08:37:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EAEA661B89; 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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, 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 :)