summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/devlink.h
diff options
context:
space:
mode:
authorJiri Pirko2016-04-14 18:19:14 +0200
committerDavid S. Miller2016-04-14 22:22:03 +0200
commitdf38dafd255954ee7012785c62e615f595d5cb3c (patch)
tree493e781aa7b44ba00a23ea6162b04c93918d0732 /include/uapi/linux/devlink.h
parentdevlink: add shared buffer configuration (diff)
downloadkernel-qcow2-linux-df38dafd255954ee7012785c62e615f595d5cb3c.tar.gz
kernel-qcow2-linux-df38dafd255954ee7012785c62e615f595d5cb3c.tar.xz
kernel-qcow2-linux-df38dafd255954ee7012785c62e615f595d5cb3c.zip
devlink: implement shared buffer occupancy monitoring interface
User needs to monitor shared buffer occupancy. For that, he issues a snapshot command in order to instruct hardware to catch current and maximal occupancy values, and clear command in order to clear the historical maximal values. Also port-pool and tc-pool-bind command response messages are extended to carry occupancy values. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/devlink.h')
-rw-r--r--include/uapi/linux/devlink.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 9c1aa5783090..ba0073b26fa6 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -53,6 +53,10 @@ enum devlink_command {
DEVLINK_CMD_SB_TC_POOL_BIND_NEW,
DEVLINK_CMD_SB_TC_POOL_BIND_DEL,
+ /* Shared buffer occupancy monitoring commands */
+ DEVLINK_CMD_SB_OCC_SNAPSHOT,
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR,
+
/* add new commands above here */
__DEVLINK_CMD_MAX,
@@ -119,6 +123,8 @@ enum devlink_attr {
DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE, /* u8 */
DEVLINK_ATTR_SB_THRESHOLD, /* u32 */
DEVLINK_ATTR_SB_TC_INDEX, /* u16 */
+ DEVLINK_ATTR_SB_OCC_CUR, /* u32 */
+ DEVLINK_ATTR_SB_OCC_MAX, /* u32 */
/* add new attributes above here, update the policy in devlink.c */