From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 454BAC43381 for ; Thu, 14 Feb 2019 15:18:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F35EE222D7 for ; Thu, 14 Feb 2019 15:18:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=greyhouse-net.20150623.gappssmtp.com header.i=@greyhouse-net.20150623.gappssmtp.com header.b="heCp8Vyp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405375AbfBNPSC (ORCPT ); Thu, 14 Feb 2019 10:18:02 -0500 Received: from mail-yb1-f179.google.com ([209.85.219.179]:38509 "EHLO mail-yb1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393603AbfBNPSB (ORCPT ); Thu, 14 Feb 2019 10:18:01 -0500 Received: by mail-yb1-f179.google.com with SMTP id x9so2509915ybj.5 for ; Thu, 14 Feb 2019 07:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greyhouse-net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=9OZxPS2z3v5YwLOeUb/fni/vatjFDbHtF/nXwjI+MWQ=; b=heCp8Vypm+3kbYTmRnXLNRGV4OPVrJe+FJ+/t+mGqmi54e2maUwfTpopkCs5arUliL ZG6gkXwLaZiDekwVPl+6u4HzqEhcmNdxBZhiu0KJuW8RhGGR+sm4jNBgwgWsaVh1F2TV eI02OhriDpp9jL/+J6u2TheQyI92pQ44sj10AoUnRt7cNOCJrk15RSrtiF/r37KTFyJo oNkE/1TTPXJkN7Lhq0pjSbU/Lr3d0IwPwmSbcYqpCcMHc+UkY63rjGBBL0g3zus21Tds byXJZSUH2efnkc0I8vX4ox3NR8bE9sqNLNLbfp05eqfEVlLsMeFl4ix6IoinmxtAhfbh u7pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=9OZxPS2z3v5YwLOeUb/fni/vatjFDbHtF/nXwjI+MWQ=; b=n0rOSDuVxo1nNiIqXBs/tzc107ChHWgMGh5p3tuSesxno+xoPF1mvcdwLpgI5wmAG2 Mm5vTR2RBI09Srz02+X3ohOu1cQOhsvcKKKLlRm6kdK+Uzl3KWlWTsj3MzgauVzxF7V5 OC7o56Speo5BwxP4COJI0v4/at5DZeeKNTHIydRlE1uMGtAkN6nEbbkmGHGoRoK7I+J9 vkSiecjqkERACTgZ5W/do8j88cxfecbNHRPRw2CEo6e0vNoVsAuCAUOrb69iR4FfqrhX sHq9zHkgZFgB94pE0OM/jYt6+rE2y5wnNKdz9WwN7vPnI5l8u1vt/T//1CkLNt8luLun IT7Q== X-Gm-Message-State: AHQUAuaPjXImDYw3778ycC9FLpIViwNGK/9xoN6Od6v0LYHc1MQxb3O/ /A2xXtyKLgaI9k9J7K2v3uaYZw== X-Google-Smtp-Source: AHgI3IbEv4cjlcQFi4jGjp0D8siM4uDnyqk77vlUIleg63plVPLz0rROYsEKIcyBC4eT1fQn+6cCPA== X-Received: by 2002:a25:81c3:: with SMTP id n3mr3654874ybm.222.1550157480136; Thu, 14 Feb 2019 07:18:00 -0800 (PST) Received: from C02RW35GFVH8 ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id q185sm697187ywb.15.2019.02.14.07.17.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 07:17:59 -0800 (PST) Date: Thu, 14 Feb 2019 10:17:55 -0500 From: Andy Gospodarek To: Jamal Hadi Salim Cc: Edward Cree , netdev , Jiri Pirko , Cong Wang , Or Gerlitz , PJ Waskiewicz , Anjali Singhai Jain , Jakub Kicinski Subject: Re: TC stats / hw offload question Message-ID: <20190214151755.GA47877@C02RW35GFVH8> References: <26f0cfc9-3bef-8579-72cc-aa6c5ccecd43@solarflare.com> <4cb765dd-453f-3139-bce6-6e0b31167aec@mojatatu.com> <70d77198-42fd-838a-d352-2647e7cad4d6@solarflare.com> <561205a6-101b-c86b-e77d-6ebdcf31a56d@mojatatu.com> <11ab2dc0-ec39-18cd-d170-0d5f954198b9@solarflare.com> <702dd5b7-c6ed-b669-8270-d44f5ff4fb30@mojatatu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <702dd5b7-c6ed-b669-8270-d44f5ff4fb30@mojatatu.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 14, 2019 at 07:39:28AM -0500, Jamal Hadi Salim wrote: > > On 2019-02-11 6:44 a.m., Edward Cree wrote: > > > But since the > >  other vendors don't seem to do that, I wondered if there was a > >  reason, or if perhaps the counter resources (and PCI bw to read > >  them) could be saved if all those separate counters aren't really > >  needed. > > Probably nobody has paid attention or asked as you did. That's not totally true, but I'm glad to hear that others are considering it. > Will let the h/w folks speak for themselves. My understanding > based on experience is counters are cheap. Most modern NICs > and ASICs have a gazillion of them at their disposal. Counters can be cheap to implement (though that does not always mean that everyone chooses to add many of them to hardware), but the real cost to them, as Edward points out, is the cost of accessing them an keeping them up to date. If we are concerned about keeping track of flow counters on thousands (or more) flows the cost on the PCI bus can be quite high. We have been looking at a few options to deal with tracking this massive number of counts, but are open to hearing what others feel they would like to see happen to this. Though stats sometimes seem boring to some developers, they are critical and we have been considering whether or not we need to think about different driver or global infra to handle it.