search for: virtnet_cpu_onlin

Displaying 9 results from an estimated 9 matches for "virtnet_cpu_onlin".

Did you mean: virtnet_cpu_online
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...by the rtnl lock */ struct virtio_net_ctrl_hdr ctrl_hdr; @@ -1237,25 +1238,53 @@ static void virtnet_set_affinity(struct virtnet_info *vi) vi->affinity_hint_set = true; } -static int virtnet_cpu_callback(struct notifier_block *nfb, - unsigned long action, void *hcpu) +static int virtnet_cpu_online(unsigned int cpu, struct hlist_node *node) { - struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); + struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, + node); + virtnet_set_affinity(vi); + return 0; +} - switch(action & ~CPU_TASKS_FROZEN) { - c...
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...by the rtnl lock */ struct virtio_net_ctrl_hdr ctrl_hdr; @@ -1237,25 +1238,53 @@ static void virtnet_set_affinity(struct virtnet_info *vi) vi->affinity_hint_set = true; } -static int virtnet_cpu_callback(struct notifier_block *nfb, - unsigned long action, void *hcpu) +static int virtnet_cpu_online(unsigned int cpu, struct hlist_node *node) { - struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); + struct virtnet_info *vi = hlist_entry_safe(node, struct virtnet_info, + node); + virtnet_set_affinity(vi); + return 0; +} - switch(action & ~CPU_TASKS_FROZEN) { - c...
2018 Aug 02
0
[net-next, v6, 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue
...; >> > >> A quick fix for this would be to just extract netif_set_xps_queue() out > >> of the lock by simply wrapping it with another put/get_online_cpus > >> (unlock right before and hold lock right after). > > > > virtnet_set_affinity() is called from virtnet_cpu_online(), which is > > called under cpus_read_lock too. > > > > It looks like now we can't call netif_set_xps_queue() from cpu hotplug > > callbacks. > > > > I can suggest a very straightforward fix for this problem. The patch is > > attached. > > &g...
2018 Aug 03
0
[net-next, v6, 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue
...this would be to just extract netif_set_xps_queue() out > > > >> of the lock by simply wrapping it with another put/get_online_cpus > > > >> (unlock right before and hold lock right after). > > > > > > > > virtnet_set_affinity() is called from virtnet_cpu_online(), which is > > > > called under cpus_read_lock too. > > > > > > > > It looks like now we can't call netif_set_xps_queue() from cpu hotplug > > > > callbacks. > > > > > > > > I can suggest a very straightforward fix for...
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...pass_netdev_ops); >> + if (!virtnet_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: &gt...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...p;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_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_V...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...p;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_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_V...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...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, 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_re...
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