mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
c1a8f1f1c8
In 5e140dfc1f
"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>
17 lines
415 B
C
17 lines
415 B
C
#ifndef _XT_RATEEST_H
|
|
#define _XT_RATEEST_H
|
|
|
|
struct xt_rateest {
|
|
struct hlist_node list;
|
|
char name[IFNAMSIZ];
|
|
unsigned int refcnt;
|
|
spinlock_t lock;
|
|
struct gnet_estimator params;
|
|
struct gnet_stats_rate_est rstats;
|
|
struct gnet_stats_basic_packed bstats;
|
|
};
|
|
|
|
extern struct xt_rateest *xt_rateest_lookup(const char *name);
|
|
extern void xt_rateest_put(struct xt_rateest *est);
|
|
|
|
#endif /* _XT_RATEEST_H */
|