On Mon, 1 Oct 2018 14:51:32 +0200, Magnus Karlsson wrote: > Jakub, please take a look at your patches. The last one I had to > change slightly to make it fit with the new interface > xdp_get_umem_from_qid(). An added bonus with this function is that we, > in the future, can also use it from the driver to get a umem, thus > simplifying driver implementations (and later remove the umem from the > NDO completely). Björn will mail patches, at a later point in time, > using this in the i40e and ixgbe drivers, that removes a good chunk of > code from the ZC implementations.
Nice, drivers which don't follow the prepare/commit model of handling reconfigurations will benefit! > I also made your code aware of Tx queues. If we create a socket that > only has a Tx queue, then the queue id will refer to a Tx queue id > only and could be larger than the available amount of Rx queues. > Please take a look at it. The semantics of Tx queue id are slightly unclear. To me XDP is associated with Rx, so the qid in driver context can only refer to Rx queue and its associated XDP Tx queue. It does not mean the Tx queue stack uses, like it does for copy fallback. If one doesn't have a Rx queue $id, there will be no associated XDP Tx queue $id (in all drivers but Intel, and virtio, which use per-CPU Tx queues making TX queue even more meaningless). Its to be seen how others implement AF_XDP. My general feeling is that we should only talk about Rx queues in context of driver XDP.