summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-23 23:51:51 +0000
committerDavid S. Miller <davem@davemloft.net>2010-09-26 19:04:08 -0700
commita7855c78a24d6348e989bec616318e68c662e78b (patch)
tree43ee591745e17569ad212be6ec3c46e58b443c0a /include/linux/netdevice.h
parent83180af0b0ea166adf8249f4513beb7355f9b4c9 (diff)
downloadop-kernel-dev-a7855c78a24d6348e989bec616318e68c662e78b.zip
op-kernel-dev-a7855c78a24d6348e989bec616318e68c662e78b.tar.gz
net: loopback driver cleanup
loopback driver uses dev->ml_priv to store its percpu stats pointer. It uses ugly casts "(void __percpu __force *)" to shut up sparse complains. Define an union to better document we use ml_priv in loopback driver and define a lstats field with appropriate types. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 45dcda5b..01bd4c8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1050,8 +1050,10 @@ struct net_device {
#endif
/* mid-layer private */
- void *ml_priv;
-
+ union {
+ void *ml_priv;
+ struct pcpu_lstats __percpu *lstats; /* loopback stats */
+ };
/* GARP */
struct garp_port *garp_port;
OpenPOWER on IntegriCloud