From patchwork Tue Jun 28 16:44:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas Gupta X-Patchwork-Id: 12898571 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D38BC433EF for ; Tue, 28 Jun 2022 16:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233472AbiF1Quv (ORCPT ); Tue, 28 Jun 2022 12:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239258AbiF1Qrz (ORCPT ); Tue, 28 Jun 2022 12:47:55 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BF763FD for ; Tue, 28 Jun 2022 09:45:01 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id x138so9842100pfc.3 for ; Tue, 28 Jun 2022 09:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=diaLOWfqH70m/oNEk8XGs5SC46ekZdW7Tharnp3vSAc=; b=AE8KY4OS+VV0NeMKe0kTsCljtao8pDF3Ub3p2AawYbNFE4Vxn3XBgMhY+507cKLRYj 8LETLwkfheJPJXwbgOsy4R8vQSVZHjmPMTFSTy0IMPwG/YEk/2eSn2LDEmBVasVPFIkg 5Nsbq0CLfM0BPtavtEefuvMHvCuIlk0ddG9rg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=diaLOWfqH70m/oNEk8XGs5SC46ekZdW7Tharnp3vSAc=; b=qRZCUDk72yEW7iu52cuThiCYwJKKWq1gBWSEyVF7DQwrxpL694U8bZNRSQ9hPA01My 8xwmMSBXlJSzMFACubXm/sF63fsPE9BuN4K0CAwbb8ATVovGZvfN+PJqU4Ovnma1WV4E oFLmwf9Q6LDOcHX1MDQ6maoRC57k5gf9etXVmd9gncPbrnrzLxEATxEwQjUsTnFYkv/5 pfRd0CcUwSY1K+2f9b3QJrxqAZaI5nwKJ5av4STQwczXSLQf2JKVDGRElgDvdI0MAaDn BG45DloSjdm58b0D1XW+WS/blMgshkLQ/RDErjaClJMxB/IzXj2tL5EY2dmytT+Nkw9+ IA4Q== X-Gm-Message-State: AJIora+yISvHCwgfgo60mtNdkh/S+fAornn5a17yrN/sulEX9FRcMSvI 3Ak/VFCxfg9e5aSlrYWFTFdiYg== X-Google-Smtp-Source: AGRyM1uXElI8EURNfKfPjeapOAC1GvrGlL3XQkTxKDV9TsxSEdBWeed57dxZVLoJtkI2Efyx/ExUgQ== X-Received: by 2002:a63:494:0:b0:40d:9ebf:6e86 with SMTP id 142-20020a630494000000b0040d9ebf6e86mr18856201pge.253.1656434701207; Tue, 28 Jun 2022 09:45:01 -0700 (PDT) Received: from rahul_yocto_ubuntu18.ibn.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id cb14-20020a056a00430e00b0051bbe085f16sm9630866pfb.104.2022.06.28.09.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 09:45:00 -0700 (PDT) From: Vikas Gupta To: jiri@nvidia.com, dsahern@kernel.org, stephen@networkplumber.org Cc: kuba@kernel.org, netdev@vger.kernel.org, edumazet@google.com, michael.chan@broadcom.com, andrew.gospodarek@broadcom.com, Vikas Gupta Subject: [PATCH iproute2-next v1 1/2] Update kernel header Date: Tue, 28 Jun 2022 22:14:46 +0530 Message-Id: <20220628164447.45202-2-vikas.gupta@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220628164447.45202-1-vikas.gupta@broadcom.com> References: <20220628164447.45202-1-vikas.gupta@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com Signed-off-by: Vikas Gupta --- include/uapi/linux/devlink.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index da0f1ba8..ea215b7f 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux/devlink.h @@ -136,6 +136,9 @@ enum devlink_command { DEVLINK_CMD_LINECARD_NEW, DEVLINK_CMD_LINECARD_DEL, + DEVLINK_CMD_SELFTESTS_SHOW, + DEVLINK_CMD_SELFTESTS_RUN, + /* add new commands above here */ __DEVLINK_CMD_MAX, DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 @@ -276,6 +279,21 @@ enum { #define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS \ (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1) +/* Commonly used test cases. Drivers might interpret test bit + * in their own way and it may map single to multiple tests. + */ +enum { + DEVLINK_SELFTEST_FLASH_BIT, + + __DEVLINK_SELFTEST_MAX_BIT, + DEVLINK_SELFTEST_MAX_BIT = __DEVLINK_SELFTEST_MAX_BIT - 1 +}; + +#define DEVLINK_SELFTEST_FLASH _BITUL(DEVLINK_SELFTEST_FLASH_BIT) + +#define DEVLINK_SUPPORTED_SELFTESTS \ + (_BITUL(__DEVLINK_SELFTEST_MAX_BIT) - 1) + /** * enum devlink_trap_action - Packet trap action. * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not @@ -576,6 +594,12 @@ enum devlink_attr { DEVLINK_ATTR_LINECARD_TYPE, /* string */ DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES, /* nested */ + DEVLINK_ATTR_SELFTESTS_MASK, /* bitfield32 */ + DEVLINK_ATTR_TEST_NAMES, /* nested */ + DEVLINK_ATTR_TEST_NAME, /* string */ + DEVLINK_ATTR_TEST_RESULTS, /* nested */ + DEVLINK_ATTR_TEST_RESULT, /* nested */ + DEVLINK_ATTR_TEST_RESULT_VAL, /* u8 */ /* add new attributes above here, update the policy in devlink.c */ __DEVLINK_ATTR_MAX,