net: loopback: Do not allocate lstats explicitly
authorBreno Leitao <leitao@debian.org>
Mon, 29 Apr 2024 08:55:58 +0000 (01:55 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 1 May 2024 02:01:58 +0000 (19:01 -0700)
commit3b5933e99c32fbf46d0c5f2232473ef87d919e16
tree2a004b3002c50c14f42fdfcd13dcdef96967a1a6
parent035ec292573b2e0e6d04a3b97643c5b107852940
net: loopback: Do not allocate lstats explicitly

With commit 34d21de99cea9 ("net: Move {l,t,d}stats allocation to core and
convert veth & vrf"), stats allocation could be done on net core
instead of in this driver.

With this new approach, the driver doesn't have to bother with error
handling (allocation failure checking, making sure free happens in the
right spot, etc). This is core responsibility now.

Remove the allocation in the loopback driver and leverage the network
core allocation instead.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/20240429085559.2841918-1-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/loopback.c