diff options
| author | Sankararaman Jayaraman <[email protected]> | 2025-01-31 04:23:41 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-02 01:17:32 +0000 |
| commit | 3f1baa91a1fdf3de9dbad4bd615b35fab347874b (patch) | |
| tree | 57ed59ffeb73117062ad8eab119ae26ef7081abe /scripts/rustdoc_test_gen.rs | |
| parent | ice: Add check for devm_kzalloc() (diff) | |
| download | kernel-3f1baa91a1fdf3de9dbad4bd615b35fab347874b.tar.gz kernel-3f1baa91a1fdf3de9dbad4bd615b35fab347874b.zip | |
vmxnet3: Fix tx queue race condition with XDP
If XDP traffic runs on a CPU which is greater than or equal to
the number of the Tx queues of the NIC, then vmxnet3_xdp_get_tq()
always picks up queue 0 for transmission as it uses reciprocal scale
instead of simple modulo operation.
vmxnet3_xdp_xmit() and vmxnet3_xdp_xmit_frame() use the above
returned queue without any locking which can lead to race conditions
when multiple XDP xmits run in parallel on different CPU's.
This patch uses a simple module scheme when the current CPU equals or
exceeds the number of Tx queues on the NIC. It also adds locking in
vmxnet3_xdp_xmit() and vmxnet3_xdp_xmit_frame() functions.
Fixes: 54f00cce1178 ("vmxnet3: Add XDP support.")
Signed-off-by: Sankararaman Jayaraman <[email protected]>
Signed-off-by: Ronak Doshi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_gen.rs')
0 files changed, 0 insertions, 0 deletions
