All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ong Boon Leong <boon.leong.ong@intel.com>
To: bpf@vger.kernel.org, netdev@vger.kernel.org
Cc: bjorn@kernel.org, Magnus Karlsson <magnus.karlsson@intel.com>,
	Jonathan Lemon <jonathan.lemon@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, KP Singh <kpsingh@kernel.org>,
	Ong Boon Leong <boon.leong.ong@intel.com>
Subject: [PATCH bpf-next 0/4] samples/bpf: xdpsock app enhancements
Date: Wed, 24 Nov 2021 17:18:17 +0800	[thread overview]
Message-ID: <20211124091821.3916046-1-boon.leong.ong@intel.com> (raw)

This patch series adds below capabilities to xdpsock app:-

1/4: Add VLAN tag (ID & Priority) to the generated Tx-Only frames.
2/4: Add DMAC and SMAC setting to the generated Tx-Only frames.
     If parameters are not set, the previous DMAC and SMAC are used.
3/4: Add cyclic transmission (cycle-time) setting for Tx-only operation.
     This option can be used together with batch size and packet count.
4/4: Add time-out with retries to Tx complete cleaning process to prevent
     unsuccessful XDP Transmission from causing the Tx cleaning process
     from polling indefinitely.

With above enhancements to xdpsock, we can know run concurrent VLAN-tagged
XDP TX streams in periodic Tx with batch size fashion.

For examples:
 DMAC (-G)             = fa:8d:f1:e2:0b:e8
 SMAC (-H)             = ce:17:07:17:3e:3a
 VLAN ID (-J)          = 1
 VLAN Pri (-K)         = 1-3
 Tx Queue (-q)         = 1-3
 Cycle Time in us (-T) = 1000
 Batch (-b)            = 16
 Packet Count          = 1000000

Sending Board
=============
Terminal-1:
 $ xdpsock -i enp0s29f1 -t -N -z -H ce:17:07:17:3e:3a -G fa:8d:f1:e2:0b:e8 -V -J 1 -K 1 -q 1 -T 1000 -b 16 -C 1000000 -x

Terminal-2:
 $ xdpsock -i enp0s29f1 -t -N -z -H ce:17:07:17:3e:3a -G fa:8d:f1:e2:0b:e8 -V -J 1 -K 2 -q 2 -T 1000 -b 16 -C 1000000 -x

Terminal-3:
 $ xdpsock -i enp0s29f1 -t -N -z -H ce:17:07:17:3e:3a -G fa:8d:f1:e2:0b:e8 -V -J 1 -K 3 -q 3 -T 1000 -b 16 -C 1000000 -x

Receiving Board
===============
Terminal-1:
 $ xdpsock -i enp0s29f1 -r -N -z -q 1

Terminal-2:
 $ xdpsock -i enp0s29f1 -r -N -z -q 2

Terminal-3:
 $ xdpsock -i enp0s29f1 -r -N -z -q 3

Thanks

Ong Boon Leong (4):
  samples/bpf: xdpsock: add VLAN support for Tx-only operation
  samples/bpf: xdpsock: add Dest and Src MAC setting for Tx-only
    operation
  samples/bpf: xdpsock: add period cycle time to Tx operation
  samples/bpf: xdpsock: add time-out for cleaning Tx

 samples/bpf/xdpsock_user.c | 154 ++++++++++++++++++++++++++++++++-----
 1 file changed, 134 insertions(+), 20 deletions(-)

-- 
2.25.1


             reply	other threads:[~2021-11-24  9:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  9:18 Ong Boon Leong [this message]
2021-11-24  9:18 ` [PATCH bpf-next 1/4] samples/bpf: xdpsock: add VLAN support for Tx-only operation Ong Boon Leong
2021-11-27  6:48   ` Song Liu
2021-11-24  9:18 ` [PATCH bpf-next 2/4] samples/bpf: xdpsock: add Dest and Src MAC setting " Ong Boon Leong
2021-11-27  6:40   ` Song Liu
2021-11-27  9:51   ` Jesper Dangaard Brouer
2021-11-24  9:18 ` [PATCH bpf-next 3/4] samples/bpf: xdpsock: add period cycle time to Tx operation Ong Boon Leong
2021-11-27  6:52   ` Song Liu
2021-11-27 10:41   ` Jesper Dangaard Brouer
2021-11-24  9:18 ` [PATCH bpf-next 4/4] samples/bpf: xdpsock: add time-out for cleaning Tx Ong Boon Leong
2021-11-27  6:45   ` Song Liu
2021-11-29  1:14     ` Ong, Boon Leong
2021-11-27  9:48   ` Jesper Dangaard Brouer
2021-11-29  1:17     ` Ong, Boon Leong

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=20211124091821.3916046-1-boon.leong.ong@intel.com \
    --to=boon.leong.ong@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.