]> git.baikalelectronics.ru Git - kernel.git/commit
net/core: relax BUILD_BUG_ON in netdev_stats_to_stats64
authorJarod Wilson <jarod@redhat.com>
Mon, 1 Feb 2016 23:51:04 +0000 (18:51 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Feb 2016 07:59:50 +0000 (02:59 -0500)
commita3b99ca035d5dda54fc18e9724e734d8c90f3e5e
tree8b677e50b06f7f5261681967b51db738cb57438e
parent6f01ea24aee7729d24d520cf5a6285a75a89d600
net/core: relax BUILD_BUG_ON in netdev_stats_to_stats64

The netdev_stats_to_stats64 function copies the deprecated
net_device_stats format stats into rtnl_link_stats64 for legacy support
purposes, but with the BUILD_BUG_ON as it was, it wasn't possible to
extend rtnl_link_stats64 without also extending net_device_stats. Relax
the BUILD_BUG_ON to only require that rtnl_link_stats64 is larger, and
zero out all the stat counters that aren't present in net_device_stats.

CC: Eric Dumazet <edumazet@google.com>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c