diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2023-01-11 10:35:26 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-01-11 18:16:52 -0800 |
commit | 7d8319a7cc668607aa054ea2da0bb730538a510b (patch) | |
tree | 9a900d101429e4a0135b423c644af6c275f19102 /lib/mpi/mpi-inv.c | |
parent | e67b2554f301b3e12322230ebb81ac7b7892f1a4 (diff) |
selftests/xsk: automatically switch XDP programs
Implement automatic switching of XDP programs and execution modes if
needed by a test. This makes it much simpler to write a test as it
only has to say what XDP program it needs if it is not the default
one. This also makes it possible to remove the initial explicit
attachment of the XDP program as well as the explicit mode switch in
the code. These are now handled by the same code that just checks if a
switch is necessary, so no special cases are needed.
The default XDP program for all tests is one that sends all packets to
the AF_XDP socket. If you need another one, please use the new
function test_spec_set_xdp_prog() to specify what XDP programs and
maps to use for this test.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/r/20230111093526.11682-16-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-inv.c')
0 files changed, 0 insertions, 0 deletions