Switching packets between queues in XDP program

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

 



Hi,
	I’m designing a POC to port a large application from DPDK to XDP. Switching ingressing packets between different processes is part of the core concept of the POC. I saw a question in the Q&A of AF_XDP but the question and answer seem a bit mismatched. The question is about switching umems in copy mode and the answer is generic about switching queues.

Q: Can I use the XSKMAP to implement a switch between different umems in copy mode?
A: The short answer is no, that is not supported at the moment. The XSKMAP can only be used to switch traffic coming in on queue id X to sockets bound to the same queue id X. The XSKMAP can contain sockets bound to different queue ids, for example X and Y, but only traffic goming in from queue id Y can be directed to sockets bound to the same queue id Y. In zero-copy mode, you should use the switch, or other distribution mechanism, in your NIC to direct traffic to the correct queue id and socket.

	My follow up question is whether this applies if I use a shared umem to all queues and devices. Obviously, it does not apply in user mode, as it’s possible to send the packets to any device and queue sharing the umem. Is it impossible to send packets to different queues even if they share umem in the XDP program using the XSKMAP? Is this a hard limit or a safety measure, that may be lifted using some kernel patch? For the POC, the limitation may fail the whole port. I've tried to switch packets between queues in a simple single process application in skb mode with a shared umem and indeed it seems the packets did not reach their destination.

	Thanks,
		Yuval.




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

  Powered by Linux