Commit c383826
virtio_net: fix alignment for virtio_net_hdr_v1_hash
Changing alignment of header would mean it's no longer safe to cast a
2 byte aligned pointer between formats. Use two 16 bit fields to make
it 2 byte aligned as previously.
This fixes the performance regression since
commit ("virtio_net: enable gso over UDP tunnel support.") as it uses
virtio_net_hdr_v1_hash_tunnel which embeds
virtio_net_hdr_v1_hash. Pktgen in guest + XDP_DROP on TAP + vhost_net
shows the TX PPS is recovered from 2.4Mpps to 4.45Mpps.
Fixes: 56a06bd ("virtio_net: enable gso over UDP tunnel support.")
Cc: [email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Tested-by: Lei Yang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent e120f46 commit c383826
File tree
3 files changed
+17
-4
lines changed- drivers/net
- include
- linux
- uapi/linux
3 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2539 | 2539 | | |
2540 | 2540 | | |
2541 | 2541 | | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
2542 | 2549 | | |
2543 | 2550 | | |
2544 | 2551 | | |
| |||
2565 | 2572 | | |
2566 | 2573 | | |
2567 | 2574 | | |
2568 | | - | |
| 2575 | + | |
2569 | 2576 | | |
2570 | 2577 | | |
2571 | 2578 | | |
| |||
3311 | 3318 | | |
3312 | 3319 | | |
3313 | 3320 | | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
3314 | 3325 | | |
3315 | 3326 | | |
3316 | 3327 | | |
| |||
6750 | 6761 | | |
6751 | 6762 | | |
6752 | 6763 | | |
6753 | | - | |
| 6764 | + | |
6754 | 6765 | | |
6755 | 6766 | | |
6756 | 6767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
0 commit comments