]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: lib: Add mtu_set(), mtu_restore()
authorPetr Machata <petrm@mellanox.com>
Thu, 20 Sep 2018 06:21:35 +0000 (09:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 14:46:02 +0000 (07:46 -0700)
commitdbeefdd1535e89531ab369379d63eb4fd0983dea
treea3bbf66a9ce35329bdc0ae0e9f7f239370dae34b
parentbaa5592e2595d62782b30ab79eb7be4f41961e35
selftests: forwarding: lib: Add mtu_set(), mtu_restore()

Some selftests need to tweak MTU of an interface, and naturally should
at teardown restore the MTU back to the original value. Add two
functions to facilitate this MTU handling: mtu_set() to change MTU
value, and mtu_reset() to change it back to what it was before.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh