netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: <dsahern@gmail.com>, <stephen@networkplumber.org>,
	<netdev@vger.kernel.org>
Cc: Parav Pandit <parav@nvidia.com>
Subject: [PATCH iproute2-next 1/5] devlink: Update kernel headers
Date: Fri, 29 Jan 2021 18:56:04 +0200	[thread overview]
Message-ID: <20210129165608.134965-2-parav@nvidia.com> (raw)
In-Reply-To: <20210129165608.134965-1-parav@nvidia.com>

Update kernel headers to
commit a556dded9c23 ("devlink: Support get and set state of port function")

Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 include/uapi/linux/devlink.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 958ef7b9..a430775d 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -200,6 +200,10 @@ enum devlink_port_flavour {
 	DEVLINK_PORT_FLAVOUR_UNUSED, /* Port which exists in the switch, but
 				      * is not used in any way.
 				      */
+	DEVLINK_PORT_FLAVOUR_PCI_SF, /* Represents eswitch port
+				      * for the PCI SF. It is an internal
+				      * port that faces the PCI SF.
+				      */
 };
 
 enum devlink_param_cmode {
@@ -529,6 +533,7 @@ enum devlink_attr {
 	DEVLINK_ATTR_RELOAD_ACTION_INFO,        /* nested */
 	DEVLINK_ATTR_RELOAD_ACTION_STATS,       /* nested */
 
+	DEVLINK_ATTR_PORT_PCI_SF_NUMBER,	/* u32 */
 	/* add new attributes above here, update the policy in devlink.c */
 
 	__DEVLINK_ATTR_MAX,
@@ -578,9 +583,29 @@ enum devlink_resource_unit {
 enum devlink_port_function_attr {
 	DEVLINK_PORT_FUNCTION_ATTR_UNSPEC,
 	DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR,	/* binary */
+	DEVLINK_PORT_FN_ATTR_STATE,	/* u8 */
+	DEVLINK_PORT_FN_ATTR_OPSTATE,	/* u8 */
 
 	__DEVLINK_PORT_FUNCTION_ATTR_MAX,
 	DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEVLINK_PORT_FUNCTION_ATTR_MAX - 1
 };
 
+enum devlink_port_fn_state {
+	DEVLINK_PORT_FN_STATE_INACTIVE,
+	DEVLINK_PORT_FN_STATE_ACTIVE,
+};
+
+/**
+ * enum devlink_port_fn_opstate - indicates operational state of the function
+ * @DEVLINK_PORT_FN_OPSTATE_ATTACHED: Driver is attached to the function.
+ * For graceful tear down of the function, after inactivation of the
+ * function, user should wait for operational state to turn DETACHED.
+ * @DEVLINK_PORT_FN_OPSTATE_DETACHED: Driver is detached from the function.
+ * It is safe to delete the port.
+ */
+enum devlink_port_fn_opstate {
+	DEVLINK_PORT_FN_OPSTATE_DETACHED,
+	DEVLINK_PORT_FN_OPSTATE_ATTACHED,
+};
+
 #endif /* _LINUX_DEVLINK_H_ */
-- 
2.26.2


  reply	other threads:[~2021-01-29 16:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 16:56 [PATCH iproute2-next 0/5] Support devlink port add delete Parav Pandit
2021-01-29 16:56 ` Parav Pandit [this message]
2021-01-29 16:56 ` [PATCH iproute2-next 2/5] devlink: Introduce PCI SF port flavour and attribute Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 3/5] devlink: Supporting add and delete of devlink port Parav Pandit
2021-01-31 17:26   ` David Ahern
2021-02-01 20:42     ` Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 4/5] devlink: Support get port function state Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 5/5] devlink: Support set of " Parav Pandit
2021-01-31 17:30   ` David Ahern
2021-02-01 20:50     ` Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 0/6] Support devlink port add delete Parav Pandit
2021-02-01 21:35   ` [PATCH iproute2-next v2 1/6] devlink: Update kernel headers Parav Pandit
2021-02-01 21:35   ` [PATCH iproute2-next v2 2/6] devlink: Introduce and use string to number mapper Parav Pandit
2021-02-01 21:35   ` [PATCH iproute2-next v2 3/6] devlink: Introduce PCI SF port flavour and attribute Parav Pandit
2021-02-01 21:35   ` [PATCH iproute2-next v2 4/6] devlink: Supporting add and delete of devlink port Parav Pandit
2021-02-01 21:35   ` [PATCH iproute2-next v2 5/6] devlink: Support get port function state Parav Pandit
2021-02-01 21:35   ` [PATCH iproute2-next v2 6/6] devlink: Support set of " Parav Pandit
2021-02-02  3:20   ` [PATCH iproute2-next v2 0/6] Support devlink port add delete David Ahern
2021-02-02  4:01     ` Parav Pandit

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=20210129165608.134965-2-parav@nvidia.com \
    --to=parav@nvidia.com \
    --cc=dsahern@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).