Intel 10G 2P X520 Adapter doesn't receive anything with AF XDP

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

 



Sorry to ask another question but I don't get this working.

I have this AF_XDP test program which creates an ordinary SOCK_RAW socket and adds a multicast address to it via IP_ADD_MEMBERSHIP.
Then it loads a BPF program and launches an AF_XDP socket which then processes packets of that multicast.

This works fine on my Mellanox ConnectX5 card, but it doesn't work on my Intel 10G 2P X520 (Kernel 5.6.0 and driver ixgbe 5.1.0-k).
I have an array map in the BPF program which counts the amount of packets received on each RX-Queue:

		SEC("xdp_sock") int xdp_sock_prog(struct xdp_md *ctx) {

			const void *data = (void*)(unsigned long)ctx->data;
			const void *data_end = (void*)(unsigned long)ctx->data_end;
			const int rx_queue_idx = ctx->rx_queue_index;

			const struct ethhdr *eth = (struct ethhdr*)(data);

			unsigned long *idx_counter = bpf_map_lookup_elem(&rx_queue_pckt_counter_map, &rx_queue_idx);
			if(idx_counter != NULL) {
				*idx_counter += 1;
			}

I can then look at this map via bpftool. What I found is that almost no packets are received: only like 4 packets on RX-Queues 1, 2, 3, 4 which I assume are random pings in the network or something but nothing significant (the multicast stream would have a packet rate of 270k pps).

The strange thing now is that everything works fine if I just use that generic Linux socket to receive the packets (without any XDP / AF_XDP / BPF involved).

Any ideas why that is?

Best regards

Max




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux