diff options
author | Philo Lu <lulie@linux.alibaba.com> | 2024-11-04 11:57:03 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-11-07 14:40:10 +0300 |
commit | 86a48a00efdf61197b6658e52c6140463eb313dc (patch) | |
tree | aff2e1830c3d96cfd47649d17e73110b46aa00b7 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 25d70702142ac2115e75e01a0a985c6ea1d78033 (diff) | |
download | linux-86a48a00efdf61197b6658e52c6140463eb313dc.tar.xz |
virtio_net: Support dynamic rss indirection table size
When reading/writing virtio_net_ctrl_rss, we get the indirection table
size from vi->rss_indir_table_size, which is initialized in
virtnet_probe(). However, the actual size of indirection_table was set
as VIRTIO_NET_RSS_MAX_TABLE_LEN=128. This collision may cause issues if
the vi->rss_indir_table_size exceeds 128.
This patch instead uses dynamic indirection table, allocated with
vi->rss after vi->rss_indir_table_size initialized. And free it in
virtnet_remove().
In virtnet_commit_rss_command(), sgs for rss is initialized differently
with hash_report. So indirection_table is not used if !vi->has_rss, and
then we don't need to alloc indirection_table for hash_report only uses.
Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Joe Damato <jdamato@fastly.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions