Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1359318pxj; Fri, 18 Jun 2021 05:35:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDH22fasLlFlL8LrBEiMBeWUgnZtwkbSaA5LAYXfHUBBx2WshB1jxcrLqpVIMZJ9lIBQcK X-Received: by 2002:a50:c907:: with SMTP id o7mr4613949edh.120.1624019749085; Fri, 18 Jun 2021 05:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624019749; cv=none; d=google.com; s=arc-20160816; b=vM5KTUw28u6j/hikP+nd+sXxgdrqbs9+syWjy2fyBG/64M6jYUIfBQntgeIXjbSc9+ CQRZZqQwm8KD42mHRpEPk2ia2XgRjplZmfp+SzOhtzXBVW9fDEVfguRJlEf00607MQ4P /bSwzR63eZ5GP2TCxbOPezUsHafhT0/o6iuCyqMKW4+SQXSpPF7WhwbXBIDaqPpjejk9 briLTvkJI4yEUcgYlumykmYy5mqjvSkrn+zKQQJTziOP/ffCQdco54x/PfiwA8LIlOuW 9yX+40oAZPpDHTG+yYrA7i3a/voAnh5SdPYtPA3YIcVjt3wpgg6WpO+vddFVBX3UsHc0 Weyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1XYCKjsMbY4zECkUVkqkwMjGZnPM3/vX6YvoZjO6ubw=; b=r0CNy5eMt4JZrf3+H0MYcm2TkE9TI1Rz8gVzMwXmGJ1ryRTMgDo2qst+9zBMF/Hznp 6wxIy8rqH//3YbbFIYI5FZxiXNx56zvjeUd2/tMSouuZQoAoCQVPUouKx6ngvoWCMl9J xVUTff1+yrar33uiAvdgMo4kDRWzX1KudV5glJDPxIyLRV+D66svvEeUPYc4GvsdBMkI C0r7EPkQx7eOF2BbQUGeXvNi4fT0uwNmOeN1baOgxR4IwtE8a/J8iOzcH5CnHybe/RfQ XCEgu0fPvGu9wLYOSYUEshz0YylBMfyE72EyajGKD7vCvNT6Wkeah9/7jT/9eVckMu9U tQeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=eF8RxTBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si2453038ejq.464.2021.06.18.05.35.26; Fri, 18 Jun 2021 05:35:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=eF8RxTBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233603AbhFRKnT (ORCPT + 99 others); Fri, 18 Jun 2021 06:43:19 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:57900 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233540AbhFRKnT (ORCPT ); Fri, 18 Jun 2021 06:43:19 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 15IAewBf062285; Fri, 18 Jun 2021 05:40:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1624012858; bh=1XYCKjsMbY4zECkUVkqkwMjGZnPM3/vX6YvoZjO6ubw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=eF8RxTBKkZWRnsBfiGem2qGuKE8h0HnRq+YXZnTWND9AhyVBRpBUBAc5V9+j78+6N /xke0Dn20xDA8cXr+LjziShEqfToePu++hCCTOsQdrjBoITG9NHXO/E1s3Cmy/oLPT PjEF1aBA3NXU4D/t8F6jpq8Q6qI78Lz6K9xux+sI= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 15IAewMC042210 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 Jun 2021 05:40:58 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 18 Jun 2021 05:40:57 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Fri, 18 Jun 2021 05:40:57 -0500 Received: from [10.250.100.73] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 15IAest9010697; Fri, 18 Jun 2021 05:40:55 -0500 Subject: Re: [PATCH] net: ethernet: ti: fix netdev_queue compiling error To: Chen Jiahao , , , , , , CC: References: <20210617112838.143314-1-chenjiahao16@huawei.com> From: Grygorii Strashko Message-ID: <6dbabec2-25df-7a4a-457f-d738479d36b1@ti.com> Date: Fri, 18 Jun 2021 13:40:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210617112838.143314-1-chenjiahao16@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/06/2021 14:28, Chen Jiahao wrote: > There is a compiling error in am65-cpsw-nuss.c while not selecting > CONFIG_BQL: > > drivers/net/ethernet/ti/am65-cpsw-nuss.c: In function > ‘am65_cpsw_nuss_ndo_host_tx_timeout’: > drivers/net/ethernet/ti/am65-cpsw-nuss.c:353:26: error: > ‘struct netdev_queue’ has no member named ‘dql’ > 353 | dql_avail(&netif_txq->dql), > | ^~ > > This problem is solved by adding the #ifdef CONFIG_BQL directive > where struct dql is used. > > Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") > Signed-off-by: Chen Jiahao > --- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > index 6a67b026df0b..a0b30bb763ea 100644 > --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c > +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > @@ -346,12 +346,20 @@ static void am65_cpsw_nuss_ndo_host_tx_timeout(struct net_device *ndev, > tx_chn = &common->tx_chns[txqueue]; > trans_start = netif_txq->trans_start; > > +#ifdef CONFIG_BQL > netdev_err(ndev, "txq:%d DRV_XOFF:%d tmo:%u dql_avail:%d free_desc:%zu\n", > txqueue, > netif_tx_queue_stopped(netif_txq), > jiffies_to_msecs(jiffies - trans_start), > dql_avail(&netif_txq->dql), > k3_cppi_desc_pool_avail(tx_chn->desc_pool)); > +#else > + netdev_err(ndev, "txq:%d DRV_XOFF:%d tmo:%u free_desc:%zu\n", > + txqueue, > + netif_tx_queue_stopped(netif_txq), > + jiffies_to_msecs(jiffies - trans_start), > + k3_cppi_desc_pool_avail(tx_chn->desc_pool)); > +#endif > > if (netif_tx_queue_stopped(netif_txq)) { > /* try recover if stopped by us */ > Seems like there is right helper available - qdisc_avail_bulklimit(). Any way, it most probably has to be solved in generic way on netdev/dql level. -- Best regards, grygorii