Commit 9256645
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>1 parent 8172981 commit 9256645
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7253 | 7253 | | |
7254 | 7254 | | |
7255 | 7255 | | |
7256 | | - | |
7257 | | - | |
| 7256 | + | |
| 7257 | + | |
| 7258 | + | |
| 7259 | + | |
7258 | 7260 | | |
7259 | 7261 | | |
7260 | 7262 | | |
7261 | 7263 | | |
7262 | 7264 | | |
7263 | | - | |
| 7265 | + | |
7264 | 7266 | | |
| 7267 | + | |
| 7268 | + | |
| 7269 | + | |
7265 | 7270 | | |
7266 | | - | |
| 7271 | + | |
7267 | 7272 | | |
7268 | 7273 | | |
7269 | 7274 | | |
7270 | | - | |
7271 | | - | |
| 7275 | + | |
7272 | 7276 | | |
7273 | 7277 | | |
| 7278 | + | |
| 7279 | + | |
| 7280 | + | |
7274 | 7281 | | |
7275 | 7282 | | |
7276 | 7283 | | |
| |||
0 commit comments