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.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -53,6 +53,10 @@ enum devlink_command { · 52 unmodified lines | ||
| 53 | 53 | DEVLINK_CMD_SB_TC_POOL_BIND_NEW, |
| 54 | 54 | DEVLINK_CMD_SB_TC_POOL_BIND_DEL, |
| 55 | 55 | |
| 56 | + /* Shared buffer occupancy monitoring commands */ | |
| 57 | + DEVLINK_CMD_SB_OCC_SNAPSHOT, | |
| 58 | + DEVLINK_CMD_SB_OCC_MAX_CLEAR, | |
| 59 | + | |
| 56 | 60 | /* add new commands above here */ |
| 57 | 61 | |
| 58 | 62 | __DEVLINK_CMD_MAX, |
| @@ -119,6 +123,8 @@ enum devlink_attr { · 60 unmodified lines | ||
| 119 | 123 | DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE, /* u8 */ |
| 120 | 124 | DEVLINK_ATTR_SB_THRESHOLD, /* u32 */ |
| 121 | 125 | DEVLINK_ATTR_SB_TC_INDEX, /* u16 */ |
| 126 | + DEVLINK_ATTR_SB_OCC_CUR, /* u32 */ | |
| 127 | + DEVLINK_ATTR_SB_OCC_MAX, /* u32 */ | |
| 122 | 128 | |
| 123 | 129 | /* add new attributes above here, update the policy in devlink.c */ |
| 124 | 130 | |