From 935fcbdb0ab36fde15cacbfc9bdec5a93b9a3b89 Mon Sep 17 00:00:00 2001 From: Amjad Daraiseh Date: Sat, 24 Aug 2024 03:10:05 +0300 Subject: [PATCH] oper:yang: tc-filter state operational data support Signed-off-by: Amjad Daraiseh --- yang/iproute2-tc-filter.yang | 56 +++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/yang/iproute2-tc-filter.yang b/yang/iproute2-tc-filter.yang index 8e5bd53..37d2635 100644 --- a/yang/iproute2-tc-filter.yang +++ b/yang/iproute2-tc-filter.yang @@ -24,6 +24,60 @@ module iproute2-tc-filter { description "Initial version."; } + grouping filter-state { + container state { + config false; + leaf installed { + type uint64; + description "Time in seconds passed since the filter was installed."; + } + leaf last_used { + type uint64; + description "Time in seconds passed since the filter was last used."; + } + leaf first_used { + type uint64; + description "Time in seconds passed since the filter was first used."; + } + leaf expires { + type uint64; + description "Time in seconds until filter expires."; + } + container stats { + description "Contains 64-bit counters for various network statistics. + Providing detailed information on the traffic handled by the filter."; + leaf bytes { + type uint64; + description "Total number of bytes received by the filter."; + } + leaf packets { + type uint64; + description "Total number of packets received by the filter."; + } + leaf drops { + type uint64; + description "Number of packets dropped by the filter."; + } + leaf overlimits { + type uint64; + description " The number of times the filter has encountered a situation where it exceeded + its configured limits (e.g., rate limits)."; + } + leaf requeues { + type uint64; + description "The number of packets that have been requeued by the filter."; + } + leaf backlog { + type uint64; + description "TThe current amount of data (in bytes) that is waiting in the queue for this filter."; + } + leaf qlen { + type uint64; + description "filter queue length."; + } + } + } + } grouping filter-common { leaf netns { ipr2cgen:not-cmd-arg; @@ -38,7 +92,6 @@ module iproute2-tc-filter { default "1"; description "network namespace name"; } - } grouping filter-result { leaf classid { @@ -136,6 +189,7 @@ module iproute2-tc-filter { type uint8; description "The priority."; } + uses filter-state; choice filter { //ipr2cgen:oper-arg-name "kind"; container flower {