Commit b4e5f04
virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN
rss_max_key_size in the virtio spec is the maximum key size supported by
the device, not a mandatory size the driver must use. Also the value 40
is a spec minimum, not a spec maximum.
The current code rejects RSS and can fail probe when the device reports a
larger rss_max_key_size than the driver buffer limit. Instead, clamp the
effective key length to min(device rss_max_key_size, NETDEV_RSS_KEY_LEN)
and keep RSS enabled.
This keeps probe working on devices that advertise larger maximum key sizes
while respecting the netdev RSS key buffer size limit.
Fixes: 3f7d9c1 ("virtio_net: Add hash_key_length check")
Cc: [email protected]
Signed-off-by: Srujana Challa <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent d64cb81 commit b4e5f04
1 file changed
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
385 | | - | |
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
| |||
486 | 484 | | |
487 | 485 | | |
488 | 486 | | |
489 | | - | |
| 487 | + | |
490 | 488 | | |
491 | 489 | | |
492 | 490 | | |
| |||
6708 | 6706 | | |
6709 | 6707 | | |
6710 | 6708 | | |
| 6709 | + | |
6711 | 6710 | | |
6712 | 6711 | | |
6713 | 6712 | | |
| |||
6842 | 6841 | | |
6843 | 6842 | | |
6844 | 6843 | | |
6845 | | - | |
6846 | | - | |
6847 | | - | |
6848 | | - | |
6849 | | - | |
6850 | | - | |
6851 | | - | |
6852 | | - | |
| 6844 | + | |
| 6845 | + | |
| 6846 | + | |
| 6847 | + | |
| 6848 | + | |
| 6849 | + | |
| 6850 | + | |
6853 | 6851 | | |
6854 | 6852 | | |
6855 | 6853 | | |
| |||
0 commit comments