search for: virtnet_cpu_down_prep

Displaying 8 results from an estimated 8 matches for "virtnet_cpu_down_prep".

2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...y(vi, (long)hcpu); - break; - default: - break; - } +static int virtnet_cpu_dead(unsigned int cpu, struct hlist_node *node) +{ + struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, + node_dead); + virtnet_set_affinity(vi); + return 0; +} - return NOTIFY_OK; +static int virtnet_cpu_down_prep(unsigned int cpu, struct hlist_node *node) +{ + struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, + node); + + virtnet_clean_affinity(vi, cpu); + return 0; +} + +static enum cpuhp_state virtionet_online; + +static int virtnet_cpu_notif_add(struct virtnet_info *vi) +{ + i...
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...y(vi, (long)hcpu); - break; - default: - break; - } +static int virtnet_cpu_dead(unsigned int cpu, struct hlist_node *node) +{ + struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, + node_dead); + virtnet_set_affinity(vi); + return 0; +} - return NOTIFY_OK; +static int virtnet_cpu_down_prep(unsigned int cpu, struct hlist_node *node) +{ + struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, + node); + + virtnet_clean_affinity(vi, cpu); + return 0; +} + +static enum cpuhp_state virtionet_online; + +static int virtnet_cpu_notif_add(struct virtnet_info *vi) +{ + i...
2019 Mar 18
1
[PATCH] virtio_net: remove hcpu from virtnet_clean_affinity
...uct virtnet_info *vi) { int i; @@ -1949,7 +1949,7 @@ static void virtnet_set_affinity(struct virtnet_info *vi) int stride; if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) { - virtnet_clean_affinity(vi, -1); + virtnet_clean_affinity(vi); return; } @@ -1999,7 +1999,7 @@ static int virtnet_cpu_down_prep(unsigned int cpu, struct hlist_node *node) struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, node); - virtnet_clean_affinity(vi, cpu); + virtnet_clean_affinity(vi); return 0; } @@ -2735,7 +2735,7 @@ static void virtnet_del_vqs(struct virtnet_info *vi) { str...
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...et_bypass) >> + return -ENOMEM; > If CONFIG_NET_BYPASS is undefined, you will always return -ENOMEM here. Will fix. > > >> + >> ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "virtio/net:online", >> virtnet_cpu_online, >> virtnet_cpu_down_prep); >> @@ -3010,12 +3617,14 @@ static __init int virtio_net_driver_init(void) >> ret = register_virtio_driver(&virtio_net_driver); >> if (ret) >> goto err_virtio; >> + >> return 0; >> err_virtio: >> cpuhp_remove_multi_state(CPUHP_VIRT_...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...mp;virtnet_bypass_netdev_ops); >+ if (!virtnet_bypass) >+ return -ENOMEM; If CONFIG_NET_BYPASS is undefined, you will always return -ENOMEM here. >+ > ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "virtio/net:online", > virtnet_cpu_online, > virtnet_cpu_down_prep); >@@ -3010,12 +3617,14 @@ static __init int virtio_net_driver_init(void) > ret = register_virtio_driver(&virtio_net_driver); > if (ret) > goto err_virtio; >+ > return 0; > err_virtio: > cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); > err_dead: > cpu...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...mp;virtnet_bypass_netdev_ops); >+ if (!virtnet_bypass) >+ return -ENOMEM; If CONFIG_NET_BYPASS is undefined, you will always return -ENOMEM here. >+ > ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "virtio/net:online", > virtnet_cpu_online, > virtnet_cpu_down_prep); >@@ -3010,12 +3617,14 @@ static __init int virtio_net_driver_init(void) > ret = register_virtio_driver(&virtio_net_driver); > if (ret) > goto err_virtio; >+ > return 0; > err_virtio: > cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); > err_dead: > cpu...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...(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, virtnet_cpu_down_prep); @@ -3010,12 +3617,14 @@ static __init int virtio_net_driver_init(void) ret = register_virtio_driver(&virtio_net_driver); if (ret) goto err_virtio; + return 0; err_virtio: cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD); err_dead: cpuhp_remove_multi_state(virtionet_online);...
2018 Apr 05
6
[RFC PATCH net-next v5 0/4] Enable virtio_net to act as a backup for a passthru device
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct attached SR-IOV VF devices. Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used