search for: dev_get_stats

Displaying 20 results from an estimated 32 matches for "dev_get_stats".

2018 May 22
0
[PATCH net-next v11 3/5] net: Introduce net_failover driver
..._stats64 *new; + struct rtnl_link_stats64 temp; + struct net_device *slave_dev; + + spin_lock(&nfo_info->stats_lock); + memcpy(stats, &nfo_info->failover_stats, sizeof(*stats)); + + rcu_read_lock(); + + slave_dev = rcu_dereference(nfo_info->primary_dev); + if (slave_dev) { + new = dev_get_stats(slave_dev, &temp); + net_failover_fold_stats(stats, new, &nfo_info->primary_stats); + memcpy(&nfo_info->primary_stats, new, sizeof(*new)); + } + + slave_dev = rcu_dereference(nfo_info->standby_dev); + if (slave_dev) { + new = dev_get_stats(slave_dev, &temp); + net_failo...
2018 Feb 17
1
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...mp; > + struct net_device *child_netdev; > + > + 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(chil...
2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...l_link_stats64 *new; + struct rtnl_link_stats64 temp; + struct net_device *child_netdev; + + 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_by...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...l_link_stats64 *new; + struct rtnl_link_stats64 temp; + struct net_device *child_netdev; + + 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_by...
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
...stats64 temp; >+ struct net_device *child_netdev; >+ >+ 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_netde...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...stats64 temp; >+ struct net_device *child_netdev; >+ >+ 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_netde...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...mtu); > + goto err_set_mtu; > + } > + > + finfo = netdev_priv(failover_dev); > + standby = (slave_dev->dev.parent == failover_dev->dev.parent); > + > + dev_hold(slave_dev); > + > + if (standby) { > + rcu_assign_pointer(finfo->standby_dev, slave_dev); > + dev_get_stats(finfo->standby_dev, &finfo->standby_stats); > + } else { > + rcu_assign_pointer(finfo->primary_dev, slave_dev); > + dev_get_stats(finfo->primary_dev, &finfo->primary_stats); > + failover_dev->min_mtu = slave_dev->min_mtu; > + failover_dev->max_mtu...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...mtu); > + goto err_set_mtu; > + } > + > + finfo = netdev_priv(failover_dev); > + standby = (slave_dev->dev.parent == failover_dev->dev.parent); > + > + dev_hold(slave_dev); > + > + if (standby) { > + rcu_assign_pointer(finfo->standby_dev, slave_dev); > + dev_get_stats(finfo->standby_dev, &finfo->standby_stats); > + } else { > + rcu_assign_pointer(finfo->primary_dev, slave_dev); > + dev_get_stats(finfo->primary_dev, &finfo->primary_stats); > + failover_dev->min_mtu = slave_dev->min_mtu; > + failover_dev->max_mtu...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...e_join(slave_netdev, bypass_netdev); >+ } >+ >+ bi = netdev_priv(bypass_netdev); >+ backup = (slave_netdev->dev.parent == bypass_netdev->dev.parent); >+ >+ dev_hold(slave_netdev); >+ >+ if (backup) { >+ rcu_assign_pointer(bi->backup_netdev, slave_netdev); >+ dev_get_stats(bi->backup_netdev, &bi->backup_stats); >+ } else { >+ rcu_assign_pointer(bi->active_netdev, slave_netdev); >+ dev_get_stats(bi->active_netdev, &bi->active_stats); >+ bypass_netdev->min_mtu = slave_netdev->min_mtu; >+ bypass_netdev->max_mtu = slave_...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...e_join(slave_netdev, bypass_netdev); >+ } >+ >+ bi = netdev_priv(bypass_netdev); >+ backup = (slave_netdev->dev.parent == bypass_netdev->dev.parent); >+ >+ dev_hold(slave_netdev); >+ >+ if (backup) { >+ rcu_assign_pointer(bi->backup_netdev, slave_netdev); >+ dev_get_stats(bi->backup_netdev, &bi->backup_stats); >+ } else { >+ rcu_assign_pointer(bi->active_netdev, slave_netdev); >+ dev_get_stats(bi->active_netdev, &bi->active_stats); >+ bypass_netdev->min_mtu = slave_netdev->min_mtu; >+ bypass_netdev->max_mtu = slave_...
2018 Apr 10
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...-EINVAL; + + return bypass_ops->slave_join(slave_netdev, bypass_netdev); + } + + bi = netdev_priv(bypass_netdev); + backup = (slave_netdev->dev.parent == bypass_netdev->dev.parent); + + dev_hold(slave_netdev); + + if (backup) { + rcu_assign_pointer(bi->backup_netdev, slave_netdev); + dev_get_stats(bi->backup_netdev, &bi->backup_stats); + } else { + rcu_assign_pointer(bi->active_netdev, slave_netdev); + dev_get_stats(bi->active_netdev, &bi->active_stats); + bypass_netdev->min_mtu = slave_netdev->min_mtu; + bypass_netdev->max_mtu = slave_netdev->max_mtu;...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...d\n", + slave_dev->name, failover_dev->mtu); + goto err_set_mtu; + } + + finfo = netdev_priv(failover_dev); + standby = (slave_dev->dev.parent == failover_dev->dev.parent); + + dev_hold(slave_dev); + + if (standby) { + rcu_assign_pointer(finfo->standby_dev, slave_dev); + dev_get_stats(finfo->standby_dev, &finfo->standby_stats); + } else { + rcu_assign_pointer(finfo->primary_dev, slave_dev); + dev_get_stats(finfo->primary_dev, &finfo->primary_stats); + failover_dev->min_mtu = slave_dev->min_mtu; + failover_dev->max_mtu = slave_dev->max_mtu;...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...+ } >> + >> + finfo = netdev_priv(failover_dev); >> + standby = (slave_dev->dev.parent == failover_dev->dev.parent); >> + >> + dev_hold(slave_dev); >> + >> + if (standby) { >> + rcu_assign_pointer(finfo->standby_dev, slave_dev); >> + dev_get_stats(finfo->standby_dev, &finfo->standby_stats); >> + } else { >> + rcu_assign_pointer(finfo->primary_dev, slave_dev); >> + dev_get_stats(finfo->primary_dev, &finfo->primary_stats); >> + failover_dev->min_mtu = slave_dev->min_mtu; >> + failo...
2018 Apr 11
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...>> + >> + bi = netdev_priv(bypass_netdev); >> + backup = (slave_netdev->dev.parent == bypass_netdev->dev.parent); >> + >> + dev_hold(slave_netdev); >> + >> + if (backup) { >> + rcu_assign_pointer(bi->backup_netdev, slave_netdev); >> + dev_get_stats(bi->backup_netdev, &bi->backup_stats); >> + } else { >> + rcu_assign_pointer(bi->active_netdev, slave_netdev); >> + dev_get_stats(bi->active_netdev, &bi->active_stats); >> + bypass_netdev->min_mtu = slave_netdev->min_mtu; >> + bypass_ne...
2018 May 07
0
[PATCH net-next v10 2/4] net: Introduce generic failover module
..._stats64 *new; + struct rtnl_link_stats64 temp; + struct net_device *slave_dev; + + spin_lock(&nfo_info->stats_lock); + memcpy(stats, &nfo_info->failover_stats, sizeof(*stats)); + + rcu_read_lock(); + + slave_dev = rcu_dereference(nfo_info->primary_dev); + if (slave_dev) { + new = dev_get_stats(slave_dev, &temp); + net_failover_fold_stats(stats, new, &nfo_info->primary_stats); + memcpy(&nfo_info->primary_stats, new, sizeof(*new)); + } + + slave_dev = rcu_dereference(nfo_info->standby_dev); + if (slave_dev) { + new = dev_get_stats(slave_dev, &temp); + net_failo...
2018 Jan 17
1
[PATCH v2 net-next] virtio_net: Add ethtool stats
...-0.32% TCP_STREAM 16956.32 16890.63 -0.39% UDP_RR 178667.11 185862.70 +4.03% TCP_RR 128473.04 124985.81 -2.71% Signed-off-by: Toshiaki Makita <makita.toshiaki at lab.ntt.co.jp> --- v2: - Removed redundant counters which can be obtained from dev_get_stats. - Made queue counter structure different for tx and rx so they can be easily extended separately, as some additional counters are expected like XDP related ones and VM-Exit event. - Added performance numbers in commitlog. drivers/net/virtio_net.c | 191 ++++++++++++++++++++++++++++++++++-----...
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...instance, not in the drivers. Will move virtnet_bypass_info struct to bypass.h > > > >> + return -EEXIST; >> + } >> + >> + dev_hold(child_netdev); >> + >> + if (backup) { >> + rcu_assign_pointer(vbi->backup_netdev, child_netdev); >> + dev_get_stats(vbi->backup_netdev, &vbi->backup_stats); >> + } else { >> + rcu_assign_pointer(vbi->active_netdev, child_netdev); >> + dev_get_stats(vbi->active_netdev, &vbi->active_stats); >> + bypass_netdev->min_mtu = child_netdev->min_mtu; >> + bypa...
2018 Apr 10
6
[RFC PATCH net-next v6 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