Re: [PATCH bpf-next v6 5/6] bpf: Add selftests for raw syncookie helpers

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

 



On Fri, Apr 22, 2022 at 08:24:21PM +0300, Maxim Mikityanskiy wrote:
> +void test_xdp_synproxy(void)
> +{
> +	int server_fd = -1, client_fd = -1, accept_fd = -1;
> +	struct nstoken *ns = NULL;
> +	FILE *ctrl_file = NULL;
> +	char buf[1024];
> +	size_t size;
> +
> +	SYS("ip netns add synproxy");
> +
> +	SYS("ip link add tmp0 type veth peer name tmp1");
> +	SYS("ip link set tmp1 netns synproxy");
> +	SYS("ip link set tmp0 up");
> +	SYS("ip addr replace 198.18.0.1/24 dev tmp0");
> +
> +	// When checksum offload is enabled, the XDP program sees wrong
> +	// checksums and drops packets.
> +	SYS("ethtool -K tmp0 tx off");

BPF CI image doesn't have ethtool installed.
It will take some time to get it updated. Until then we cannot land the patch set.
Can you think of a way to run this test without shelling to ethtool?



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux