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 14177CA9EB0 for ; Sun, 3 Nov 2019 08:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D086320848 for ; Sun, 3 Nov 2019 08:38:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="B6Qj2/CA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbfKCIg2 (ORCPT ); Sun, 3 Nov 2019 03:36:28 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36969 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbfKCIg2 (ORCPT ); Sun, 3 Nov 2019 03:36:28 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 76A9E20E72; Sun, 3 Nov 2019 03:36:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 03 Nov 2019 03:36:26 -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=N2ZyJwDhwVbwTPws0 lTq1bmo32FmD7n4KRd0dOyqUwQ=; b=B6Qj2/CAhLwgAj0O6wmH0ollxJlCrHMv4 o4VD9lb4BIoY5sWpY70l/2KA13zyrmkE4bS+puyCmmhGEg/vNFGNMlTr2xqjfqDr yPXLvcSjppZ6KGPzj9lxBiqlFXEL8uRdmeUzrOS7/nGNbpT1NMtFjnOVbAU8inRh 90EEhqbAagMGSwhRWOvvgbYu6/D9muP29QtIXsBI52LgZcdItj8yCc8YfGho9YX5 myI/9T1/SfV6vpUjAIoHhA3l/Y+7x2vYn3PNpJESDaCwIGasVSHdGHEqwxiBigxO FDh8qMHiLVqvytwj0erw30TLwL9911GwkzI69HjBEcHejp3Vkc2aA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddutddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecukfhppeduleefrdegjedrudeihedrvdehudenucfrrghrrghmpehmrg hilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrghenucevlhhushhtvghrufhi iigvpedt X-ME-Proxy: Received: from splinter.mtl.com (unknown [193.47.165.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 01558306005C; Sun, 3 Nov 2019 03:36:24 -0500 (EST) 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 0/6] mlxsw: Add extended ACK for EMADs Date: Sun, 3 Nov 2019 10:35:48 +0200 Message-Id: <20191103083554.6317-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 Ethernet Management Datagrams (EMADs) are Ethernet packets sent between the driver and device's firmware. They are used to pass various configurations to the device, but also to get events (e.g., port up) from it. After the Ethernet header, these packets are built in a TLV format. Up until now, whenever the driver issued an erroneous register access it only got an error code indicating a bad parameter was used. This patch set from Shalom adds a new TLV (string TLV) that can be used by the firmware to encode a 128 character string describing the error. The new TLV is allocated by the driver and set to zeros. In case of error, the driver will check the length of the string in the response and print it to the kernel log. Example output: mlxsw_spectrum 0000:03:00.0: EMAD reg access failed (tid=a9719f9700001306,reg_id=8018(rauhtd),type=query,status=7(bad parameter)) mlxsw_spectrum 0000:03:00.0: Firmware error (tid=a9719f9700001306,emad_err_string=inside er_rauhtd_write_query(), num_rec=32 is over the maximum number of records supported) Patch #1 parses the offsets of the different TLVs in incoming EMADs and stores them in the skb's control block. This makes it easier to later add new TLVs. Patches #2-#3 remove deprecated TLVs and add string TLV definition. Patches #4-#6 gradually add support for the new string TLV. Shalom Toledo (6): mlxsw: core: Parse TLVs' offsets of incoming EMADs mlxsw: emad: Remove deprecated EMAD TLVs mlxsw: core: Add EMAD string TLV mlxsw: core: Add support for EMAD string TLV parsing mlxsw: core: Add support for using EMAD string TLV mlxsw: spectrum: Enable EMAD string TLV drivers/net/ethernet/mellanox/mlxsw/core.c | 154 ++++++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/core.h | 2 + drivers/net/ethernet/mellanox/mlxsw/emad.h | 7 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 2 + 4 files changed, 147 insertions(+), 18 deletions(-) -- 2.21.0