Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3582419pxu; Tue, 8 Dec 2020 16:21:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGjRxiWJr9L9GuyaIiwF4wNxfYXqlr2RAZuaTzgh2xAfO4j6/YtKloHQNghaA1+jf5t2oX X-Received: by 2002:aa7:d919:: with SMTP id a25mr45491edr.81.1607473274232; Tue, 08 Dec 2020 16:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607473274; cv=none; d=google.com; s=arc-20160816; b=KYyL8V1tyw+lL8QxtmSrcvvWE36+wZNC6M1I/lOuROqMIVDYt4ulsX7Q2D5biy46uz WggTviUgUP7CxPdUFDfqC6Rr6GQ5rMwSJXrTxhoHTHb8LIx+s+dCeew/6oOqWVZtOyVS sSuAKctMhJd8I9VkW5SGHjkpP9yvuABd/oJFemRb3Eag893Y4FNLkooI8mAqI4mRFzPX yzGm9g5KNyS1ujJ1KutNPDGY0hz+rGPzlERru/IO3X4zsSoss+eyp7qNGGrTeZiimRWh /FS+7IpXaFg5PA8uLP2A4QW+iHRBzphpMVxDP4xnYlo2W+pmx/Kef1BcDLehZTwbZTyK vbOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CvJ9oxgZGuLdmONciPenun/XEjnFDxPC4BpIda05bBA=; b=WFXi6SrJRIln72WoItSt4EmWChvCEg5Hr5NnHNU8WSG/aRRZ0Txf7wgOxbm/3h0+eQ LXJJoOTdya2QKWCJFrzTVRK7ilOtKdq2MMEyW14Qr7Vkl9KK/U76ixbykVfqofQyzDrm HXusUuED1ZSzGSaSS0cJwD4P3JR/sigFM5TXlQ55hPOY/aXxnGkVF2v8CW5tKOnQOwJZ MNSfuQD/TAi0MPRHIUJj8nyiSBqHszbzjwdoF2fYcpOwuXHzLtO3pOV9tsLtDoRmIUKg 2r9p2Sywvbq3wS5kpnURehzw7LivdOL3lvj3BPfbR4udCG5xIxvFSEAnoTj+gxcMa9KN fVkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W+X9DvLZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si89897edb.323.2020.12.08.16.20.51; Tue, 08 Dec 2020 16:21:14 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=W+X9DvLZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730945AbgLIASR (ORCPT + 99 others); Tue, 8 Dec 2020 19:18:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730236AbgLIASQ (ORCPT ); Tue, 8 Dec 2020 19:18:16 -0500 Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 822C8C0613CF; Tue, 8 Dec 2020 16:17:36 -0800 (PST) Received: by mail-vk1-xa42.google.com with SMTP id u67so131881vkb.5; Tue, 08 Dec 2020 16:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CvJ9oxgZGuLdmONciPenun/XEjnFDxPC4BpIda05bBA=; b=W+X9DvLZSrT92p0S/60Fxz7I4UCUxRtIeWddqYq0PB9oqbEDlPvHTDaUsamCpDWZl5 K5NYg+1VZMUvg1I9aci1F/f/fxtspgegJBuxe2CSwkNBf7Q1dp7pnKlEcZKODgFU+6mH t2nFyAs/n3YQDY3fu2iS/tQOeaTW9oYHk/Bm3kF9DYsapYakN+7vkVuyUczmY467BXt0 /WwUsGrdkGMaVc2zKbFPQ8lP9Li+IwFUinuxLe8LbETairUQJHuw33P7cJUaNwZmi91l 0i7yL6Q6PWP/AX9+Dam5BXvLvSryv3o7cGFy1f+fA1BVS9yxEZCLbh/Cwoe3eTNhc6oQ V47w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CvJ9oxgZGuLdmONciPenun/XEjnFDxPC4BpIda05bBA=; b=h0TPrwpvw40t40PGXcuV+n/2rmb0tIlBnVWLRByNiiiRUeukOnhuVsxyyIDLopgYVB uM5wHiV+DqnXnL1OpxFOi73UvWRUBQCk93y6dZkKs7omsRwQjcYZhueSc8WCbj3TYDAH uvh8satJWy493TVs4z1YEeFSDFM9MeVY2SynhcL+6fKSAup154neX6Py4KyHzxdNpWih 5ZKfI4pccL/JHikA7lpjQh9tTyUDYCPuCqTORuBoYQR1l38ZqrcD5IK9WiUXRfGx2vWj 06+fFVEH7JJY+I3PUaEeUjwaQebXMNo7jkvM2ujyajwGrJ4F5ZF/dhkPednJ7Uly5EFS WOUQ== X-Gm-Message-State: AOAM530EQ6S+8uGPK+PUgYjmqk1/iCgXdulFTZNBA3ZlVtito1ztTo4v X55j0O4jrjVFZVG5DOLUKoxhC4zBvYeVAzqY7/g= X-Received: by 2002:a05:6122:69c:: with SMTP id n28mr398873vkq.21.1607473055679; Tue, 08 Dec 2020 16:17:35 -0800 (PST) MIME-Version: 1.0 References: <20201206034408.31492-1-TheSven73@gmail.com> <20201208115035.74221c31@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> <20201208152948.006606b3@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: From: Sven Van Asbroeck Date: Tue, 8 Dec 2020 19:17:24 -0500 Message-ID: Subject: Re: [PATCH net v1 1/2] lan743x: improve performance: fix rx_napi_poll/interrupt ping-pong To: Eric Dumazet Cc: Jakub Kicinski , Bryan Whitehead , Microchip Linux Driver Support , David S Miller , Andrew Lunn , netdev , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 6:50 PM Eric Dumazet wrote: > > Driver could be called with an arbitrary budget (of 64), > and if its ring buffer has been depleted, return @budget instead of skb counts, > and not ream the interrupt > Aha, so the decision to re-arm the interrupts is made by looking at whether the device has run out of ring buffers to fill... instead of checking whether the weight was reached ! That makes complete sense. Thank you Eric and Jakub for your expert suggestions.