From: Magnus Karlsson <magnus.karlsson@gmail.com>
To: Tushar Vyavahare <tushar.vyavahare@intel.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, bjorn@kernel.org,
magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
jonathan.lemon@gmail.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net,
tirthendu.sarkar@intel.com
Subject: Re: [PATCH bpf-next v2 0/8] Add a test for SHARED_UMEM feature
Date: Wed, 27 Sep 2023 10:14:14 +0200 [thread overview]
Message-ID: <CAJ8uoz0o1Are-qFZzsxuNhjZM4MREZLTPNJwToYhciiWuEuChA@mail.gmail.com> (raw)
In-Reply-To: <20230925102249.1847195-1-tushar.vyavahare@intel.com>
On Mon, 25 Sept 2023 at 12:01, Tushar Vyavahare
<tushar.vyavahare@intel.com> wrote:
>
> 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.
>
> 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.
Just two things to fix in patch #4. Please send a v3 and then you have
my ack for the set. Thank you!
> 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.
>
> Tushar Vyavahare (8):
> selftests/xsk: move pkt_stream to the xsk_socket_info
> selftests/xsk: rename xsk_xdp_metadata.h to xsk_xdp_common.h
> selftests/xsk: move src_mac and dst_mac to the xsk_socket_info
> selftests/xsk: iterate over all the sockets in the receive pkts
> function
> selftests/xsk: remove unnecessary parameter from pkt_set() function
> call
> selftests/xsk: iterate over all the sockets in the send pkts function
> selftests/xsk: modify xsk_update_xskmap() to accept the index as an
> argument
> selftests/xsk: add a test for shared umem feature
>
> tools/testing/selftests/bpf/Makefile | 4 +-
> .../selftests/bpf/progs/xsk_xdp_progs.c | 22 +-
> tools/testing/selftests/bpf/xsk.c | 3 +-
> tools/testing/selftests/bpf/xsk.h | 2 +-
> tools/testing/selftests/bpf/xsk_xdp_common.h | 12 +
> .../testing/selftests/bpf/xsk_xdp_metadata.h | 5 -
> tools/testing/selftests/bpf/xskxceiver.c | 513 +++++++++++-------
> tools/testing/selftests/bpf/xskxceiver.h | 13 +-
> 8 files changed, 363 insertions(+), 211 deletions(-)
> create mode 100644 tools/testing/selftests/bpf/xsk_xdp_common.h
> delete mode 100644 tools/testing/selftests/bpf/xsk_xdp_metadata.h
>
> --
> 2.34.1
>
>
prev parent reply other threads:[~2023-09-27 8:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 10:22 [PATCH bpf-next v2 0/8] Add a test for SHARED_UMEM feature Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 1/8] selftests/xsk: move pkt_stream to the xsk_socket_info Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 2/8] selftests/xsk: rename xsk_xdp_metadata.h to xsk_xdp_common.h Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 3/8] selftests/xsk: move src_mac and dst_mac to the xsk_socket_info Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 4/8] selftests/xsk: iterate over all the sockets in the receive pkts function Tushar Vyavahare
2023-09-27 8:11 ` Magnus Karlsson
2023-09-27 10:27 ` Vyavahare, Tushar
2023-09-25 10:22 ` [PATCH bpf-next v2 5/8] selftests/xsk: remove unnecessary parameter from pkt_set() function call Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 6/8] selftests/xsk: iterate over all the sockets in the send pkts function Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 7/8] selftests/xsk: modify xsk_update_xskmap() to accept the index as an argument Tushar Vyavahare
2023-09-25 10:22 ` [PATCH bpf-next v2 8/8] selftests/xsk: add a test for shared umem feature Tushar Vyavahare
2023-09-27 8:14 ` Magnus Karlsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ8uoz0o1Are-qFZzsxuNhjZM4MREZLTPNJwToYhciiWuEuChA@mail.gmail.com \
--to=magnus.karlsson@gmail.com \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tirthendu.sarkar@intel.com \
--cc=tushar.vyavahare@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).