diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2016-04-25 04:25:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-25 15:09:09 -0400 |
commit | 343a6d8e4955f298206d83ae764acf60d146b898 (patch) | |
tree | 28f22359f567c7f869bf766198350f2106151f5a | |
parent | d296ba60d8e2de23a350796a567a3aa90fe1cb6e (diff) |
rtnl: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/uapi/linux/if_link.h | 1 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 36 |
2 files changed, 19 insertions, 18 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ba69d4447249..5fdd3a42e377 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
@@ -666,6 +666,7 @@ enum { | |||
666 | IFLA_VF_STATS_TX_BYTES, | 666 | IFLA_VF_STATS_TX_BYTES, |
667 | IFLA_VF_STATS_BROADCAST, | 667 | IFLA_VF_STATS_BROADCAST, |
668 | IFLA_VF_STATS_MULTICAST, | 668 | IFLA_VF_STATS_MULTICAST, |
669 | IFLA_VF_STATS_PAD, | ||
669 | __IFLA_VF_STATS_MAX, | 670 | __IFLA_VF_STATS_MAX, |
670 | }; | 671 | }; |
671 | 672 | ||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 5ec059d52823..9efc1f34ef3b 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -825,17 +825,17 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev, | |||
825 | nla_total_size(sizeof(struct ifla_vf_link_state)) + | 825 | nla_total_size(sizeof(struct ifla_vf_link_state)) + |
826 | nla_total_size(sizeof(struct ifla_vf_rss_query_en)) + | 826 | nla_total_size(sizeof(struct ifla_vf_rss_query_en)) + |
827 | /* IFLA_VF_STATS_RX_PACKETS */ | 827 | /* IFLA_VF_STATS_RX_PACKETS */ |
828 | nla_total_size(sizeof(__u64)) + | 828 | nla_total_size_64bit(sizeof(__u64)) + |
829 | /* IFLA_VF_STATS_TX_PACKETS */ | 829 | /* IFLA_VF_STATS_TX_PACKETS */ |
830 | nla_total_size(sizeof(__u64)) + | 830 | nla_total_size_64bit(sizeof(__u64)) + |
831 | /* IFLA_VF_STATS_RX_BYTES */ | 831 | /* IFLA_VF_STATS_RX_BYTES */ |
832 | nla_total_size(sizeof(__u64)) + | 832 | nla_total_size_64bit(sizeof(__u64)) + |
833 | /* IFLA_VF_STATS_TX_BYTES */ | 833 | /* IFLA_VF_STATS_TX_BYTES */ |
834 | nla_total_size(sizeof(__u64)) + | 834 | nla_total_size_64bit(sizeof(__u64)) + |
835 | /* IFLA_VF_STATS_BROADCAST */ | 835 | /* IFLA_VF_STATS_BROADCAST */ |
836 | nla_total_size(sizeof(__u64)) + | 836 | nla_total_size_64bit(sizeof(__u64)) + |
837 | /* IFLA_VF_STATS_MULTICAST */ | 837 | /* IFLA_VF_STATS_MULTICAST */ |
838 | nla_total_size(sizeof(__u64)) + | 838 | nla_total_size_64bit(sizeof(__u64)) + |
839 | nla_total_size(sizeof(struct ifla_vf_trust))); | 839 | nla_total_size(sizeof(struct ifla_vf_trust))); |
840 | return size; | 840 | return size; |
841 | } else | 841 | } else |
@@ -1153,18 +1153,18 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb, | |||
1153 | nla_nest_cancel(skb, vfinfo); | 1153 | nla_nest_cancel(skb, vfinfo); |
1154 | return -EMSGSIZE; | 1154 | return -EMSGSIZE; |
1155 | } | 1155 | } |
1156 | if (nla_put_u64(skb, IFLA_VF_STATS_RX_PACKETS, | 1156 | if (nla_put_u64_64bit(skb, IFLA_VF_STATS_RX_PACKETS, |
1157 | vf_stats.rx_packets) || | 1157 | vf_stats.rx_packets, IFLA_VF_STATS_PAD) || |
1158 | nla_put_u64(skb, IFLA_VF_STATS_TX_PACKETS, | 1158 | nla_put_u64_64bit(skb, IFLA_VF_STATS_TX_PACKETS, |
1159 | vf_stats.tx_packets) || | 1159 | vf_stats.tx_packets, IFLA_VF_STATS_PAD) || |
1160 | nla_put_u64(skb, IFLA_VF_STATS_RX_BYTES, | 1160 | nla_put_u64_64bit(skb, IFLA_VF_STATS_RX_BYTES, |
1161 | vf_stats.rx_bytes) || | 1161 | vf_stats.rx_bytes, IFLA_VF_STATS_PAD) || |
1162 | nla_put_u64(skb, IFLA_VF_STATS_TX_BYTES, | 1162 | nla_put_u64_64bit(skb, IFLA_VF_STATS_TX_BYTES, |
1163 | vf_stats.tx_bytes) || | 1163 | vf_stats.tx_bytes, IFLA_VF_STATS_PAD) || |
1164 | nla_put_u64(skb, IFLA_VF_STATS_BROADCAST, | 1164 | nla_put_u64_64bit(skb, IFLA_VF_STATS_BROADCAST, |
1165 | vf_stats.broadcast) || | 1165 | vf_stats.broadcast, IFLA_VF_STATS_PAD) || |
1166 | nla_put_u64(skb, IFLA_VF_STATS_MULTICAST, | 1166 | nla_put_u64_64bit(skb, IFLA_VF_STATS_MULTICAST, |
1167 | vf_stats.multicast)) | 1167 | vf_stats.multicast, IFLA_VF_STATS_PAD)) |
1168 | return -EMSGSIZE; | 1168 | return -EMSGSIZE; |
1169 | nla_nest_end(skb, vfstats); | 1169 | nla_nest_end(skb, vfstats); |
1170 | nla_nest_end(skb, vf); | 1170 | nla_nest_end(skb, vf); |