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 60ACFCD68E1 for ; Tue, 10 Oct 2023 00:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3RIkvHske2XDKYb8ir8Prbn5iFnBJ5IcJEUOwRjCPmk=; b=pEWuJnaoh8i0gB yI9cfameKrMgukN5Mva7nGukCeN3NqLi7uHhg19xmt6vurvg0qgKVyywIB0MNezLTKLL9l5GYHhXi uOJ9qc/BY+Cc1gRRfICiaE1NRT15iLP9h1TiFRA82yphOTem6hBlQ9oJEaeaeiBNit+ZL0z9OwzKy f7qV+Qk46zdNynyKeMAOIAlhq0jM2AVqfZl5f7HFggGyuUlR/IO4kRjiJP7Twl8mk0ycU20XSLCV9 qEaon+dv1y0u9WpGIh+VMbCfZceZKShH22IS2yVmVkJmdI0nMsnqM3Ao2d1erLsudq3WTEYGJoO9N uFF7bnOIKZgqt+yp/iLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq0Ro-00BrYv-0N; Tue, 10 Oct 2023 00:18:04 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq0Rl-00BrXx-0O for linux-arm-kernel@lists.infradead.org; Tue, 10 Oct 2023 00:18:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 238EBB818AF; Tue, 10 Oct 2023 00:17:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8C90C433C7; Tue, 10 Oct 2023 00:17:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696897078; bh=x5Hc0rpJ7iF4Mvhk6x/zisCDD/PrRTFpDv53CC2O8pA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RjEMjD8MS+Q/5+QVyLx7bOMRZwbOvv6hrQ0H1E66dMXO53QxybMIYqFaoqwn/m/Hx TQeL93+lTvBp1WmmW1ecVZGbFxtOj+ddjkXaUOOFy+fJUZtXNegWa6coc28H0BZ09d U01Bs/Y9TJm0BSV8xlqEPS0OAeDy0cVW+HlHL1IlqSD25zqI/yPp4pMQ+WRf68zXUA o8ZYOacL4onZsTDagE9EEcMTrTwH6P56hMmnDXJ1hssLKfqSoHKds0fya38S2gIQQQ N8QqzKh8YbWb2/DU9YrHJyS0CpEKw30fiCMZ7vTGxPxIveJfvQLLNXaHnx1aiQXFNV 7/nVKk/SLQhZg== Date: Mon, 9 Oct 2023 17:17:56 -0700 From: Jakub Kicinski To: "Pandey, Radhey Shyam" Cc: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "Simek, Michal" , "linux@armlinux.org.uk" , "f.fainelli@gmail.com" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "git (AMD-Xilinx)" Subject: Re: [PATCH net-next v7 3/3] net: axienet: Introduce dmaengine support Message-ID: <20231009171756.23e00a89@kernel.org> In-Reply-To: References: <1695843151-1919509-1-git-send-email-radhey.shyam.pandey@amd.com> <1695843151-1919509-4-git-send-email-radhey.shyam.pandey@amd.com> <20231004135317.2b460acf@kernel.org> <20231006143230.4230fdc2@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231009_171801_329410_B3EBEA23 X-CRM114-Status: GOOD ( 11.83 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 9 Oct 2023 19:41:35 +0000 Pandey, Radhey Shyam wrote: > > But somewhere else or just here after printing the warning? > > There is call to netif_stop_queue(ndev) just before this netdev_warn. > I copied below for quick reference. > > + sg_len = skb_shinfo(skb)->nr_frags + 1; > + if (!CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX)) { > + netif_stop_queue(ndev); > + if (net_ratelimit()) > + netdev_warn(ndev, "TX ring unexpectedly full\n"); > + return NETDEV_TX_BUSY; > + } > > However, I noticed above check doesn't account for all frags - so will > modify the if check to see if available space is less than sg_len. If yes, then > stop the queue and return busy , else continue with xmit. Please take a look at: https://www.kernel.org/doc/html/next/networking/driver.html#stop-queues-in-advance _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel