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 11EEED1D88B for ; Tue, 15 Oct 2024 16:13:02 +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:Content-Transfer-Encoding: Content-Type: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=nvYuhXQlkuX8kb7ZMaWIwZNGR4o4GQl6VYNilwOgM2M=; b=dsLYU35Pg15f5Epex6LEwfVKH+ thuGDR+7y/VqEl2u5X2FZ7WCJsyJPkCPfmFyPf1q+CORjM6Fiv1VtjyQmLRcSM8dijUpptwkbGIwZ YZTMyXsSXkRWWIVvuEaEi/F7sjApKCHPCpMBS7YizTH0kRDosZb4TkC+5UZwollx8CgGrF276uMwI nhDNeWM5EvxUPYaiw8hCM6q8m8l90vzchtcPm2VruJ1zLMt1jujuPeuBAGlSlsZt6LOQFJ4Tvx5RR 4WPxNHEmiGmCtVaydKEkPOYTpGPNtCSQKC8LTXxpBekrvX3fQ29/BxhXmzyWnxy335mf1COH7kUbE h0YGnyxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0kAE-00000008q5M-1RVQ; Tue, 15 Oct 2024 16:12:50 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0k7P-00000008pWV-3xkp; Tue, 15 Oct 2024 16:09:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D26BD5C57D6; Tue, 15 Oct 2024 16:09:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D34EC4CEC6; Tue, 15 Oct 2024 16:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729008594; bh=uiNbKZymrQtXd06YpQ4Y9UYqOaQxvSWTKDoL7yi1U34=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BncWv6f8nxxYbDxv+zumwT4cANZa+684oDXRaD2IKtNGVbffbdzwl+u95lBOk+7Lh +RWHXZaqRcjbnYDkqsMbWeiOC6JEqF3SfUADHxqheYhVX8Y9awqxN9mh3F5ZK6peuY spR5K/DOCyvsjeKfkQ5ieu8CbFtXiweJIyhNrkjTXzam2hwQSb4DwkTL+YpOkPhVW4 u5Fqi5E22kTdGnz0uLxaDsS7wrTwL+s4vOpQiVxB4H8EwzeyjQfcKP4SIUAc/KXs7b egkcbMZhXxiljEMC6KuFUh44o6CTQbAx8ZTMtLeIqzTGvkvbUVAWFnshhVmwCEfauz 4T1PmY3V+ddvw== Date: Tue, 15 Oct 2024 09:09:52 -0700 From: Jakub Kicinski To: Lorenzo Bianconi Cc: Felix Fietkau , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org, upstream@airoha.com Subject: Re: [PATCH net-next v2] net: airoha: Implement BQL support Message-ID: <20241015090952.6bcb5856@kernel.org> In-Reply-To: References: <20241012-en7581-bql-v2-1-4deb4efdb60b@kernel.org> <20241015073255.74070172@kernel.org> <20241015075255.7a50074f@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_090956_060931_70E4DD56 X-CRM114-Status: GOOD ( 16.84 ) 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 Tue, 15 Oct 2024 17:54:59 +0200 Lorenzo Bianconi wrote: > > Oh, thought its called on stop. In that case we're probably good > > from BQL perspective. > > > > But does it mean potentially very stale packets can sit on the Tx > > ring when the device is stopped, until it's started again? > > Do you mean the packets that the stack is transmitting when the .ndo_stop() > is run? Whatever is in the queue at the time ndo_stop() gets called. Could be the full descriptor ring I presume? > In airoha_dev_stop() we call netif_tx_disable() to disable the transmission > on new packets and inflight packets will be consumed by the completion napi, > is it not enough? They will only get consumed if the DMA gets to them right? Stop seems to stop the DMA. > I guess we can even add netdev_tx_reset_subqueue() for all netdev > queues in airoha_dev_stop(), I do not have a strong opinion about it. What > do you prefer? So to be clear I think this patch is correct as of the current driver code. I'm just wondering if we should call airoha_qdma_cleanup_tx_queue() on stop as well, and then that should come with the reset. I think having a packet stuck in a queue may lead to all sort of oddness so my recommendation would be to flush the queues.