Jesper Dangaard Brouer
185431e6d8
AF_XDP-interaction: convert to tx_cyclic_and_rx_process
...
Function now also RX process packet after cyclic TX.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-13 20:45:11 +01:00
Jesper Dangaard Brouer
95a5a31c90
AF_XDP-interaction: add tx_cyclic_batch
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-13 20:03:39 +01:00
Jesper Dangaard Brouer
1750679402
AF_XDP-interaction: Move invent_tx_pkts() out of tx_batch_pkts
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-13 18:25:58 +01:00
Jesper Dangaard Brouer
56ba3a10df
AF_XDP-interaction: Implement a TX batching function
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-07 18:12:11 +01:00
Jesper Dangaard Brouer
8b02218dde
AF_XDP-interaction: Move function tx_pkt
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-07 15:55:30 +01:00
Jesper Dangaard Brouer
bd49ff6ca8
AF_XDP-interaction: Issue with XDP link down/up
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-07 15:35:51 +01:00
Jesper Dangaard Brouer
bb86dc7f1b
AF_XDP-interaction: Adjust error msg
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-07 15:29:39 +01:00
Jesper Dangaard Brouer
709607bfdd
AF_XDP-interaction: Fix pointer to UDP data area for memset
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-03 23:12:20 +01:00
Jesper Dangaard Brouer
1e8ad22fe0
AF_XDP-interaction: Limit FQ refill size
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-03 22:56:19 +01:00
Jesper Dangaard Brouer
37d4f466dd
AF_XDP-interaction: Fix bug in mem_frame_allocator
...
The assumption was that our simple memory allocator for umem
frames return an addr that point to the start of the frame.
When a frame addr is freed/returned via mem_free_umem_frame()
this frame addr doesn't necessary point to the start of the
frame. Often this is not the case. As the kernel RX process
will add some headroom. Our userspace TX process can also choose
to add headroom, resulting in frames returned in Completion Queue
will also have this headroom offset in the addr.
Fix by removing headroom offset when freeing/returning the
frame addr in mem_free_umem_frame().
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-03 22:30:30 +01:00
Jesper Dangaard Brouer
ea8b2df6aa
AF_XDP-interaction: packet TX test
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-03 21:35:02 +01:00
Jesper Dangaard Brouer
25e8873f2f
AF_XDP-interaction: Packet fill helpers
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-03 18:06:39 +01:00
Jesper Dangaard Brouer
c3ca3a6ffc
AF_XDP-interaction: Add debug function pr_addr_info()
...
The packet umem addr can be an offset into the packet.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-12-03 17:44:13 +01:00
Jesper Dangaard Brouer
76af06aaab
AF_XDP-interaction: Start on new tx and rx batch process code
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-29 16:02:57 +01:00
Jesper Dangaard Brouer
fcb6ef74f3
Merge pull request #30 from xdp-project/vestas02_AF_XDP_example
...
AF_XDP example added some results
2021-11-24 18:01:52 +01:00
Jesper Dangaard Brouer
021d262a0b
AF_XDP-interaction: Debug RX-batch processing
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-24 17:54:52 +01:00
Jesper Dangaard Brouer
9584e53e57
AF_XDP-interaction: Record NIC chip used
...
As drivers supports multiple chips.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-24 17:10:20 +01:00
Jesper Dangaard Brouer
457a7a5e1e
AF_XDP-interaction: Add results from system with RT kernel
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-24 17:06:25 +01:00
Jesper Dangaard Brouer
46cc148a03
AF_XDP-interaction: Add spin results from system B
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 16:21:33 +01:00
Jesper Dangaard Brouer
d5ff1ac505
AF_XDP-interaction: Adjust formatting#2, test GitHub rendering
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 16:12:14 +01:00
Jesper Dangaard Brouer
5a45bcbb16
AF_XDP-interaction: Adjust formatting, test GitHub rendering
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 16:07:18 +01:00
Jesper Dangaard Brouer
ff01e2a300
AF_XDP-interaction: Collect interesting data-points
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 15:43:45 +01:00
Jesper Dangaard Brouer
987dd6a15d
AF_XDP-interaction: Crude stats on time-delay
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 15:10:43 +01:00
Jesper Dangaard Brouer
5e31a04734
AF_XDP-interaction: Update results table
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 14:49:21 +01:00
Jesper Dangaard Brouer
d22c08c231
AF_XDP-interaction: Add some time-delay XDP to AF_XDP results
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 14:41:58 +01:00
Jesper Dangaard Brouer
1bb141e9e3
Extend xdp_hints_rx_time with xdp_rx_cpu
...
The latency or time-delay between XDP and AF_XDP depend highly
on whether the XDP and AF_XDP runs on same CPU or remote CPU.
Extend xdp_hints_rx_time, without worrying about the layout
as BTF will adjust, so we can determine case of same CPU or
remote CPU.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 14:33:58 +01:00
Jesper Dangaard Brouer
1ba7209fd4
AF_XDP-interaction: README why RX-ktime matters
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-19 13:41:27 +01:00
Jesper Dangaard Brouer
ac95a4b498
Merge pull request #29 from xdp-project/vestas01_AF_XDP_example
...
Adding AF_XDP example that implement local XDP-hints via BTF
2021-11-17 09:07:33 +01:00
Jesper Dangaard Brouer
01aa47c814
AF_XDP-interaction: Disable stats poll as it is broken
...
The stats poll doesn't take into account multiple XSK sockets.
Simply disable until there is time to fix it.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 20:46:46 +01:00
Jesper Dangaard Brouer
446653f4b4
AF_XDP-interaction: Add option for real-time priority
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 20:12:04 +01:00
Jesper Dangaard Brouer
e9ec65d667
AF_XDP-interaction: README: Explaning XDP-hints via local BTF info
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 19:45:43 +01:00
Jesper Dangaard Brouer
ae4f6a5846
AF_XDP-interaction: Print XSK queue_id packet was RXed on
...
Now that program process all queues it is relevant to know
what queue_id received the packet.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 18:49:06 +01:00
Jesper Dangaard Brouer
732bd6ec41
AF_XDP-interaction: This example bind to all queues
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 18:07:09 +01:00
Jesper Dangaard Brouer
0f08e825bd
AF_XDP-interaction: README update AF_XDP documentation section
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 17:44:27 +01:00
Jesper Dangaard Brouer
f5833725cc
AF_XDP-interaction: Fix xsk_bind_flags options
...
This allows enabling another AF_XDP mode e.g. --zero-copy.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 17:12:29 +01:00
Jesper Dangaard Brouer
37f00015b6
AF_XDP-interaction: Cleanups
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 17:10:34 +01:00
Jesper Dangaard Brouer
a80aab5ae7
AF_XDP-interaction: Allocate more frame when we have more queues
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 16:29:38 +01:00
Jesper Dangaard Brouer
e558ab94e2
Make simple mem_frame_allocator more dynamic
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 16:07:35 +01:00
Jesper Dangaard Brouer
34dd6fc6c4
AF_XDP-interaction: Refactor a bit
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 15:53:56 +01:00
Jesper Dangaard Brouer
ca9ef962de
AF_XDP-interaction: Update ethtool_utils
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 15:24:31 +01:00
Jesper Dangaard Brouer
9bca7ea4ff
AF_XDP-interaction: Implement ethtool_get_max_queues
...
Need to get configured queues on the NIC device
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 13:03:38 +01:00
Jesper Dangaard Brouer
9c3a6a7a9d
AF_XDP-interaction: Default to AF_XDP copy mode
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-16 12:10:04 +01:00
Jesper Dangaard Brouer
8806cf2264
AF_XDP-interaction: refactor FQ+CQ per xsk_socket_info
...
Cannot share/associate the FQ (Fill Queue) and CQ (Completion Q) with
umem container (xsk_umem_info). This is the reason current program
cannot handle packets for each queue ID.
As described in [1] we need more FQ and CQ ring pairs, a pair per for each
unique netdev and queue IP tuple.
Thus, add FQ and CQ for each queue id in struct xsk_socket_info.
[1] https://www.kernel.org/doc/html/latest/networking/af_xdp.html
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-15 12:54:22 +01:00
Jesper Dangaard Brouer
529256b00c
Mannally insert XSK FDs into xsks_map
...
Do like enter_xsks_into_map() in kernels xdpsock_user.c
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 22:19:45 +01:00
Jesper Dangaard Brouer
062b5d96fb
AF_XDP-interaction: call handle_receive_packets on all XSKs
...
Strangely multiple RX-queues still doesn't work
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 22:03:13 +01:00
Jesper Dangaard Brouer
e0b044085c
AF_XDP-interaction: Processing multiple XSKs doesn't work
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 20:52:23 +01:00
Jesper Dangaard Brouer
cf47f471aa
AF_XDP-interaction: Handle queue id per xsk socket
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 19:15:25 +01:00
Jesper Dangaard Brouer
acf251c8bc
AF_XDP-interaction: Introduce xsk_container for multiple XSK sockets
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 18:53:41 +01:00
Jesper Dangaard Brouer
7150416ccf
AF_XDP-interaction: Split out memory allocator for umem frames
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 15:44:12 +01:00
Jesper Dangaard Brouer
d1d57c1dfc
AF_XDP-interaction: Prepare for multiple XSK sockets
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2021-11-12 13:23:29 +01:00