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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B3EFC169C4 for ; Tue, 29 Jan 2019 23:33:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BECB20823 for ; Tue, 29 Jan 2019 23:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729722AbfA2Xdv (ORCPT ); Tue, 29 Jan 2019 18:33:51 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:37368 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727006AbfA2Xdv (ORCPT ); Tue, 29 Jan 2019 18:33:51 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id A8C3214F19FDA; Tue, 29 Jan 2019 15:33:50 -0800 (PST) Date: Tue, 29 Jan 2019 15:33:50 -0800 (PST) Message-Id: <20190129.153350.778783567985515916.davem@davemloft.net> To: Mathias.Thore@infinera.com Cc: leoyang.li@nxp.com, christophe.leroy@c-s.fr, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David.Gounaris@infinera.com, Joakim.Tjernlund@infinera.com Subject: Re: [PATCH] ucc_geth: Reset BQL queue when stopping device From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 29 Jan 2019 15:33:50 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mathias Thore Date: Tue, 29 Jan 2019 08:07:54 +0000 > Is there a scenario where we are clearing the TX ring but don't want to reset the BQL TX queue? > > I think it makes sense to keep it in ucc_geth_free_tx since the > reason it is needed isn't the timeout per se, but rather the > clearing of the TX ring. This way, it will be performed no matter > why the driver ends up calling this function. I absolutely think the BQL reset should remain in ucc_geth_free_tx(). That way if another callsite for ucc_geth_free_tx() emerges that does need the BQL queue reset, it won't be "forgotten". 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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07EA9C169C4 for ; Tue, 29 Jan 2019 23:35:36 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76CB52082C for ; Tue, 29 Jan 2019 23:35:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76CB52082C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=davemloft.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43q2tF2QZbzDqNX for ; Wed, 30 Jan 2019 10:35:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=davemloft.net (client-ip=2620:137:e000::1:9; helo=shards.monkeyblade.net; envelope-from=davem@davemloft.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=davemloft.net Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43q2rN4gPgzDqNX for ; Wed, 30 Jan 2019 10:33:55 +1100 (AEDT) Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id A8C3214F19FDA; Tue, 29 Jan 2019 15:33:50 -0800 (PST) Date: Tue, 29 Jan 2019 15:33:50 -0800 (PST) Message-Id: <20190129.153350.778783567985515916.davem@davemloft.net> To: Mathias.Thore@infinera.com Subject: Re: [PATCH] ucc_geth: Reset BQL queue when stopping device From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 29 Jan 2019 15:33:50 -0800 (PST) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David.Gounaris@infinera.com, netdev@vger.kernel.org, leoyang.li@nxp.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Mathias Thore Date: Tue, 29 Jan 2019 08:07:54 +0000 > Is there a scenario where we are clearing the TX ring but don't want to reset the BQL TX queue? > > I think it makes sense to keep it in ucc_geth_free_tx since the > reason it is needed isn't the timeout per se, but rather the > clearing of the TX ring. This way, it will be performed no matter > why the driver ends up calling this function. I absolutely think the BQL reset should remain in ucc_geth_free_tx(). That way if another callsite for ucc_geth_free_tx() emerges that does need the BQL queue reset, it won't be "forgotten".