virtio_net: Remove command data from control_buf
authorDaniel Jurgens <danielj@nvidia.com>
Fri, 3 May 2024 20:24:41 +0000 (23:24 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 7 May 2024 09:42:00 +0000 (11:42 +0200)
commitff7c7d9f5261e4372e541e6bb6781b386a839b48
tree287bd5b9b7ccf10649ec25700462219ca405e240
parentfce29030c5656986bfd533a92630a612ff58a9dc
virtio_net: Remove command data from control_buf

Allocate memory for the data when it's used. Ideally the struct could
be on the stack, but we can't DMA stack memory. With this change only
the header and status memory are shared between commands, which will
allow using a tighter lock than RTNL.

Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Heng Qi <hengqi@linux.alibaba.com>
Tested-by: Heng Qi <hengqi@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/virtio_net.c