Re: [PATCH v3 bpf-next 5/5] selftest: Add tests for XDP programs in devmap entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/29/20 10:45 AM, Toke Høiland-Jørgensen wrote:
>> diff --git a/tools/testing/selftests/bpf/progs/test_xdp_devmap_helpers.c b/tools/testing/selftests/bpf/progs/test_xdp_devmap_helpers.c
>> new file mode 100644
>> index 000000000000..b360ba2bd441
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/progs/test_xdp_devmap_helpers.c
>> @@ -0,0 +1,22 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/* fails to load without expected_attach_type = BPF_XDP_DEVMAP
>> + * because of access to egress_ifindex
>> + */
>> +#include <linux/bpf.h>
>> +#include <bpf/bpf_helpers.h>
>> +
>> +SEC("xdp_dm_log")
> Guess this should be xdp_devmap_log now?
> 
no. this program is for negative testing - it should load as an XDP
program without the expected_attach_type set. See the comment at the top
of the file.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux