Skip to content

samples/bpf: xdpsock app enhancements - #2197

Closed
kernel-patches-bot wants to merge 5 commits into
bpf-nextfrom
series/585069=>bpf-next
Closed

kernel-patches-bot wants to merge 5 commits into
bpf-nextfrom
series/585069=>bpf-next

Conversation

@kernel-patches-bot

Copy link
Copy Markdown

Pull request for series with
subject: samples/bpf: xdpsock app enhancements
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

Nobody and others added 5 commits December 2, 2021 15:31
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

Signed-off-by: Ong Boon Leong <[email protected]>
Acked-by: Song Liu <[email protected]>
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.

Signed-off-by: Ong Boon Leong <[email protected]>
Acked-by: Song Liu <[email protected]>
Acked-by: Jesper Dangaard Brouer <[email protected]>
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.

For example to transmit 1 packet each 1ms cycle time for total of 2000000
packets:

 $ xdpsock -i eth0 -T -N -z -T 1000 -b 1 -C 2000000

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 1000           1996872

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 1000           1997872

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 1000           1998872

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 1000           1999872

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 128            2000000

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           0.00
rx                 0              0
tx                 0              2000000

Signed-off-by: Ong Boon Leong <[email protected]>
Acked-by: Song Liu <[email protected]>
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.

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 136383         1000000
rx dropped         0              0
rx invalid         0              0
tx invalid         35             245
rx queue full      0              0
fill ring empty    0              1
tx ring empty      957            7011

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 0              1000000
rx dropped         0              0
rx invalid         0              0
tx invalid         0              245
rx queue full      0              0
fill ring empty    0              1
tx ring empty      1              7012

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 0              1000000
rx dropped         0              0
rx invalid         0              0
tx invalid         0              245
rx queue full      0              0
fill ring empty    0              1
tx ring empty      1              7013

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 0              1000000
rx dropped         0              0
rx invalid         0              0
tx invalid         0              245
rx queue full      0              0
fill ring empty    0              1
tx ring empty      1              7014

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           1.00
rx                 0              0
tx                 0              1000000
rx dropped         0              0
rx invalid         0              0
tx invalid         0              245
rx queue full      0              0
fill ring empty    0              1
tx ring empty      0              7014

 sock0@enp0s29f1:2 txonly xdp-drv
                   pps            pkts           0.00
rx                 0              0
tx                 0              1000000
rx dropped         0              0
rx invalid         0              0
tx invalid         0              245
rx queue full      0              0
fill ring empty    0              1
tx ring empty      0              7014

Signed-off-by: Ong Boon Leong <[email protected]>
@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot

Copy link
Copy Markdown
Author

@kernel-patches-bot
kernel-patches-bot deleted the series/585069=>bpf-next branch December 6, 2021 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants