Lines Matching refs:trap_name
74 local trap_name
79 for trap_name in $(devlink_traps_get); do
81 if [ $(devlink_trap_type_get $trap_name) = "drop" ]; then
82 devlink_trap_action_set $trap_name "trap"
83 action=$(devlink_trap_action_get $trap_name)
85 check_err 1 "Trap $trap_name did not change action to trap"
88 devlink_trap_action_set $trap_name "drop"
89 action=$(devlink_trap_action_get $trap_name)
91 check_err 1 "Trap $trap_name did not change action to drop"
94 orig_action=$(devlink_trap_action_get $trap_name)
96 devlink_trap_action_set $trap_name "trap"
97 action=$(devlink_trap_action_get $trap_name)
99 check_err 1 "Trap $trap_name changed action when should not"
102 devlink_trap_action_set $trap_name "drop"
103 action=$(devlink_trap_action_get $trap_name)
105 check_err 1 "Trap $trap_name changed action when should not"
115 local trap_name
119 for trap_name in $(devlink_traps_get); do
120 devlink_trap_metadata_test $trap_name "input_port"
121 check_err $? "Input port not reported as metadata of trap $trap_name"
122 if [ $trap_name == "ingress_flow_action_drop" ] ||
123 [ $trap_name == "egress_flow_action_drop" ]; then
124 devlink_trap_metadata_test $trap_name "flow_action_cookie"
125 check_err $? "Flow action cookie not reported as metadata of trap $trap_name"
145 local trap_name
151 trap_name=${traps_arr[0]}
153 devlink_trap_action_set $trap_name "made_up_action"
161 local trap_name
166 for trap_name in $(devlink_traps_get); do
167 devlink_trap_stats_idle_test $trap_name
168 check_err $? "Stats of trap $trap_name not idle when netdev down"
172 if [ $(devlink_trap_type_get $trap_name) = "drop" ]; then
173 devlink_trap_action_set $trap_name "trap"
174 devlink_trap_stats_idle_test $trap_name
175 check_fail $? "Stats of trap $trap_name idle when action is trap"
177 devlink_trap_action_set $trap_name "drop"
178 devlink_trap_stats_idle_test $trap_name
179 check_err $? "Stats of trap $trap_name not idle when action is drop"
182 devlink -s trap show $DEVLINK_DEV trap $trap_name &> /dev/null
185 devlink -s trap show $DEVLINK_DEV trap $trap_name &> /dev/null
188 devlink_trap_drop_stats_idle_test $trap_name
189 check_fail $? "Drop stats of trap $trap_name idle when should not"
191 devlink_trap_stats_idle_test $trap_name
192 check_fail $? "Stats of non-drop trap $trap_name idle when should not"
204 local trap_name
213 for trap_name in $(devlink_traps_get); do
214 curr_group=$(devlink_trap_group_get $trap_name)
219 trap_type=$(devlink_trap_type_get $trap_name)
224 action=$(devlink_trap_action_get $trap_name)
226 check_err 1 "Trap $trap_name did not change action to trap"
232 for trap_name in $(devlink_traps_get); do
233 curr_group=$(devlink_trap_group_get $trap_name)
238 trap_type=$(devlink_trap_type_get $trap_name)
243 action=$(devlink_trap_action_get $trap_name)
245 check_err 1 "Trap $trap_name did not change action to drop"