ifb.c (f26e8817b235d8764363bffcc9cbfc61867371f2) ifb.c (bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221)
1/* drivers/net/ifb.c:
2
3 The purpose of this driver is to provide a device that allows
4 for sharing of resources:
5
6 1) qdiscs/policies that are per device as opposed to system wide.
7 ifb allows for a device which can be redirected to thus providing
8 an impression of sharing.

--- 115 unchanged lines hidden (view full) ---

124 } else {
125resched:
126 txp->tasklet_pending = 1;
127 tasklet_schedule(&txp->ifb_tasklet);
128 }
129
130}
131
1/* drivers/net/ifb.c:
2
3 The purpose of this driver is to provide a device that allows
4 for sharing of resources:
5
6 1) qdiscs/policies that are per device as opposed to system wide.
7 ifb allows for a device which can be redirected to thus providing
8 an impression of sharing.

--- 115 unchanged lines hidden (view full) ---

124 } else {
125resched:
126 txp->tasklet_pending = 1;
127 tasklet_schedule(&txp->ifb_tasklet);
128 }
129
130}
131
132static struct rtnl_link_stats64 *ifb_stats64(struct net_device *dev,
133 struct rtnl_link_stats64 *stats)
132static void ifb_stats64(struct net_device *dev,
133 struct rtnl_link_stats64 *stats)
134{
135 struct ifb_dev_private *dp = netdev_priv(dev);
136 struct ifb_q_private *txp = dp->tx_private;
137 unsigned int start;
138 u64 packets, bytes;
139 int i;
140
141 for (i = 0; i < dev->num_tx_queues; i++,txp++) {

--- 10 unchanged lines hidden (view full) ---

152 packets = txp->tx_packets;
153 bytes = txp->tx_bytes;
154 } while (u64_stats_fetch_retry_irq(&txp->tsync, start));
155 stats->tx_packets += packets;
156 stats->tx_bytes += bytes;
157 }
158 stats->rx_dropped = dev->stats.rx_dropped;
159 stats->tx_dropped = dev->stats.tx_dropped;
134{
135 struct ifb_dev_private *dp = netdev_priv(dev);
136 struct ifb_q_private *txp = dp->tx_private;
137 unsigned int start;
138 u64 packets, bytes;
139 int i;
140
141 for (i = 0; i < dev->num_tx_queues; i++,txp++) {

--- 10 unchanged lines hidden (view full) ---

152 packets = txp->tx_packets;
153 bytes = txp->tx_bytes;
154 } while (u64_stats_fetch_retry_irq(&txp->tsync, start));
155 stats->tx_packets += packets;
156 stats->tx_bytes += bytes;
157 }
158 stats->rx_dropped = dev->stats.rx_dropped;
159 stats->tx_dropped = dev->stats.tx_dropped;
160
161 return stats;
162}
163
164static int ifb_dev_init(struct net_device *dev)
165{
166 struct ifb_dev_private *dp = netdev_priv(dev);
167 struct ifb_q_private *txp;
168 int i;
169

--- 193 unchanged lines hidden ---
160}
161
162static int ifb_dev_init(struct net_device *dev)
163{
164 struct ifb_dev_private *dp = netdev_priv(dev);
165 struct ifb_q_private *txp;
166 int i;
167

--- 193 unchanged lines hidden ---