mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
selftests: forwarding: lib: Move here vlan_capture_{, un}install()
Move vlan_capture_install() and vlan_capture_uninstall() from mirror_vlan.sh test to lib.sh so that it can be reused in other tests. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db9d7d36ee
commit
2004a9bcb8
@ -514,6 +514,29 @@ icmp6_capture_uninstall()
|
||||
__icmp_capture_add_del del 100 v6 "$@"
|
||||
}
|
||||
|
||||
__vlan_capture_add_del()
|
||||
{
|
||||
local add_del=$1; shift
|
||||
local pref=$1; shift
|
||||
local dev=$1; shift
|
||||
local filter=$1; shift
|
||||
|
||||
tc filter $add_del dev "$dev" ingress \
|
||||
proto 802.1q pref $pref \
|
||||
flower $filter \
|
||||
action pass
|
||||
}
|
||||
|
||||
vlan_capture_install()
|
||||
{
|
||||
__vlan_capture_add_del add 100 "$@"
|
||||
}
|
||||
|
||||
vlan_capture_uninstall()
|
||||
{
|
||||
__vlan_capture_add_del del 100 "$@"
|
||||
}
|
||||
|
||||
matchall_sink_create()
|
||||
{
|
||||
local dev=$1; shift
|
||||
|
@ -76,29 +76,6 @@ test_vlan()
|
||||
test_vlan_dir egress 0 8
|
||||
}
|
||||
|
||||
vlan_capture_add_del()
|
||||
{
|
||||
local add_del=$1; shift
|
||||
local pref=$1; shift
|
||||
local dev=$1; shift
|
||||
local filter=$1; shift
|
||||
|
||||
tc filter $add_del dev "$dev" ingress \
|
||||
proto 802.1q pref $pref \
|
||||
flower $filter \
|
||||
action pass
|
||||
}
|
||||
|
||||
vlan_capture_install()
|
||||
{
|
||||
vlan_capture_add_del add 100 "$@"
|
||||
}
|
||||
|
||||
vlan_capture_uninstall()
|
||||
{
|
||||
vlan_capture_add_del del 100 "$@"
|
||||
}
|
||||
|
||||
do_test_span_vlan_dir_ips()
|
||||
{
|
||||
local expect=$1; shift
|
||||
|
Loading…
Reference in New Issue
Block a user