summaryrefslogtreecommitdiffstats
path: root/include/linux/gen_stats.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-08-16 09:36:49 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-17 21:33:49 -0700
commitc1a8f1f1c8e01eab5862c8db39b49ace814e6c66 (patch)
tree0679f709f70d9a91850888636a28adb79940c402 /include/linux/gen_stats.h
parentc6ba973b8fa97422aab4204f7d79f1d413cde925 (diff)
downloadop-kernel-dev-c1a8f1f1c8e01eab5862c8db39b49ace814e6c66.zip
op-kernel-dev-c1a8f1f1c8e01eab5862c8db39b49ace814e6c66.tar.gz
net: restore gnet_stats_basic to previous definition
In 5e140dfc1fe87eae27846f193086724806b33c7d "net: reorder struct Qdisc for better SMP performance" the definition of struct gnet_stats_basic changed incompatibly, as copies of this struct are shipped to userland via netlink. Restoring old behavior is not welcome, for performance reason. Fix is to use a private structure for kernel, and teach gnet_stats_copy_basic() to convert from kernel to user land, using legacy structure (struct gnet_stats_basic) Based on a report and initial patch from Michael Spang. Reported-by: Michael Spang <mspang@csclub.uwaterloo.ca> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/gen_stats.h')
-rw-r--r--include/linux/gen_stats.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h
index 0ffa41d..710e901 100644
--- a/include/linux/gen_stats.h
+++ b/include/linux/gen_stats.h
@@ -22,6 +22,11 @@ struct gnet_stats_basic
{
__u64 bytes;
__u32 packets;
+};
+struct gnet_stats_basic_packed
+{
+ __u64 bytes;
+ __u32 packets;
} __attribute__ ((packed));
/**
OpenPOWER on IntegriCloud