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=-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 30D9CC4CECD for ; Mon, 16 Sep 2019 15:04:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04BE72067B for ; Mon, 16 Sep 2019 15:04:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="I7mMmjXo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388916AbfIPPEr (ORCPT ); Mon, 16 Sep 2019 11:04:47 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50543 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730609AbfIPPEq (ORCPT ); Mon, 16 Sep 2019 11:04:46 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8BA5C220CF; Mon, 16 Sep 2019 11:04:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 16 Sep 2019 11:04:45 -0400 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=fm3; bh=YHeNcJRjjh4mxdnPn pgCbxVZTNyl8O/raQqVebpYTbY=; b=I7mMmjXoym25dXowPzoRg9ccRB3YDfqAV q5akjKFl3mtl4YHZ7r0oMoo5okhyn0cbqICQ1BGtdTdpNqoOKKDhbHF1+0M/Fo1V oIeCb9Fp67UvwI1pFkuRXnTrQqwNHq6QGTQqrB2qzBUFdEnnKP4CrhwicMt5lU/a SmdifEGsQ1wb8GSdEuFXYZG7WXzU1fPqnCg/3E4qwXmGJGgpMNv2VaW7ufLPNBgZ +Cs8c0fAhLnhypWNWJWkWKlbWO3gsND/PapGdp4IEWtPDBHe0/5ErjyvNzI9QPMf lM8j+qrFwLLnvguPAmIHDHMIFahVEZ+8nB6mYvWl/k6D/lWtsoLRA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghh rdhorhhgqeenucfkphepudelfedrgeejrdduieehrddvhedunecurfgrrhgrmhepmhgrih hlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhgnecuvehluhhsthgvrhfuihii vgeptd X-ME-Proxy: Received: from localhost.localdomain (unknown [193.47.165.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 4FCCD8005B; Mon, 16 Sep 2019 11:04:43 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, jiri@mellanox.com, shalomt@mellanox.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH net-next v3 0/3] mlxsw: spectrum_buffers: Add the ability to query the CPU port's shared buffer Date: Mon, 16 Sep 2019 18:04:19 +0300 Message-Id: <20190916150422.28947-1-idosch@idosch.org> X-Mailer: git-send-email 2.21.0 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 Shalom says: While debugging packet loss towards the CPU, it is useful to be able to query the CPU port's shared buffer quotas and occupancy. Patch #1 prevents changing the CPU port's threshold and binding. Patch #2 registers the CPU port with devlink. Patch #3 adds the ability to query the CPU port's shared buffer quotas and occupancy. v3: Patch #2: * Remove unnecessary wrapping v2: Patch #1: * s/0/MLXSW_PORT_CPU_PORT/ * Assign "mlxsw_sp->ports[MLXSW_PORT_CPU_PORT]" at the end of mlxsw_sp_cpu_port_create() to avoid NULL assignment on error path * Add common functions for mlxsw_core_port_init/fini() Patch #2: * Move "changing CPU port's threshold and binding" check to a separate patch Shalom Toledo (3): mlxsw: spectrum_buffers: Prevent changing CPU port's configuration mlxsw: spectrum: Register CPU port with devlink mlxsw: spectrum_buffers: Add the ability to query the CPU port's shared buffer drivers/net/ethernet/mellanox/mlxsw/core.c | 63 ++++++++++++++++--- drivers/net/ethernet/mellanox/mlxsw/core.h | 5 ++ .../net/ethernet/mellanox/mlxsw/spectrum.c | 46 ++++++++++++++ .../mellanox/mlxsw/spectrum_buffers.c | 51 ++++++++++++--- 4 files changed, 148 insertions(+), 17 deletions(-) -- 2.21.0