Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples/bpf: xdpsock app enhancements #2197

Closed
wants to merge 5 commits into from

Conversation

kernel-patches-bot
Copy link

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
Author

Master branch: fa721d4
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: e4f7ac9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 2fe256a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 8f6f41f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: e32cb12
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: da61e9e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 43174f0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 43174f0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: c291d0a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: c291d0a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: b98057e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: e30c8fd
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 436d404
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 64b5b97
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: eee9a6d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 8b4ff5f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

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 <boon.leong.ong@intel.com>
Acked-by: Song Liu <songliubraving@fb.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.

Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.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.

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 <boon.leong.ong@intel.com>
Acked-by: Song Liu <songliubraving@fb.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.

 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 <boon.leong.ong@intel.com>
@kernel-patches-bot
Copy link
Author

Master branch: 080a70b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=585069
version: 1

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=585069 expired. Closing PR.

@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