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>
The root cause of the slowdown on the first packet with timestamps,
as primary related to refilling the fill-queue, which happend before
process_packet.
Primary cause, as first packet still see a slowdown of around 4 usec
while it was around 9 usec before.
In commit 5df5332f23 ("AF_XDP-interaction: config AF_XDP frame_headroom")
the fill-queue size was increase to be larger. This caused the
first call to handle_receive_packets() to refill too many frames
into the fill-queue.
Patch split out refill into function restock_receive_fill_queue()
which is now called *after* process_packet step, but before
releasing RX packets via xsk_ring_cons__release(&xsk->rx).
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This only works in skb-mode, other modes fail the bpf_xdp_adjust_meta
call and result in XDP_ABORTED. This only occurred on mlx5.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
In-practice only 'xdp_stats_map' definition gets associated BTF,
as it uses the proper '__type' construct.
The AF_XDP map BPF_MAP_TYPE_XSKMAP doesn't know about BTF yet.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Something in fishy as it seems this BPF-object is not getting used.
Use old maps SEC defines until figuring out what is wrong,
but keep new dot-maps defines.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>