From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net-next 00/14] nfp: abm: RED/MQ qdisc offload Date: Fri, 25 May 2018 21:53:24 -0700 Message-ID: <20180526045338.10993-1-jakub.kicinski@netronome.com> Cc: jiri@resnulli.us, xiyou.wangcong@gmail.com, john.fastabend@gmail.com, netdev@vger.kernel.org, oss-drivers@netronome.com, alexei.starovoitov@gmail.com, nogahf@mellanox.com, yuvalm@mellanox.com, gerlitz.or@gmail.com, Jakub Kicinski To: davem@davemloft.net Return-path: Received: from mail-qk0-f194.google.com ([209.85.220.194]:37292 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbeEZEzY (ORCPT ); Sat, 26 May 2018 00:55:24 -0400 Received: by mail-qk0-f194.google.com with SMTP id j12-v6so2308574qkk.4 for ; Fri, 25 May 2018 21:55:24 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: Hi! This is second batch of advanced buffer management nfp driver changes. This series adds the qdisc offload. Support for a very simple subset of RED qdisc offload is added as needed for DCTCP ECN marking (min and max thresholds set to the same value). The first two patches fix glitches introduced by the previous series. We have to be careful about phys_port_name handling, because VFs share the same code path, and some user space may get confused by the names we chose. Since unlike previous offloads we can report the queue backlog both in bytes and packets we need to adjust how statistics are added up in the core (patch 6). There are some extra statistics we want to expose which don't fit into TC stats, namely counts of packets which have been fast- -forwarded without getting enqueued because there was no contention and number of packets that were ever queued (sum of all momentary backlogs). We expose those through ethtool stats (patches 8 and 9). Remaining 5 patches add MQ offload - to be able to set different configurations on different queues. Representors are made multi- -queue and we add offload support to MQ. MQ stats are added up before calling ->dump qdiscs on the children, and therefore don't include updated offload values. To avoid clearly incorrect stats MQ is made to also request stats update from offloads. This way we can correct the diff at the driver level. Jakub Kicinski (14): nfp: return -EOPNOTSUPP from .ndo_get_phys_port_name for VFs nfp: prefix vNIC phys_port_name with 'n' nfp: abm: enable advanced queuing on demand nfp: abm: add helpers for configuring queue marking levels nfp: abm: add simple RED offload net: sched: add qstats.qlen to qlen nfp: abm: report statistics from RED offload nfp: allow apps to add extra stats to ports nfp: abm: expose the internal stats in ethtool nfp: abm: expose all PF queues net: sched: mq: add simple offload notification nfp: abm: multi-queue RED offload net: sched: mq: request stats from offloads nfp: abm: report correct MQ stats drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 275 +++++++++++++ drivers/net/ethernet/netronome/nfp/abm/main.c | 374 +++++++++++++++++- drivers/net/ethernet/netronome/nfp/abm/main.h | 67 ++++ drivers/net/ethernet/netronome/nfp/nfp_abi.h | 14 + drivers/net/ethernet/netronome/nfp/nfp_app.c | 22 ++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 13 + .../ethernet/netronome/nfp/nfp_net_common.c | 11 +- .../ethernet/netronome/nfp/nfp_net_ethtool.c | 10 +- .../net/ethernet/netronome/nfp/nfp_net_repr.c | 5 +- .../net/ethernet/netronome/nfp/nfp_net_repr.h | 7 +- drivers/net/ethernet/netronome/nfp/nfp_port.h | 2 + .../ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 5 + include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 12 + include/net/sch_generic.h | 4 +- net/sched/sch_mq.c | 37 ++ 16 files changed, 843 insertions(+), 16 deletions(-) -- 2.17.0