samples/bpf: xdpsock app enhancements#2348
samples/bpf: xdpsock app enhancements#2348kernel-patches-bot wants to merge 8 commits intobpf-nextfrom
Conversation
|
Master branch: 1705c62 |
|
Master branch: 35580f9 |
46b5e4e to
be6bd83
Compare
|
Master branch: 35580f9 |
be6bd83 to
89bd337
Compare
|
Master branch: 63d000c |
89bd337 to
995ddd6
Compare
|
Master branch: 11f9983 |
995ddd6 to
740de63
Compare
11f9983 to
9e6b19a
Compare
|
Master branch: 9e6b19a |
740de63 to
ab527b3
Compare
|
Master branch: e63a023 |
ab527b3 to
aea31e2
Compare
|
Master branch: 5e22dd1 |
aea31e2 to
c6308b9
Compare
|
Master branch: 218d747 |
c6308b9 to
62e11b3
Compare
|
Master branch: ca796fe |
62e11b3 to
b5d7574
Compare
|
Master branch: ca796fe |
b5d7574 to
f3f387c
Compare
|
Master branch: 58d8a3f |
f3f387c to
aff7f5f
Compare
|
Master branch: a5bebc4 |
aff7f5f to
a58bbc5
Compare
|
Master branch: 2847993 |
a58bbc5 to
55c7303
Compare
|
Master branch: 2847993 |
55c7303 to
9a77d41
Compare
|
Master branch: 7218c28 |
9a77d41 to
1e57acc
Compare
|
Master branch: 51a33c6 |
1e57acc to
fd61adf
Compare
In multi-queue environment testing, the support for VLAN-tag based steering is useful. So, this patch adds the capability to add VLAN tag (VLAN ID and Priority) to the generated Tx frame. To set the VLAN ID=10 and Priority=2 for Tx only through TxQ=3: $ xdpsock -i eth0 -t -N -z -q 3 -V -J 10 -K 2 If VLAN ID (-J) and Priority (-K) is set, it default to VLAN ID = 1 VLAN Priority = 0. For example, VLAN-tagged Tx only, xdp copy mode through TxQ=1: $ xdpsock -i eth0 -t -N -c -q 1 -V Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
To set Dest MAC address (-G|--tx-dmac) only: $ xdpsock -i eth0 -t -N -z -G aa:bb:cc:dd:ee:ff To set Source MAC address (-H|--tx-smac) only: $ xdpsock -i eth0 -t -N -z -H 11:22:33:44:55:66 To set both Dest and Source MAC address: $ xdpsock -i eth0 -t -N -z -G aa:bb:cc:dd:ee:ff \ -H 11:22:33:44:55:66 The default Dest and Source MAC address remain the same as before. Acked-by: Song Liu <songliubraving@fb.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
User specifies the clock selection by using -w CLOCK or --clock=CLOCK where CLOCK=[REALTIME, TAI, BOOTTIME, MONOTONIC]. The default CLOCK selection is MONOTONIC. The implementation of clock selection parsing is borrowed from iproute2/tc/q_taprio.c Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Tx cycle time is in micro-seconds unit. By combining the batch size (-b M)
and Tx cycle time (-T|--tx-cycle N), xdpsock now can transmit batch-size of
packets every N-us periodically. Cyclic TX operation is not applicable if
--poll mode is used.
To transmit 16 packets every 1ms cycle time for total of 100000 packets
silently:
$ xdpsock -i eth0 -T -N -z -T 1000 -b 16 -C 100000
To print cyclic TX schedule variance stats, use --app-stats|-a:
$ xdpsock -i eth0 -T -N -z -T 1000 -b 16 -C 100000 -a
sock0@eth0:0 txonly xdp-drv
pps pkts 0.00
rx 0 0
tx 0 100000
calls/s count
rx empty polls 0 0
fill fail polls 0 0
copy tx sendtos 0 0
tx wakeup sendtos 0 6254
opt polls 0 0
period min ave max cycle
Cyclic TX 1000000 53507 75334 712642 6250
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
|
Master branch: 5f60826 |
By default, TX schedule policy is SCHED_OTHER (round-robin time-sharing).
To improve TX cyclic scheduling, we add SCHED_FIFO policy and its priority
by using -W FIFO or --policy=FIFO and -U <PRIO> or --schpri=<PRIO>.
A) From xdpsock --app-stats, for SCHED_OTHER policy:
$ xdpsock -i eth0 -t -N -z -T 1000 -b 16 -C 100000 -a
period min ave max cycle
Cyclic TX 1000000 53507 75334 712642 6250
B) For SCHED_FIFO policy and schpri=50:
$ xdpsock -i eth0 -t -N -z -T 1000 -b 16 -C 100000 -a -W FIFO -U 50
period min ave max cycle
Cyclic TX 1000000 3699 24859 54397 6250
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
When user sets tx-pkt-count and in case where there are invalid Tx frame, the complete_tx_only_all() process polls indefinitely. So, this patch adds a time-out mechanism into the process so that the application can terminate automatically after it retries 3*polling interval duration. v1->v2: Thanks to Jesper's and Song Liu's suggestion. - clean-up git message to remove polling log - make the Tx time-out retries configurable with 1s granularity Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
It may be useful to add timestamp for Tx packets for continuous or cyclic transmit operation. The timestamp and sequence ID of a Tx packet are stored according to pktgen header format. To enable per-packet timestamp, use -y|--tstamp option. If timestamp is off, pktgen header is not included in the UDP payload. This means receiving side can use the magic number for pktgen for differentiation. The implementation supports both VLAN tagged and untagged option. By default, the minimum packet size is set at 64B. However, if VLAN tagged is on (-V), the minimum packet size is increased to 66B just so to fit the pktgen_hdr size. Added hex_dump() into the code path just for future cross-checking. As before, simply change to "#define DEBUG_HEXDUMP 1" to inspect the accuracy of TX packet. Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
fd61adf to
d052c68
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=601963 irrelevant now. Closing PR. |
Pull request for series with
subject: samples/bpf: xdpsock app enhancements
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=601963