search for: virtio_net_driver_init

Displaying 20 results from an estimated 40 matches for "virtio_net_driver_init".

2018 Jan 26
1
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...ev); > + case NETDEV_UNREGISTER: > + return virtnet_unregister_vf(event_dev); > + default: > + return NOTIFY_DONE; > + } > +} > + > +static struct notifier_block virtio_netdev_notifier = { > + .notifier_call = virtio_netdev_event, > +}; > + > static __init int virtio_net_driver_init(void) > { > int ret; > @@ -2877,6 +3177,8 @@ static __init int virtio_net_driver_init(void) > ret = register_virtio_driver(&virtio_net_driver); > if (ret) > goto err_virtio; > + > + register_netdevice_notifier(&virtio_netdev_notifier); > return...
2017 Jul 24
2
[PATCH] virtio-net: fix module unloading
...edhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 99a26a9efec1..f41ab0ea942a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2743,9 +2743,9 @@ module_init(virtio_net_driver_init); static __exit void virtio_net_driver_exit(void) { + unregister_virtio_driver(&virtio_net_driver); cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); cpuhp_remove_multi_state(virtionet_online); - unregister_virtio_driver(&virtio_net_driver); } module_exit(virtio_net_driver_exit); -...
2017 Jul 24
2
[PATCH] virtio-net: fix module unloading
...edhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 99a26a9efec1..f41ab0ea942a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2743,9 +2743,9 @@ module_init(virtio_net_driver_init); static __exit void virtio_net_driver_exit(void) { + unregister_virtio_driver(&virtio_net_driver); cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); cpuhp_remove_multi_state(virtionet_online); - unregister_virtio_driver(&virtio_net_driver); } module_exit(virtio_net_driver_exit); -...
2018 Jan 12
7
[RFC PATCH net-next v2 0/2] Enable virtio to act as a backup for a passthru device
This patch series extends virtio_net to take over VF datapath by simulating a transparent bond without creating any additional netdev. I understand that there are some comments suggesting an alternate model that is based on 3 driver model(virtio_net, VF driver, a new driver virt_bond that acts as a master to virtio_net and VF). Would like to get some feedback on the right way to solve the live
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...;curr_queue_pairs); rtnl_unlock(); - err = register_hotcpu_notifier(&vi->nb); + err = virtnet_cpu_notif_add(vi); if (err) return err; @@ -2039,7 +2067,41 @@ static struct virtio_driver virtio_net_driver = { #endif }; -module_virtio_driver(virtio_net_driver); +static __init int virtio_net_driver_init(void) +{ + int ret; + + ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "AP_VIRT_NET_ONLINE", + virtnet_cpu_online, + virtnet_cpu_down_prep); + if (ret < 0) + goto out; + virtionet_online = ret; + ret = cpuhp_setup_state_multi(CPUHP_VIRT_NET_DEAD, "VIRT_NET_D...
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...;curr_queue_pairs); rtnl_unlock(); - err = register_hotcpu_notifier(&vi->nb); + err = virtnet_cpu_notif_add(vi); if (err) return err; @@ -2039,7 +2067,41 @@ static struct virtio_driver virtio_net_driver = { #endif }; -module_virtio_driver(virtio_net_driver); +static __init int virtio_net_driver_init(void) +{ + int ret; + + ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "AP_VIRT_NET_ONLINE", + virtnet_cpu_online, + virtnet_cpu_down_prep); + if (ret < 0) + goto out; + virtionet_online = ret; + ret = cpuhp_setup_state_multi(CPUHP_VIRT_NET_DEAD, "VIRT_NET_D...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...case NETDEV_REGISTER: + return virtnet_register_vf(event_dev); + case NETDEV_UNREGISTER: + return virtnet_unregister_vf(event_dev); + default: + return NOTIFY_DONE; + } +} + +static struct notifier_block virtio_netdev_notifier = { + .notifier_call = virtio_netdev_event, +}; + static __init int virtio_net_driver_init(void) { int ret; @@ -2841,6 +3175,8 @@ static __init int virtio_net_driver_init(void) ret = register_virtio_driver(&virtio_net_driver); if (ret) goto err_virtio; + + register_netdevice_notifier(&virtio_netdev_notifier); return 0; err_virtio: cpuhp_remove_multi_state(CP...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...case NETDEV_REGISTER: + return virtnet_register_vf(event_dev); + case NETDEV_UNREGISTER: + return virtnet_unregister_vf(event_dev); + default: + return NOTIFY_DONE; + } +} + +static struct notifier_block virtio_netdev_notifier = { + .notifier_call = virtio_netdev_event, +}; + static __init int virtio_net_driver_init(void) { int ret; @@ -2841,6 +3175,8 @@ static __init int virtio_net_driver_init(void) ret = register_virtio_driver(&virtio_net_driver); if (ret) goto err_virtio; + + register_netdevice_notifier(&virtio_netdev_notifier); return 0; err_virtio: cpuhp_remove_multi_state(CP...
2015 Mar 12
2
[PATCH net] virtio-net: correctly delete napi hash
...3/0xa0 [<ffffffff814c7a79>] driver_attach+0x19/0x20 [<ffffffff814c76f0>] bus_add_driver+0x170/0x220 [<ffffffffa0a60000>] ? 0xffffffffa0a60000 [<ffffffff814c894f>] driver_register+0x5f/0xf0 [<ffffffff8139e41b>] register_virtio_driver+0x1b/0x30 [<ffffffffa0a60010>] virtio_net_driver_init+0x10/0x12 [virtio_net] This patch fixes this by doing this in virtnet_free_queues(). And also don't delete napi in virtnet_freeze() since it will call virtnet_free_queues() which has already did this. Fixes 91815639d880 ("virtio-net: rx busy polling support") Cc: Rusty Russell <r...
2018 Jan 12
0
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...case NETDEV_REGISTER: + return virtnet_register_vf(event_dev); + case NETDEV_UNREGISTER: + return virtnet_unregister_vf(event_dev); + default: + return NOTIFY_DONE; + } +} + +static struct notifier_block virtio_netdev_notifier = { + .notifier_call = virtio_netdev_event, +}; + static __init int virtio_net_driver_init(void) { int ret; @@ -2877,6 +3177,8 @@ static __init int virtio_net_driver_init(void) ret = register_virtio_driver(&virtio_net_driver); if (ret) goto err_virtio; + + register_netdevice_notifier(&virtio_netdev_notifier); return 0; err_virtio: cpuhp_remove_multi_state(CP...
2015 Mar 12
2
[PATCH net] virtio-net: correctly delete napi hash
...3/0xa0 [<ffffffff814c7a79>] driver_attach+0x19/0x20 [<ffffffff814c76f0>] bus_add_driver+0x170/0x220 [<ffffffffa0a60000>] ? 0xffffffffa0a60000 [<ffffffff814c894f>] driver_register+0x5f/0xf0 [<ffffffff8139e41b>] register_virtio_driver+0x1b/0x30 [<ffffffffa0a60010>] virtio_net_driver_init+0x10/0x12 [virtio_net] This patch fixes this by doing this in virtnet_free_queues(). And also don't delete napi in virtnet_freeze() since it will call virtnet_free_queues() which has already did this. Fixes 91815639d880 ("virtio-net: rx busy polling support") Cc: Rusty Russell <r...
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...3513,8 @@ static void virtnet_remove(struct virtio_device *vdev) >> >> unregister_netdev(vi->dev); >> >> + virtnet_bypass_destroy(vi); >> + >> remove_vq_common(vi); >> >> free_netdev(vi->dev); >> @@ -2996,6 +3598,11 @@ static __init int virtio_net_driver_init(void) >> { >> int ret; >> >> + virtnet_bypass = bypass_register_driver(&virtnet_bypass_ops, >> + &virtnet_bypass_netdev_ops); >> + if (!virtnet_bypass) >> + return -ENOMEM; > If CONFIG_NET_BYPASS is undefined, you will always return -ENOME...
2017 Dec 21
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...ev); > + case NETDEV_UNREGISTER: > + return virtnet_unregister_vf(event_dev); > + default: > + return NOTIFY_DONE; > + } > +} > + > +static struct notifier_block virtio_netdev_notifier = { > + .notifier_call = virtio_netdev_event, > +}; > + > static __init int virtio_net_driver_init(void) > { > int ret; > @@ -2841,6 +3175,8 @@ static __init int virtio_net_driver_init(void) > ret = register_virtio_driver(&virtio_net_driver); > if (ret) > goto err_virtio; > + > + register_netdevice_notifier(&virtio_netdev_notifier); > return...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...ive_page_frags(vi); >@@ -2913,6 +3513,8 @@ static void virtnet_remove(struct virtio_device *vdev) > > unregister_netdev(vi->dev); > >+ virtnet_bypass_destroy(vi); >+ > remove_vq_common(vi); > > free_netdev(vi->dev); >@@ -2996,6 +3598,11 @@ static __init int virtio_net_driver_init(void) > { > int ret; > >+ virtnet_bypass = bypass_register_driver(&virtnet_bypass_ops, >+ &virtnet_bypass_netdev_ops); >+ if (!virtnet_bypass) >+ return -ENOMEM; If CONFIG_NET_BYPASS is undefined, you will always return -ENOMEM here. >+ > ret = cpuhp_s...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...ive_page_frags(vi); >@@ -2913,6 +3513,8 @@ static void virtnet_remove(struct virtio_device *vdev) > > unregister_netdev(vi->dev); > >+ virtnet_bypass_destroy(vi); >+ > remove_vq_common(vi); > > free_netdev(vi->dev); >@@ -2996,6 +3598,11 @@ static __init int virtio_net_driver_init(void) > { > int ret; > >+ virtnet_bypass = bypass_register_driver(&virtnet_bypass_ops, >+ &virtnet_bypass_netdev_ops); >+ if (!virtnet_bypass) >+ return -ENOMEM; If CONFIG_NET_BYPASS is undefined, you will always return -ENOMEM here. >+ > ret = cpuhp_s...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...rk_sync(&vi->refill); free_receive_page_frags(vi); @@ -2913,6 +3513,8 @@ static void virtnet_remove(struct virtio_device *vdev) unregister_netdev(vi->dev); + virtnet_bypass_destroy(vi); + remove_vq_common(vi); free_netdev(vi->dev); @@ -2996,6 +3598,11 @@ static __init int virtio_net_driver_init(void) { int ret; + virtnet_bypass = bypass_register_driver(&virtnet_bypass_ops, + &virtnet_bypass_netdev_ops); + if (!virtnet_bypass) + return -ENOMEM; + ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "virtio/net:online", virtnet_cpu_online,...
2018 Jan 03
6
[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device
This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF device from the guest on the source host and reset the MAC filter of the VF to initiate
2018 Jan 03
6
[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device
This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF device from the guest on the source host and reset the MAC filter of the VF to initiate
2017 May 15
0
[PATCH 3/3] Fix ERROR: code indent should use tabs where possible
...virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 6c8170c..5d71e9f 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2717,7 +2717,7 @@ static __init int virtio_net_driver_init(void) > if (ret) > goto err_dead; > > - ret = register_virtio_driver(&virtio_net_driver); > + ret = register_virtio_driver(&virtio_net_driver); > if (ret) > goto err_virtio; > return 0; > -- > 2.4.11
2017 Jul 26
0
[PATCH] virtio-net: fix module unloading
...io_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 99a26a9efec1..f41ab0ea942a 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2743,9 +2743,9 @@ module_init(virtio_net_driver_init); > > static __exit void virtio_net_driver_exit(void) > { > + unregister_virtio_driver(&virtio_net_driver); > cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); > cpuhp_remove_multi_state(virtionet_online); > - unregister_virtio_driver(&virtio_net_driver); >...