Commit 09bff23
committed
Merge: virtio_ring: Fix error reporting in virtqueue_resize
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7101
JIRA: https://issues.redhat.com/browse/RHEL-84199
Enforce minimum TX ring size for reliability
The `tx_may_stop()` logic stops TX queues if free descriptors
(`sq->vq->num_free`) fall below the threshold of (`MAX_SKB_FRAGS` + 2).
If the total ring size (`ring_num`) is not strictly greater than this
value, queues can become persistently stopped or stop after minimal
use, severely degrading performance.
A single sk_buff transmission typically requires descriptors for:
- The virtio_net_hdr (1 descriptor)
- The sk_buff's linear data (head) (1 descriptor)
- Paged fragments (up to MAX_SKB_FRAGS descriptors)
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Approved-by: Eugenio Pérez <eperezma@redhat.com>
Approved-by: Cindy Lu <lulu@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Augusto Caringi <acaringi@redhat.com>2 files changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
805 | | - | |
| 805 | + | |
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
| 813 | + | |
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| |||
2129 | 2129 | | |
2130 | 2130 | | |
2131 | 2131 | | |
2132 | | - | |
| 2132 | + | |
2133 | 2133 | | |
2134 | 2134 | | |
2135 | 2135 | | |
| |||
2250 | 2250 | | |
2251 | 2251 | | |
2252 | 2252 | | |
2253 | | - | |
| 2253 | + | |
2254 | 2254 | | |
2255 | 2255 | | |
2256 | 2256 | | |
| |||
2410 | 2410 | | |
2411 | 2411 | | |
2412 | 2412 | | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2413 | 2419 | | |
2414 | 2420 | | |
2415 | 2421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2724 | 2724 | | |
2725 | 2725 | | |
2726 | 2726 | | |
2727 | | - | |
| 2727 | + | |
2728 | 2728 | | |
2729 | 2729 | | |
2730 | 2730 | | |
| |||
2744 | 2744 | | |
2745 | 2745 | | |
2746 | 2746 | | |
2747 | | - | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2748 | 2752 | | |
2749 | 2753 | | |
2750 | 2754 | | |
| |||
0 commit comments