Thread (14 messages) 14 messages, 3 authors, 2021-11-29
STALE1660d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH bpf-next 0/4] samples/bpf: xdpsock app enhancements

From: Ong Boon Leong <hidden>
Date: 2021-11-24 09:21:39
Also in: bpf

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help