if 'combined-count' in channels:
+if channels['combined-count'] == 0:
+rx_type = 'rx'
+else:
+rx_type = 'combined'
else:
-rx_type = 'combined'
+rx_type = 'rx'
expected = curr_queues - 1
cmd(f"ethtool -L {cfg.dev['ifname']} {rx_type} {expected}", timeout=10)
base-commit: bc50682128bde778a1ddc457a02d92a637c20c6f
Reviewed-by: Gerhard Engleder
ted by Jason Wang.
drivers/net/virtio_net.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index c120cb2106c0..e0752a856adf 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -6411,8 +6411,9 @@ static int virtnet_alloc_queues(struct virtnet_info *vi)
INIT_DELAYED_WORK(&vi->refill, refill_work);
for (i = 0; i < vi->max_queue_pairs; i++) {
vi->rq[i].pages = NULL;
- netif_napi_add_weight(vi->dev, &vi->rq[i].napi, virtnet_poll,
- napi_weight);
+ netif_napi_add_config(vi->dev, &vi->rq[i].napi, virtnet_poll,
+ i);
+ vi->rq[i].napi.weight = napi_weight;
netif_napi_add_tx_weight(vi->dev, &vi->sq[i].napi,
virtnet_poll_tx,
napi_tx ? napi_weight : 0);
Reviewed-by: Gerhard Engleder
;},
{'id': 1, 'ifindex': 2, 'type': 'tx'},
{'id': 2, 'ifindex': 2, 'type': 'tx'},
{'id': 3, 'ifindex': 2, 'type': 'tx'}]
Note that virtio_net has TX-only NAPIs which do not hav
On 16.01.25 17:09, Joe Damato wrote:
On Thu, Jan 16, 2025 at 03:53:14PM +0800, Xuan Zhuo wrote:
On Thu, 16 Jan 2025 05:52:58 +, Joe Damato wrote:
Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
can be accessed by user apps.
$ ethtool -i ens4 | grep driver
driver: vi
_struct *napi)
Reviewed-by: Gerhard Engleder
virtnet_cancel_dim(vi, &rq->dim);
}
@@ -5943,6 +5964,8 @@ static int virtnet_xdp_set(struct net_device *dev, struct
bpf_prog *prog,
/* Make sure NAPI is not using any XDP TX queues for RX. */
if (netif_running(dev)) {
for (i = 0; i < vi->max_queue_pairs; i++) {
+ netif_queue_set_napi(vi->dev, i, NETDEV_QUEUE_TYPE_RX,
+NULL);
napi_disable(&vi->rq[i].napi);
virtnet_napi_tx_disable(&vi->sq[i].napi);
}
Reviewed-by: Gerhard Engleder
int virtnet_restore_up(struct virtio_device *vdev)
enable_rx_mode_work(vi);
if (netif_running(vi->dev)) {
+ rtnl_lock();
err = virtnet_open(vi->dev);
+ rtnl_unlock();
if (err)
return err;
}
Reviewed-by: Gerhard Engleder
7 matches
Mail list logo