Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp37572lqh; Wed, 27 Mar 2024 14:04:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIhsM1+63CEOtTUJDB719iDwxGen2eCf+hkk7JfvIIH8igQvCwwZIx+zJ0xPqvs6jwGn3PgEtHehdFRhIiZsWBj99ghNzS/JZdXEApCQ== X-Google-Smtp-Source: AGHT+IGfcMwgpPHqZGxlAGGSSqsLUenEtiLV7MBm+bbJsKPHDbLayYRpQIUdzoPhXBmnsVIDDBkT X-Received: by 2002:a05:6a20:3d15:b0:1a5:69a3:4c51 with SMTP id y21-20020a056a203d1500b001a569a34c51mr1220237pzi.46.1711573450810; Wed, 27 Mar 2024 14:04:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711573450; cv=pass; d=google.com; s=arc-20160816; b=oKFMM2dnBvMQylYnTMKN8lWBjgRtE0qnbFaDohU5ev1/WRScjSI5LGretiXUHUE/ar Pbhq/Pgu7Xgg6+cy3bD6Jk30eLEbkNKx2AMmHXXZ7OuJrJSLbwZw3K8QbEu4JOOQdx2k JzpU946e7NCaD9UheztAxerggyCkwZLmQQVScX+cb1aJb0olG36a00NSMGf4K+D2mrks /ujTC50EHRpyqzRVmpnJOAAKWH4/9ASiqZn7b/y7UaCdLwLX8MD6G9IHAThk12ZTXDJ8 U3q0eSkY8iJQ1TU7/hmkdPl/Bg69N6/bEt2gXru11sV4ed1sl7cRaSrJ29ycmYM/3dDe 7tWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=LyZSJYDqtGwMx0T0pPZUuv/EjxpZFXORmC9seBGQ3J0=; fh=XY/rmuqqfAa2bjQ3paGcnwGPQY64iL8az/TDiAShvDU=; b=eAJhDR1SuIfZRTx7t4WYvjlhbHFYA4N0EsdHW64Y/cmGBBVKCcTqCgxAMUp7SxLnsb C8FcrECwkJIrY0QG7+raduKt4tFowhkapUBBEjyQXrPJGLB0d1xOBU/gU1T9NnaVSUOm +T2q2vYVVqjmQyuQoWNBgxH+GrcZRBh6SdGzXpCSisLQvkFRK1jfToIwc2S+8xKiHY9o U+OH7rKI9NrTfymegzxmplMfb4ozMCve1cKmT5UscfgyZfCpPVIGMxoJ0nO5ErXZB3Jz Ria/dbuF1fgXqcSNl4smHZx7UYx9XXvzobPOAlDAqDQ+4OlIUQb4wclCact5cebnGOJc L/VQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=omp.ru); spf=pass (google.com: domain of linux-kernel+bounces-122003-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122003-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j11-20020a65430b000000b005dc85a7bfe6si12225422pgq.109.2024.03.27.14.04.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 14:04:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122003-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=omp.ru); spf=pass (google.com: domain of linux-kernel+bounces-122003-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122003-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 93F62B23E31 for ; Wed, 27 Mar 2024 21:00:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4F8E153567; Wed, 27 Mar 2024 21:00:22 +0000 (UTC) Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2CFF1327EC; Wed, 27 Mar 2024 21:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.154.21.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711573222; cv=none; b=uZmzPDCfeNNxAmBT7eJqLDkAKzdp36oJOchD4diysKkuEOi5nkpubFKiMb8aQSXwjpe/S8oW0nKENEBBem8es00yTvXrTRV6rzLz47X5MJXeFda7GXN1VBDEdRxy1NVjCAPDY4lcGpraxnOW3nlHX4dC45TH/FA4uT62WN08UfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711573222; c=relaxed/simple; bh=x7O4GJqe2xti4nuEXHz6sAiFWm1Qt5JV/1A5WBS+MwE=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=gN60ZNJ3QAO+sGEnC3RwHKxHJEaZUBGL92UIP/cI/hmcQHEJL3IEtu00CX6+BYMJSFeqeYyfcc+46vhbuNF++pEzWpwxHUa8CIjfN5giDWCuYL32UJHiKoEhabfBTxKZKgKGPI7ZmKMopAScfbseB+y2i4u4H23831BJojeACUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru; spf=pass smtp.mailfrom=omp.ru; arc=none smtp.client-ip=90.154.21.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=omp.ru Received: from [192.168.1.105] (31.173.86.12) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Thu, 28 Mar 2024 00:00:02 +0300 Subject: Re: [PATCH 1/2] net: ravb: Always process TX descriptor ring To: Paul Barker , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: =?UTF-8?Q?Niklas_S=c3=b6derlund?= , , , References: <20240326083740.23364-1-paul.barker.ct@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Wed, 27 Mar 2024 23:59:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240326083740.23364-1-paul.barker.ct@bp.renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.1.0, Database issued on: 03/27/2024 20:45:40 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 184456 [Mar 27 2024] X-KSE-AntiSpam-Info: Version: 6.1.0.4 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 13 0.3.13 9d58e50253d512f89cb08f71c87c671a2d0a1bca X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.86.12 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;omp.ru:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 31.173.86.12 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 03/27/2024 20:50:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 3/27/2024 6:25:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit On 3/26/24 11:37 AM, Paul Barker wrote: > The TX queue should be serviced each time the poll function is called, > even if the full RX work budget has been consumed. This prevents > starvation of the TX queue when RX bandwidth usage is high. > > Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") > Signed-off-by: Paul Barker [...] > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index d1be030c8848..4f98e4e2badb 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -1324,12 +1324,12 @@ static int ravb_poll(struct napi_struct *napi, int budget) > int q = napi - priv->napi; > int mask = BIT(q); > int quota = budget; > + bool rearm = true; I don't think we need an initializer, it gets reassigned below. And I'd rather call it unmask... > > /* Processing RX Descriptor Ring */ > /* Clear RX interrupt */ > ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0); > - if (ravb_rx(ndev, "a, q)) > - goto out; > + rearm = !ravb_rx(ndev, "a, q); > > /* Processing TX Descriptor Ring */ > spin_lock_irqsave(&priv->lock, flags); [...] MBR, Sergey