mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
netfilter/ipvs: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a558da0916
commit
cbdeafd7e1
@ -435,6 +435,7 @@ enum {
|
|||||||
IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */
|
IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */
|
||||||
IPVS_STATS_ATTR_INBPS, /* current in byte rate */
|
IPVS_STATS_ATTR_INBPS, /* current in byte rate */
|
||||||
IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */
|
IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */
|
||||||
|
IPVS_STATS_ATTR_PAD,
|
||||||
__IPVS_STATS_ATTR_MAX,
|
__IPVS_STATS_ATTR_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2875,8 +2875,10 @@ static int ip_vs_genl_fill_stats(struct sk_buff *skb, int container_type,
|
|||||||
if (nla_put_u32(skb, IPVS_STATS_ATTR_CONNS, (u32)kstats->conns) ||
|
if (nla_put_u32(skb, IPVS_STATS_ATTR_CONNS, (u32)kstats->conns) ||
|
||||||
nla_put_u32(skb, IPVS_STATS_ATTR_INPKTS, (u32)kstats->inpkts) ||
|
nla_put_u32(skb, IPVS_STATS_ATTR_INPKTS, (u32)kstats->inpkts) ||
|
||||||
nla_put_u32(skb, IPVS_STATS_ATTR_OUTPKTS, (u32)kstats->outpkts) ||
|
nla_put_u32(skb, IPVS_STATS_ATTR_OUTPKTS, (u32)kstats->outpkts) ||
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes) ||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes,
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes) ||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes,
|
||||||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
nla_put_u32(skb, IPVS_STATS_ATTR_CPS, (u32)kstats->cps) ||
|
nla_put_u32(skb, IPVS_STATS_ATTR_CPS, (u32)kstats->cps) ||
|
||||||
nla_put_u32(skb, IPVS_STATS_ATTR_INPPS, (u32)kstats->inpps) ||
|
nla_put_u32(skb, IPVS_STATS_ATTR_INPPS, (u32)kstats->inpps) ||
|
||||||
nla_put_u32(skb, IPVS_STATS_ATTR_OUTPPS, (u32)kstats->outpps) ||
|
nla_put_u32(skb, IPVS_STATS_ATTR_OUTPPS, (u32)kstats->outpps) ||
|
||||||
@ -2900,16 +2902,26 @@ static int ip_vs_genl_fill_stats64(struct sk_buff *skb, int container_type,
|
|||||||
if (!nl_stats)
|
if (!nl_stats)
|
||||||
return -EMSGSIZE;
|
return -EMSGSIZE;
|
||||||
|
|
||||||
if (nla_put_u64(skb, IPVS_STATS_ATTR_CONNS, kstats->conns) ||
|
if (nla_put_u64_64bit(skb, IPVS_STATS_ATTR_CONNS, kstats->conns,
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_INPKTS, kstats->inpkts) ||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_OUTPKTS, kstats->outpkts) ||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INPKTS, kstats->inpkts,
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes) ||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes) ||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTPKTS, kstats->outpkts,
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_CPS, kstats->cps) ||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_INPPS, kstats->inpps) ||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INBYTES, kstats->inbytes,
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_OUTPPS, kstats->outpps) ||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_INBPS, kstats->inbps) ||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTBYTES, kstats->outbytes,
|
||||||
nla_put_u64(skb, IPVS_STATS_ATTR_OUTBPS, kstats->outbps))
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_CPS, kstats->cps,
|
||||||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INPPS, kstats->inpps,
|
||||||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTPPS, kstats->outpps,
|
||||||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_INBPS, kstats->inbps,
|
||||||
|
IPVS_STATS_ATTR_PAD) ||
|
||||||
|
nla_put_u64_64bit(skb, IPVS_STATS_ATTR_OUTBPS, kstats->outbps,
|
||||||
|
IPVS_STATS_ATTR_PAD))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
nla_nest_end(skb, nl_stats);
|
nla_nest_end(skb, nl_stats);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user