]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: lib: Extract trap_{, un}install()
authorPetr Machata <petrm@mellanox.com>
Thu, 24 May 2018 14:27:35 +0000 (16:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2018 02:26:19 +0000 (22:26 -0400)
commit505d1de5f3760c8cd0b8aa24b6a4257e3a7118be
treea00995d0755bc1dcb78605b344bbefb5264be48a
parentb1a70165c779d47cd3ee565f90596fcb7d619523
selftests: forwarding: lib: Extract trap_{, un}install()

A mirror-to-vlan test that's coming next needs to install the trap
unconditionally. Therefore extract from slow_path_trap_{,un}install()
a more generic functions trap_install() and trap_uninstall(), and covert
the former two to conditional wrappers around these.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh