Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6562640b authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller
Browse files

hyperv: Remove extra allocated space for recv_pkt_list elements



The receive code path doesn't use the page buffer, so remove the
extra allocated space here.

Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 99e3fcfa
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -465,8 +465,6 @@ struct nvsp_message {

#define NETVSC_RECEIVE_BUFFER_ID		0xcafe

#define NETVSC_RECEIVE_SG_COUNT			1

/* Preallocated receive packets */
#define NETVSC_RECEIVE_PACKETLIST_COUNT		256

+1 −3
Original line number Diff line number Diff line
@@ -904,9 +904,7 @@ int netvsc_device_add(struct hv_device *device, void *additional_info)
	INIT_LIST_HEAD(&net_device->recv_pkt_list);

	for (i = 0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) {
		packet = kzalloc(sizeof(struct hv_netvsc_packet) +
				 (NETVSC_RECEIVE_SG_COUNT *
				  sizeof(struct hv_page_buffer)), GFP_KERNEL);
		packet = kzalloc(sizeof(struct hv_netvsc_packet), GFP_KERNEL);
		if (!packet)
			break;