From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 317F63B2A4 for ; Sat, 25 Jan 2020 10:17:12 -0500 (EST) Received: by mail-il1-x12d.google.com with SMTP id x2so325879ila.9 for ; Sat, 25 Jan 2020 07:17:12 -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 :content-transfer-encoding; bh=fni+e53GjKRKV6taNkzvw5jxDGy9PcBe5gkwwst4aLM=; b=JSehh6fn5tzLQOQSK36LDwWsoDXJ5krlejrKidTFclgcalr6JCCFKHcjur37J8GaNa eDEyv39Zcy245/1ebHkZ94W3xveIgvR1wG7STdRETrnmF+C5faJGsNEYFAs0YzFgCbMV +9hFuA9jrY1cjxLWXeipaem4R8F2DC4fIbtyo32ncEfytwWOyWnvt2CYKc+ztItFuFPW kBIkb1A8jJhPefmMXtRg/4ip6lHUF7bnecVy+emYSmYBTYmzgF79NAfCK83YvndzuaGY 1FN38czdV8SCgzPTnxA9S2kyscdnwCrZhnYPPgRFpEyyEz30TQ/GT9az7rUuIcB4HrVr nIiQ== 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:content-transfer-encoding; bh=fni+e53GjKRKV6taNkzvw5jxDGy9PcBe5gkwwst4aLM=; b=arA4b3t2CBk/Tn09R/8TFcqO+yiT4HAnXPAn6lbvaLEqZEFjoNoNXBuihy7Wn6/kC/ T00YRTtbAh6AEgijsqagI0k3Gn0zSeaq6oHt85S8RJLLiMVc9mrZEOF5lH18q2mW1+BD scfQ/JF1G6daCSQkTwW5dKMRnHutV3VEzBZjKoL9I63sTo6VFLUUsr2KmQTJFgzMh0t0 k/b2Vl8XRXO6Vs1hdSLUdzSS+viPXZDsRGf48iUfEd6LGoPltsz8MsWt17MEoEcrRY5Q nUayZIsmeTQBaK6UVs964Ax6eu3i4S1FAwXQzXd9OReI1WB4M1NkdmnLOTLjkuTV1Kig 2dWw== X-Gm-Message-State: APjAAAU+TEq+Fvc31cfJ3l7jFDlX+iYl1pHIru3a8L6HVRDFUirlMBbI NiBZswTxVHaKtHxE7MRDvz4cDexu3fvWYYKg47RQ9Q== X-Google-Smtp-Source: APXvYqxAv+OQQCmCHTamE7nrSfSQBPfynJVo+y/QYmZuIb1BOP+v7xKNejDkNKqGC+D9UIMbYn5/9UB73rw9ZAXxDOc= X-Received: by 2002:a05:6e02:5c8:: with SMTP id l8mr8225721ils.287.1579965431485; Sat, 25 Jan 2020 07:17:11 -0800 (PST) MIME-Version: 1.0 References: <20200124132318.712354-1-idosch@idosch.org> In-Reply-To: <20200124132318.712354-1-idosch@idosch.org> From: Dave Taht Date: Sat, 25 Jan 2020 07:17:00 -0800 Message-ID: To: cerowrt-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [Cerowrt-devel] Fwd: [PATCH net-next 00/14] mlxsw: Offload TBF X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 15:17:12 -0000 tbf offload... ---------- Forwarded message --------- From: Ido Schimmel Date: Fri, Jan 24, 2020 at 6:36 AM Subject: [PATCH net-next 00/14] mlxsw: Offload TBF To: Cc: , , , , , , Ido Schimmel From: Ido Schimmel Petr says: In order to allow configuration of shapers on Spectrum family of machines, recognize TBF either as root Qdisc, or as a child of ETS or PRIO. Configure rate of maximum shaper according to TBF rate setting, and maximum shaper burst size according to TBF burst setting. - Patches #1 and #2 make the TBF shaper suitable for offloading. - Patches #3, #4 and #5 are refactoring aimed at easier support of leaf Qdiscs in general. - Patches #6 to #10 gradually introduce TBF offload. - Patches #11 to #14 add selftests. Petr Machata (14): net: sched: sch_tbf: Don't overwrite backlog before dumping net: sched: Make TBF Qdisc offloadable mlxsw: spectrum_qdisc: Extract a per-TC stat function mlxsw: spectrum_qdisc: Add mlxsw_sp_qdisc_get_class_stats() mlxsw: spectrum_qdisc: Extract a common leaf unoffload function mlxsw: reg: Add max_shaper_bs to QoS ETS Element Configuration mlxsw: reg: Increase MLXSW_REG_QEEC_MAS_DIS mlxsw: spectrum: Add lowest_shaper_bs to struct mlxsw_sp mlxsw: spectrum: Configure shaper rate and burst size together mlxsw: spectrum_qdisc: Support offloading of TBF Qdisc selftests: Move two functions from mlxsw's qos_lib to lib selftests: forwarding: lib: Add helpers for busywaiting selftests: forwarding: lib: Allow reading TC rule byte counters selftests: mlxsw: Add a TBF selftest drivers/net/ethernet/mellanox/mlxsw/reg.h | 19 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 16 +- .../net/ethernet/mellanox/mlxsw/spectrum.h | 5 +- .../ethernet/mellanox/mlxsw/spectrum_dcb.c | 5 +- .../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 346 +++++++++++++++--- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 22 ++ net/sched/sch_tbf.c | 56 ++- .../selftests/drivers/net/mlxsw/qos_lib.sh | 24 -- .../drivers/net/mlxsw/sch_tbf_ets.sh | 9 + .../drivers/net/mlxsw/sch_tbf_prio.sh | 9 + .../drivers/net/mlxsw/sch_tbf_root.sh | 9 + tools/testing/selftests/net/forwarding/lib.sh | 45 ++- .../selftests/net/forwarding/sch_tbf_core.sh | 233 ++++++++++++ .../selftests/net/forwarding/sch_tbf_ets.sh | 6 + .../net/forwarding/sch_tbf_etsprio.sh | 39 ++ .../selftests/net/forwarding/sch_tbf_prio.sh | 6 + .../selftests/net/forwarding/sch_tbf_root.sh | 33 ++ 18 files changed, 793 insertions(+), 90 deletions(-) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.s= h create mode 100755 tools/testing/selftests/drivers/net/mlxsw/sch_tbf_prio.= sh create mode 100755 tools/testing/selftests/drivers/net/mlxsw/sch_tbf_root.= sh create mode 100644 tools/testing/selftests/net/forwarding/sch_tbf_core.sh create mode 100755 tools/testing/selftests/net/forwarding/sch_tbf_ets.sh create mode 100644 tools/testing/selftests/net/forwarding/sch_tbf_etsprio.= sh create mode 100755 tools/testing/selftests/net/forwarding/sch_tbf_prio.sh create mode 100755 tools/testing/selftests/net/forwarding/sch_tbf_root.sh -- 2.24.1 --=20 Make Music, Not War Dave T=C3=A4ht CTO, TekLibre, LLC http://www.teklibre.com Tel: 1-831-435-0729