From: planck kernel size experiment Subject: net: remove the network-device generic-netlink control plane The fixed logger configures its one virtio NIC through SIOCSIFADDR, SIOCSIFNETMASK, SIOCSIFFLAGS and SIOCADDRT. It has no generic-netlink socket and never enumerates devices, NAPI instances or queues, changes NAPI settings, binds queues, or subscribes to network-device notifications. The two objects below form a userspace inspection/control API; they are not the packet datapath. Virtio-net publishes one statistics callback whose shared aggregation helper happens to live in that API, so stop publishing the now unqueryable statistics table as well. Omitting both sides removes the API rather than replacing it with a fake implementation. Exact UDP/TCP records and the final ICMP commit prove the NIC continues to receive and transmit. --- a/net/core/Makefile +++ b/net/core/Makefile @@ -15,7 +15,7 @@ obj-y += dev.o dev_api.o dev_addr_lists.o dst.o netevent.o \ neighbour.o rtnetlink.o utils.o link_watch.o \ sock_diag.o dev_ioctl.o tso.o \ fib_notifier.o xdp.o flow_offload.o gro.o \ - netdev-genl.o netdev-genl-gen.o gso.o + gso.o obj-$(CONFIG_NETDEV_ADDR_LIST_TEST) += dev_addr_lists_test.o --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -6715,7 +6715,6 @@ static int virtnet_probe(struct virtio_device *vdev) dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE | IFF_TX_SKB_NO_LINEAR; dev->netdev_ops = &virtnet_netdev; - dev->stat_ops = &virtnet_stat_ops; dev->features = NETIF_F_HIGHDMA; SET_NETDEV_DEV(dev, &vdev->dev);