Re: [PATCH] hv_sock: use HV_HYP_PAGE_SIZE instead of PAGE_SIZE_4K
From: David Miller <davem@davemloft.net>
Date: 2019-07-26 00:26:25
Also in:
lkml, netdev
From: David Miller <davem@davemloft.net>
Date: 2019-07-26 00:26:25
Also in:
lkml, netdev
From: Himadri Pandya <redacted> Date: Thu, 25 Jul 2019 05:11:25 +0000
Older windows hosts require the hv_sock ring buffer to be defined using 4K pages. This was achieved by using the symbol PAGE_SIZE_4K defined specifically for this purpose. But now we have a new symbol HV_HYP_PAGE_SIZE defined in hyperv-tlfs which can be used for this. This patch removes the definition of symbol PAGE_SIZE_4K and replaces its usage with the symbol HV_HYP_PAGE_SIZE. This patch also aligns sndbuf and rcvbuf to hyper-v specific page size using HV_HYP_PAGE_SIZE instead of the guest page size(PAGE_SIZE) as hyper-v expects the page size to be 4K and it might not be the case on ARM64 architecture. Signed-off-by: Himadri Pandya <redacted>
This doesn't compile:
CC [M] net/vmw_vsock/hyperv_transport.o
net/vmw_vsock/hyperv_transport.c:58:28: error: ‘HV_HYP_PAGE_SIZE’ undeclared here (not in a function); did you mean ‘HV_MESSAGE_SIZE’?
#define HVS_SEND_BUF_SIZE (HV_HYP_PAGE_SIZE - sizeof(struct vmpipe_proto_header))
^~~~~~~~~~~~~~~~