Skip to content

Commit

Permalink
Merge pull request #164 from Ali-aqrabawi/fix_tc_flower_update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-aqrabawi authored Jul 28, 2024
2 parents 3ed4aa7 + 9684eda commit 28cdeaa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
5 changes: 0 additions & 5 deletions tests/cases/test_tc_filter_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<qdisc-filter>
<dev>if_tc_f1</dev>
<parent>8001:</parent>
<protocol>ip</protocol>
<netns>1</netns>
<rule>
<pref>20</pref>
Expand Down Expand Up @@ -72,7 +71,6 @@
<qdisc-filter>
<dev>if_tc_f2</dev>
<parent>8002:</parent>
<protocol>ip</protocol>
<netns>1</netns>
<rule>
<pref>20</pref>
Expand All @@ -89,7 +87,6 @@
<dev-filter>
<dev>if_tc_f4</dev>
<direction>ingress</direction>
<protocol>ip</protocol>
<netns>1</netns>
<rule>
<pref>10</pref>
Expand All @@ -111,7 +108,6 @@
<dev-filter>
<dev>if_tc_f5_red</dev>
<direction>ingress</direction>
<protocol>ip</protocol>
<netns>tc_filter_red</netns>
<rule>
<pref>101</pref>
Expand All @@ -132,7 +128,6 @@
</dev-filter>
<shared-block-filter xmlns="urn:okda:iproute2:tc:filter">
<block>10</block>
<protocol>ip</protocol>
<netns>1</netns>
<rule>
<pref>10</pref>
Expand Down
23 changes: 15 additions & 8 deletions yang/iproute2-tc-filter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ module iproute2-tc-filter {
default "1";
description "network namespace name";
}
leaf protocol {
type enumeration {
enum "ip";
}
description "The protocol.";
}

}
grouping filter-result {
leaf classid {
Expand Down Expand Up @@ -72,16 +67,28 @@ module iproute2-tc-filter {
ipr2cgen:cmd-start;
ipr2cgen:cmd-add "tc filter add";
ipr2cgen:cmd-delete "tc filter del";
ipr2cgen:cmd-update "tc filter change";
ipr2cgen:cmd-update "tc filter replace";
ipr2cgen:replace-on-update;
ipr2cgen:include_parent_leafs;
ipr2cgen:include-all-on-update;
key "pref";
leaf pref {
type uint32;
description "the preference value";
}
leaf protocol {
type enumeration {
enum "ip";
}
description "EthType protocol.";
default "ip";
}
leaf handle {
type uint16; // review
type string {
pattern '0x[0-9a-fA-F]+|\d+';
}
description "The filter ID.";
default "0x1";
}
leaf prio {
type uint8;
Expand Down

0 comments on commit 28cdeaa

Please sign in to comment.