search for: virtnet_bypass_fold_stats

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

2018 Feb 17
1
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...+ > + spin_lock(&vbi->stats_lock); > + memcpy(stats, &vbi->bypass_stats, sizeof(*stats)); > + > + rcu_read_lock(); > + > + child_netdev = rcu_dereference(vbi->active_netdev); > + if (child_netdev) { > + new = dev_get_stats(child_netdev, &temp); > + virtnet_bypass_fold_stats(stats, new, &vbi->active_stats); > + memcpy(&vbi->active_stats, new, sizeof(*new)); > + } > + > + child_netdev = rcu_dereference(vbi->backup_netdev); > + if (child_netdev) { > + new = dev_get_stats(child_netdev, &temp); > + virtnet_bypass_fold_stats(stat...
2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...>= dev->real_num_tx_queues)) { + do { + txq -= dev->real_num_tx_queues; + } while (txq >= dev->real_num_tx_queues); + } + + return txq; +} + +/* fold stats, assuming all rtnl_link_stats64 fields are u64, but + * that some drivers can provide 32bit values only. + */ +static void +virtnet_bypass_fold_stats(struct rtnl_link_stats64 *_res, + const struct rtnl_link_stats64 *_new, + const struct rtnl_link_stats64 *_old) +{ + const u64 *new = (const u64 *)_new; + const u64 *old = (const u64 *)_old; + u64 *res = (u64 *)_res; + int i; + + for (i = 0; i < sizeof(*_res) / sizeof(u64); i++) { + u64...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...q >= dev->real_num_tx_queues)) { + do { + txq -= dev->real_num_tx_queues; + } while (txq >= dev->real_num_tx_queues); + } + + return txq; +} + +/* fold stats, assuming all rtnl_link_stats64 fields are u64, but + * that some drivers can provide 32bit values only. + */ +static void virtnet_bypass_fold_stats(struct rtnl_link_stats64 *_res, + const struct rtnl_link_stats64 *_new, + const struct rtnl_link_stats64 *_old) +{ + const u64 *new = (const u64 *)_new; + const u64 *old = (const u64 *)_old; + u64 *res = (u64 *)_res; + int i; + + for (i = 0; i < sizeof(*_res) / sizeof(u64); i++...
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some issues we'll get into in a moment. It extends virtio_net to use alternate datapath when available
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some issues we'll get into in a moment. It extends virtio_net to use alternate datapath when available
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...{ >+ txq -= dev->real_num_tx_queues; >+ } while (txq >= dev->real_num_tx_queues); >+ } >+ >+ return txq; >+} >+ >+/* fold stats, assuming all rtnl_link_stats64 fields are u64, but >+ * that some drivers can provide 32bit values only. >+ */ >+static void virtnet_bypass_fold_stats(struct rtnl_link_stats64 *_res, >+ const struct rtnl_link_stats64 *_new, >+ const struct rtnl_link_stats64 *_old) >+{ >+ const u64 *new = (const u64 *)_new; >+ const u64 *old = (const u64 *)_old; >+ u64 *res = (u64 *)_res; >+ int i; >+ >+ for (i = 0; i &...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...{ >+ txq -= dev->real_num_tx_queues; >+ } while (txq >= dev->real_num_tx_queues); >+ } >+ >+ return txq; >+} >+ >+/* fold stats, assuming all rtnl_link_stats64 fields are u64, but >+ * that some drivers can provide 32bit values only. >+ */ >+static void virtnet_bypass_fold_stats(struct rtnl_link_stats64 *_res, >+ const struct rtnl_link_stats64 *_new, >+ const struct rtnl_link_stats64 *_old) >+{ >+ const u64 *new = (const u64 *)_new; >+ const u64 *old = (const u64 *)_old; >+ u64 *res = (u64 *)_res; >+ int i; >+ >+ for (i = 0; i &...
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