From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Chan Subject: Re: [PATCH net-next 2/4] bnxt_en: Use NETIF_F_GRO_HW. Date: Wed, 6 Dec 2017 13:04:39 -0800 Message-ID: References: <1512385967-32339-1-git-send-email-michael.chan@broadcom.com> <1512385967-32339-3-git-send-email-michael.chan@broadcom.com> <1512424845.19682.64.camel@gmail.com> <20171205181052.GD3327@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Eric Dumazet , Or Gerlitz , David Miller , Linux Netdev List To: Marcelo Ricardo Leitner Return-path: Received: from mail-oi0-f44.google.com ([209.85.218.44]:43263 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbdLFVEl (ORCPT ); Wed, 6 Dec 2017 16:04:41 -0500 Received: by mail-oi0-f44.google.com with SMTP id f69so3504718oig.10 for ; Wed, 06 Dec 2017 13:04:40 -0800 (PST) In-Reply-To: <20171205181052.GD3327@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Dec 5, 2017 at 10:10 AM, Marcelo Ricardo Leitner wrote: > On Mon, Dec 04, 2017 at 04:07:15PM -0800, Michael Chan wrote: >> As already pointed out, GRO_HW is a subset of GRO. Packets that >> cannot be aggregated in hardware (due to hardware resource limitations >> or protocol types that it doesn't handle) can just be passed to the >> stack for GRO aggregation. > > How would the parameters/limits work in this case? I mean, currently > we have the default weight of 64 packets per napi poll cycle, the > budget of 300 per cycle and also the time constrain, > net.core.netdev_budget_usecs. Good point. Currently, it is no different than LRO. Each aggregated packet is counted as 1. With LRO, you don't necessarily know many packets were merged. With GRO_HW, we know and it's possible to count the original packets towards the NAPI budget. > > With GRO_HW, this 64 limit may be exceeded. I'm looking at qede code > and it works by couting each completion as 1 rcv_pkts > (qede_fp.c:1318). So if it now gets 64 packets, it's up to 64*MTU > aprox, GRO'ed or not. But with GRO_HW, seems it may be much more than > that and which may not be fair with other interfaces in the system. > Drivers supporting GRO_HW probably should account for this. Right. We can make this adjustment for GRO_HW in a future patchset. > > And how can one control how much time a packet may spend on NIC queue > waiting to be GRO'ed? Does it use the coalescing parameters for that? > The GRO_HW timer is currently not exposed. It's different from interrupt coalescing. It's possible to make this a tunable parameter in the future.