]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - include/uapi/linux/devlink.h
Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
[mirror_iproute2.git] / include / uapi / linux / devlink.h
index 958ef7b949c6c571ba823d80e4b9c6b1f12b76a5..a430775d9baa39abd372052236ad5d0d6c0e416a 100644 (file)
@@ -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_ */