]> www.infradead.org Git - users/jedix/linux-maple.git/commit
uio_hv_generic: Add a check for HV_NIC for send, receive buffers setup
authorNaman Jain <namjain@linux.microsoft.com>
Thu, 2 Jan 2025 14:52:43 +0000 (14:52 +0000)
committerWei Liu <wei.liu@kernel.org>
Fri, 10 Jan 2025 00:54:21 +0000 (00:54 +0000)
commit5fa1da972fcf503df4fa188a673cd5d09b60b090
treec5c322257f735ae6c32cb03a8cb70a6d1119e936
parent4f6b64f3d3d96fb3796614362c64a4b73ddf3f7a
uio_hv_generic: Add a check for HV_NIC for send, receive buffers setup

Receive and send buffer allocation was originally introduced to support
DPDK's networking use case. These buffer sizes were further increased to
meet DPDK performance requirements. However, these large buffers are
unnecessary for any other UIO use cases.
Restrict the allocation of receive and send buffers only for HV_NIC device
type, saving 47 MB of memory per device.

While at it, fix some of the syntax related issues in the touched code
which are reported by "--strict" option of checkpatch.

Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/20250102145243.2088-1-namjain@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250102145243.2088-1-namjain@linux.microsoft.com>
drivers/uio/uio_hv_generic.c