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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 E2103C2D0C6 for ; Sun, 29 Dec 2019 11:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB7D220748 for ; Sun, 29 Dec 2019 11:48:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="vHlGWsUQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726329AbfL2Lsw (ORCPT ); Sun, 29 Dec 2019 06:48:52 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:51631 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbfL2Lsw (ORCPT ); Sun, 29 Dec 2019 06:48:52 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3D87721D46; Sun, 29 Dec 2019 06:48:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 29 Dec 2019 06:48:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=93Krvoxt3LynX7CV2 NxABc20RV+yKtoR8p9VCLnAam8=; b=vHlGWsUQHJvcnuiQ0ThHLlrlzHmEFajeC CbbA4Mfa44V/Tls3qb6Toxr4RCc7ooe/qYFV8MV4gkzVE0IyzFSHWdLNgoDMsStX utjS1MGiPaaUr0W1UyuRyH7qVQ18xJS5+lZnMKQ+cbmB0JVN0SwTP5lwO2h3Zzxh 58ybXuZsU99Egor5e5OebKzH/Q12wvlckHHzpKB2RRSVdpigWDCoI6Hpq5PEMGG2 nuhNs1uB818pPVklDCYz239Er3thopeD+GNAirirq518sJvGe+O6oq5bQjs2419X zvhwSgP9U+FxV7Bo74uZjTtxcCBDxZURJy/IPuqxJvzhaacv00k1Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeffedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecukfhppeejledrudekuddriedurdduudejnecurfgrrhgrmhepmhgrih hlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhgnecuvehluhhsthgvrhfuihii vgeptd X-ME-Proxy: Received: from splinter.mtl.com (bzq-79-181-61-117.red.bezeqint.net [79.181.61.117]) by mail.messagingengine.com (Postfix) with ESMTPA id B8C393060A32; Sun, 29 Dec 2019 06:48:49 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, jiri@mellanox.com, petrm@mellanox.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH net-next 0/3] mlxsw: Allow setting default port priority Date: Sun, 29 Dec 2019 13:48:26 +0200 Message-Id: <20191229114829.61803-1-idosch@idosch.org> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel Petr says: When LLDP APP TLV selector 1 (EtherType) is used with PID of 0, the corresponding entry specifies "default application priority [...] when application priority is not otherwise specified." mlxsw currently supports this type of APP entry, but uses it only as a fallback for unspecified DSCP rules. However non-IP traffic is prioritized according to port-default priority, not according to the DSCP-to-prio tables, and thus it's currently not possible to prioritize such traffic correctly. This patchset extends the use of the abovementioned APP entry to also set default port priority (in patches #1 and #2) and then (in patch #3) adds a selftest. Petr Machata (3): mlxsw: reg: Add QoS Port DSCP to Priority Mapping Register mlxsw: spectrum_dcb: Allow setting default port priority selftests: mlxsw: Add a self-test for port-default priority drivers/net/ethernet/mellanox/mlxsw/reg.h | 33 ++++ .../ethernet/mellanox/mlxsw/spectrum_dcb.c | 17 ++ .../drivers/net/mlxsw/qos_defprio.sh | 176 ++++++++++++++++++ tools/testing/selftests/net/forwarding/lib.sh | 23 +++ 4 files changed, 249 insertions(+) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/qos_defprio.sh -- 2.24.1