On 11/12/23 22:30, Daniel Borkmann wrote:
Move {l,t,d}stats allocation to the core and let netdevs pick the stats type they need. That way the driver doesn't have to bother with error handling (allocation failure checking, making sure free happens in the right spot, etc) - all happening in the core. Co-developed-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx> Cc: David Ahern <dsahern@xxxxxxxxxx> --- drivers/net/veth.c | 16 ++----------- drivers/net/vrf.c | 14 +++--------- include/linux/netdevice.h | 8 +++++++ net/core/dev.c | 47 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 59 insertions(+), 26 deletions(-)
Reviewed-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>