Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6145701rdb; Thu, 14 Dec 2023 09:24:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHN3VYpwgF1SPHjSsiuFQdgEhefb7auayuLo2GAv4kyRZ5YKlyM/+lSstgzYZOAqct93Fg2 X-Received: by 2002:a05:6a00:1889:b0:6ce:64e1:486b with SMTP id x9-20020a056a00188900b006ce64e1486bmr5300155pfh.6.1702574665540; Thu, 14 Dec 2023 09:24:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702574665; cv=none; d=google.com; s=arc-20160816; b=AdzU16xJFcI+EAgNWEkAu+BTi/ITQXF3kyaBqaa8MO9itHV0VrP3eTCUrOsSknhB9H TV6o3QQdLvijF+j9/UgxeahJXfuzZ9r8waOrB/Iha99mftGb8ZNfGXDBQ1McC+R3giqR Hj8zSGD9hPxa9PrzUAU+Ul5EUk3egucHZJG5RCXjc2QN4CQ7+UWzTQUUwb4+ZWsk619g H6l9FMdPy1Ksny2hVst2h5VSIuJVylImsn1kH/0Ar6LIpALRJB4SSLGDc+4+TN2LO6lt r8M7TABZ3mqliuJtpYiIBJFwejFIGM+QXt6xQdy5ZZlUmhTTBRow8ql3A2nHABA9+o9Q OvEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hfaUaps5P8NiZX2dzT6imapPmWCEkdTt/AqViuCaSYk=; fh=L6AOgSgiKGH7TQDWm+F0DFherxd04ugjV0RYUkbH8eY=; b=dZdXsqKp8/E/NHC34LttQYGDypDX5A/3mti/eVD5w8vh5kTiiqfGBZdpkYjak89/68 IQF29u0UmR3qAOg1rMLC+GeyHEvOpMxFhysqLf6gWjkAiQoW5rqR+r7LEguAzMb/2jcJ dZrrD77iIq7E7yyvuZe+8SB9Qd6XcH5G/T20p0QfOv9eIj9+QWdbvc1/ktDWBXTzoi4f A++B4L0z0oHHMBPvW9ICYPFYW4ypEsST8Wk/xMiOO274mGtr8KBYYRoLfJzq2xyeijSM wrpE4Bo4kax9K3IXj6Aj+wd3mwE/AZwrxogxSM8v8yd2ygkyJMZBum4+7gdpQWOkj4aC PJiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bndVW96a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id p25-20020a637f59000000b005cd501ee083si1004328pgn.532.2023.12.14.09.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 09:24:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bndVW96a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 50E0C87943A7; Thu, 14 Dec 2023 09:24:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443804AbjLNRYH (ORCPT + 99 others); Thu, 14 Dec 2023 12:24:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjLNRYG (ORCPT ); Thu, 14 Dec 2023 12:24:06 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3667D93 for ; Thu, 14 Dec 2023 09:24:13 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 654E1C433C7; Thu, 14 Dec 2023 17:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702574652; bh=Lo++xlxLZ+5osBQRnqfeNnIUwruOjg2HtfW4cEdp9TU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bndVW96a5dPw/EEN9DFKm+FmNgfhGjXzX4JEA53PfvnIr/6fDD9jZCQCUY23OHDWx guW75UOqAw7zpVGgQpfIaoAeVkaBI/aHT7oKbUhVL1Kuwq6hG5Xruv1hfNvJf23tnV tP0gpoSw90lxSoA9wgaKZWwfD6Za0kzIELtVZUE0KekIai01mfKTXH7jodr0516CGD WfT7/G9j8yxnzNUpyzfcuD6kKkB1UM0+robF39A8VnHsrr8brFHVHQoDQ3mG8IMScP K3bvyH9CAPIdutDduQXm/G9ohUwimh8f1DPDA3ma+03Ye1CJ1yzdaGLireQfyz6Y+X u8yZSm8o0hBPA== Date: Thu, 14 Dec 2023 09:24:11 -0800 From: Jakub Kicinski To: JustinLai0215 Cc: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "andrew@lunn.ch" , Ping-Ke Shih , Larry Chiu Subject: Re: [PATCH net-next v14 06/13] rtase: Implement .ndo_start_xmit function Message-ID: <20231214092411.62661528@kernel.org> In-Reply-To: References: <20231208094733.1671296-1-justinlai0215@realtek.com> <20231208094733.1671296-7-justinlai0215@realtek.com> <20231212113212.1cfb9e19@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Dec 2023 09:24:21 -0800 (PST) On Thu, 14 Dec 2023 13:00:29 +0000 JustinLai0215 wrote: > > I don't see how this is called, the way you split the submission makes it a bit > > hard to review, oh well. Anyway - if you pass the NAPI budget here - that's not > > right, it may be 0, and you'd loop forever. > > For Tx - you should try to reap some fixed number of packets, say 128, the > > budget is for Rx, not for Tx. > > Even if the budget is 0, this function will not loop forever, it will just run all tx_left. > Or what changes would you like us to make? Ah, good point. It does seem a little accidental to me :S In that case perhaps always consume all completed packets? @budget should not constrain Tx completions directly, see: https://www.kernel.org/doc/html/next/networking/napi.html