Displaying 14 results from an estimated 14 matches for "free_unregister_netdev".
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...free_vqs;
1930 }
1931
1932 virtio_device_ready(vdev);
1933
1934 vi->nb.notifier_call = &virtnet_cpu_callback;
1935 err = register_hotcpu_notifier(&vi->nb);
1936 if (err) {
1937 pr_debug("virtio_net: registering cpu notifier failed\n");
1938 goto free_unregister_netdev;
1939 }
1940
1941 /* Assume link up if device can't report link status,
1942 otherwise get link status from config. */
1943 if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
1944 netif_carrier_off(dev);
1945 schedule_work(&vi->config_work);
1946 } e...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...free_vqs;
1930 }
1931
1932 virtio_device_ready(vdev);
1933
1934 vi->nb.notifier_call = &virtnet_cpu_callback;
1935 err = register_hotcpu_notifier(&vi->nb);
1936 if (err) {
1937 pr_debug("virtio_net: registering cpu notifier failed\n");
1938 goto free_unregister_netdev;
1939 }
1940
1941 /* Assume link up if device can't report link status,
1942 otherwise get link status from config. */
1943 if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
1944 netif_carrier_off(dev);
1945 schedule_work(&vi->config_work);
1946 } e...
2016 Nov 25
7
[PATCH net-next] virtio-net: enable multiqueue by default
...rs)
+ vi->curr_queue_pairs = max_queue_pairs;
+ else
+ vi->curr_queue_pairs = num_online_cpus();
vi->max_queue_pairs = max_queue_pairs;
/* Allocate/initialize the rx/tx queues, and invoke find_vqs */
@@ -1918,6 +1921,8 @@ static int virtnet_probe(struct virtio_device *vdev)
goto free_unregister_netdev;
}
+ virtnet_set_affinity(vi);
+
/* Assume link up if device can't report link status,
otherwise get link status from config. */
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
--
2.7.4
2016 Nov 25
7
[PATCH net-next] virtio-net: enable multiqueue by default
...rs)
+ vi->curr_queue_pairs = max_queue_pairs;
+ else
+ vi->curr_queue_pairs = num_online_cpus();
vi->max_queue_pairs = max_queue_pairs;
/* Allocate/initialize the rx/tx queues, and invoke find_vqs */
@@ -1918,6 +1921,8 @@ static int virtnet_probe(struct virtio_device *vdev)
goto free_unregister_netdev;
}
+ virtnet_set_affinity(vi);
+
/* Assume link up if device can't report link status,
otherwise get link status from config. */
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
--
2.7.4
2016 Dec 13
2
[PATCH net] virtio-net: correctly enable multiqueue
...c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b425fa1..fe9f772 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1930,7 +1930,9 @@ static int virtnet_probe(struct virtio_device *vdev)
goto free_unregister_netdev;
}
- virtnet_set_affinity(vi);
+ rtnl_lock();
+ virtnet_set_queues(vi, vi->curr_queue_pairs);
+ rtnl_unlock();
/* Assume link up if device can't report link status,
otherwise get link status from config. */
--
2.7.4
2016 Dec 13
2
[PATCH net] virtio-net: correctly enable multiqueue
...c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b425fa1..fe9f772 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1930,7 +1930,9 @@ static int virtnet_probe(struct virtio_device *vdev)
goto free_unregister_netdev;
}
- virtnet_set_affinity(vi);
+ rtnl_lock();
+ virtnet_set_queues(vi, vi->curr_queue_pairs);
+ rtnl_unlock();
/* Assume link up if device can't report link status,
otherwise get link status from config. */
--
2.7.4
2023 Jan 27
1
[PATCH v2 1/1] virtio_net: notify MAC address change on device initialization
...d using the random mac address),
> it's why I didn't check for it.
But the spec did not say there's a dependency :(.
My point is what should we do if there's F_STANDBY but no MAC?
Maybe add a separate patch clearing F_STANDBY in this case?
> >
> >
> > > free_unregister_netdev:
> > > --
> > > 2.39.0
> >
>
> Thanks,
> Laurent
2016 Nov 25
0
[PATCH net-next] virtio-net: enable multiqueue by default
...x_queue_pairs;
> + else
> + vi->curr_queue_pairs = num_online_cpus();
> vi->max_queue_pairs = max_queue_pairs;
>
> /* Allocate/initialize the rx/tx queues, and invoke find_vqs */
> @@ -1918,6 +1921,8 @@ static int virtnet_probe(struct virtio_device *vdev)
> goto free_unregister_netdev;
> }
>
> + virtnet_set_affinity(vi);
> +
> /* Assume link up if device can't report link status,
> otherwise get link status from config. */
> if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
> --
> 2.7.4
2023 Jan 23
1
[PATCH v2 0/1] virtio_net: vdpa: update MAC address when it is generated by virtio-net
When the MAC address is not provided by the vdpa device virtio_net
driver assigns a random one without notifying the device.
The consequence, in the case of mlx5_vdpa, is the internal routing
tables of the device are not updated and this can block the
communication between two namespaces.
To fix this problem, use virtnet_send_command(VIRTIO_NET_CTRL_MAC)
to set the address from virtnet_probe()
2016 Jun 02
7
[PATCH -next 0/2] virtio-net: Advised MTU feature
The following series adds the ability for a hypervisor to set an MTU on the
guest during feature negotiation phase. This is useful for VM orchestration
when, for instance, tunneling is involved and the MTU of the various systems
should be homogenous.
The first patch adds the feature bit as described in the proposed VFIO spec
addition found at
2016 Jun 02
7
[PATCH -next 0/2] virtio-net: Advised MTU feature
The following series adds the ability for a hypervisor to set an MTU on the
guest during feature negotiation phase. This is useful for VM orchestration
when, for instance, tunneling is involved and the MTU of the various systems
should be homogenous.
The first patch adds the feature bit as described in the proposed VFIO spec
addition found at
2023 Jan 27
2
[PATCH v3 0/2] virtio_net: vdpa: update MAC address when it is generated by virtio-net
When the MAC address is not provided by the vdpa device virtio_net
driver assigns a random one without notifying the device.
The consequence, in the case of mlx5_vdpa, is the internal routing
tables of the device are not updated and this can block the
communication between two namespaces.
To fix this problem, use virtnet_send_command(VIRTIO_NET_CTRL_MAC)
to set the address from virtnet_probe()
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...probe(struct virtio_device *vdev)
virtio_device_ready(vdev);
- vi->nb.notifier_call = &virtnet_cpu_callback;
- err = register_hotcpu_notifier(&vi->nb);
+ err = virtnet_cpu_notif_add(vi);
if (err) {
pr_debug("virtio_net: registering cpu notifier failed\n");
goto free_unregister_netdev;
@@ -1934,7 +1962,7 @@ static void virtnet_remove(struct virtio_device *vdev)
{
struct virtnet_info *vi = vdev->priv;
- unregister_hotcpu_notifier(&vi->nb);
+ virtnet_cpu_notif_remove(vi);
/* Make sure no work handler is accessing the device. */
flush_work(&vi->config_wo...
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...probe(struct virtio_device *vdev)
virtio_device_ready(vdev);
- vi->nb.notifier_call = &virtnet_cpu_callback;
- err = register_hotcpu_notifier(&vi->nb);
+ err = virtnet_cpu_notif_add(vi);
if (err) {
pr_debug("virtio_net: registering cpu notifier failed\n");
goto free_unregister_netdev;
@@ -1934,7 +1962,7 @@ static void virtnet_remove(struct virtio_device *vdev)
{
struct virtnet_info *vi = vdev->priv;
- unregister_hotcpu_notifier(&vi->nb);
+ virtnet_cpu_notif_remove(vi);
/* Make sure no work handler is accessing the device. */
flush_work(&vi->config_wo...