All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vikas Gupta <vikas.gupta@broadcom.com>
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 <vikas.gupta@broadcom.com>
Subject: [PATCH iproute2-next v1 1/2] Update kernel header
Date: Tue, 28 Jun 2022 22:14:46 +0530	[thread overview]
Message-ID: <20220628164447.45202-2-vikas.gupta@broadcom.com> (raw)
In-Reply-To: <20220628164447.45202-1-vikas.gupta@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
---
 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,
-- 
2.31.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4206 bytes --]

  reply	other threads:[~2022-06-28 16:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 16:44 [PATCH iproute2-next v1 0/2] devlink: add support to run selftests Vikas Gupta
2022-06-28 16:44 ` Vikas Gupta [this message]
2022-06-28 16:44 ` [PATCH iproute2-next v1 2/2] devlink: add support for running selftests Vikas Gupta
2022-06-29 11:37 ` [PATCH iproute2-next v1 0/2] devlink: add support to run selftests Ido Schimmel
2022-07-07 18:31 ` [PATCH iproute2-next v2 0/3] " Vikas Gupta
2022-07-07 18:31   ` [PATCH iproute2-next v2 1/3] devlink: update the devlink.h Vikas Gupta
2022-07-07 18:31   ` [PATCH iproute2-next v2 2/3] devlink: add support for running selftests Vikas Gupta
2022-07-07 18:31   ` [PATCH iproute2-next v2 3/3] devlink : update man page for new commands Vikas Gupta
2022-07-10  8:56   ` [PATCH iproute2-next v2 0/3] devlink: add support to run selftests Ido Schimmel
2022-07-18  6:22   ` [PATCH iproute2-next v3 0/3] devlink: add support to run selftest Vikas Gupta
2022-07-18  6:22     ` [PATCH iproute2-next v3 1/3] devlink: update the devlink.h Vikas Gupta
2022-07-18  6:22     ` [PATCH iproute2-next v3 2/3] devlink: add support for running selftests Vikas Gupta
2022-07-18  6:22     ` [PATCH iproute2-next v3 3/3] devlink : update man page and bash-completion for new commands Vikas Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220628164447.45202-2-vikas.gupta@broadcom.com \
    --to=vikas.gupta@broadcom.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.