Merge branch 'bpf-xsk-sh-umem'
Tushar Vyavahare says:
====================
Implement a test for the SHARED_UMEM feature in this patch set and make
necessary changes/improvements. Ensure that the framework now supports
different streams for different sockets.
v2->v3:
- Set the sock_num at the end of the while loop.
- Declare xsk at the top of the while loop.
v1->v2:
- Remove generate_mac_addresses() and generate mac addresses based on
the number of sockets in __test_spec_init() function. [Magnus]
- Update Makefile to include find_bit.c for compiling xskxceiver.
- Add bitmap_full() function to verify all bits are set to break the
while loop in the receive_pkts() and send_pkts() functions.
- Replace __test_and_set_bit() function with __set_bit() function.
- Add single return check for wait_for_tx_completion() function call.
Patch series summary:
1: Move the packet stream from the ifobject struct to the xsk_socket_info
struct to enable the use of different streams for different sockets
This will facilitate the sending and receiving of data from multiple
sockets simultaneously using the SHARED_XDP_UMEM feature.
It gives flexibility of send/recive individual traffic on particular
socket.
2: Rename the header file to a generic name so that it can be used by all
future XDP programs.
3: Move the src_mac and dst_mac fields from the ifobject structure to the
xsk_socket_info structure to achieve per-socket MAC address assignment.
Require this in order to steer traffic to various sockets in subsequent
patches.
4: Improve the receive_pkt() function to enable it to receive packets from
multiple sockets. Define a sock_num variable to iterate through all the
sockets in the Rx path. Add nb_valid_entries to check that all the
expected number of packets are received.
5: The pkt_set() function no longer needs the umem parameter. This commit
removes the umem parameter from the pkt_set() function.
6: Iterate over all the sockets in the send pkts function. Update
send_pkts() to handle multiple sockets for sending packets. Multiple TX
sockets are utilized alternately based on the batch size for improve
packet transmission.
7: Modify xsk_update_xskmap() to accept the index as an argument, enabling
the addition of multiple sockets to xskmap.
8: Add a new test for testing shared umem feature. This is accomplished by
adding a new XDP program and using the multiple sockets. The new XDP
program redirects the packets based on the destination MAC address.
====================
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Showing
This diff is collapsed.
Please register or sign in to comment