You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a similar setup where I follow the same aproach like in [advanced03-AF_XDP] . I give the frames through the fill queue where lets say that the frames offsets(addr) are something like 0 2048 4096 and so on. When I get back the frames like via handle_receive_packets the addr that I get is shifted by 256 (0+256 2048+256 4096+256) . From what I read there is 256 XDP_HEADROOM but if I look in the memory it seems empty. My main question is it correct also in advanced03-AF_XDP the fact that when xsk_free_umem_frame(xsk, addr); is done to give back the frame it is done with the extra offset of 256 ?
Anyone else experienced this and can advise a bit on what is the proper way to handle this case?
The text was updated successfully, but these errors were encountered:
From what I read there is 256 XDP_HEADROOM but if I look in the memory it seems empty
This is designed to give you room as a user to store some extra data (if you want to encapsulate a packet and RX it, you don't need to allocate an extra frame). So it's expected to not hold any useful data at the time of receive.
My main question is it correct also in advanced03-AF_XDP the fact that when xsk_free_umem_frame(xsk, addr); is done to give back the frame it is done with the extra offset of 256?
Looks like so. It's fine, because kernel knows where exactly each frame starts (at the start of the 2048/4096 page) and will adjust the address correspondingly.
I have a similar setup where I follow the same aproach like in [advanced03-AF_XDP] . I give the frames through the fill queue where lets say that the frames offsets(addr) are something like 0 2048 4096 and so on. When I get back the frames like via handle_receive_packets the addr that I get is shifted by 256 (0+256 2048+256 4096+256) . From what I read there is 256 XDP_HEADROOM but if I look in the memory it seems empty. My main question is it correct also in advanced03-AF_XDP the fact that when xsk_free_umem_frame(xsk, addr); is done to give back the frame it is done with the extra offset of 256 ?
Anyone else experienced this and can advise a bit on what is the proper way to handle this case?
The text was updated successfully, but these errors were encountered: