[dpdk-dev] contigmem: include <sys/vmmeter.h> to fix FreeBSD build
Checks
Commit Message
otherwise the build fails with
In file included from contigmem.c:57:
/usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error: use of undeclared
identifier 'vm_cnt'
return (vm_cnt.v_free_count += adj);
^
1 error generated.
*** Error code 1
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
lib/librte_eal/bsdapp/contigmem/contigmem.c | 1 +
1 file changed, 1 insertion(+)
--
2.15.0
Comments
On Thu, Nov 30, 2017 at 02:00:38PM +0800, kefu chai wrote:
> otherwise the build fails with
>
> In file included from contigmem.c:57:
> /usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error: use of undeclared
> identifier 'vm_cnt'
> return (vm_cnt.v_free_count += adj);
> ^
> 1 error generated.
> *** Error code 1
>
> Signed-off-by: Kefu Chai <tchaikov@gmail.com>
> ---
Hi,
what version of FreeBSD does this error occur on? Though it's been a few
weeks since I last tested, I haven't seen it before on other FreeBSD 10
or 11.
Regards,
/Bruce
+ Willem, he reported this issue
On Thu, Nov 30, 2017 at 5:56 PM, Bruce Richardson
<bruce.richardson@intel.com> wrote:
> On Thu, Nov 30, 2017 at 02:00:38PM +0800, kefu chai wrote:
>> otherwise the build fails with
>>
>> In file included from contigmem.c:57:
>> /usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error: use of undeclared
>> identifier 'vm_cnt'
>> return (vm_cnt.v_free_count += adj);
>> ^
>> 1 error generated.
>> *** Error code 1
>>
>> Signed-off-by: Kefu Chai <tchaikov@gmail.com>
>> ---
>
> Hi,
>
> what version of FreeBSD does this error occur on? Though it's been a few
> weeks since I last tested, I haven't seen it before on other FreeBSD 10
> or 11.
Bruce,
wjw@cephdev:~ % uname -a
FreeBSD cephdev.digiware.nl 12.0-CURRENT FreeBSD 12.0-CURRENT #15
r324142M: Sun Oct 1 08:19:29 CEST 2017
root@cephdev.digiware.nl:/usr/obj/usr/srcs/head/src/sys/GENERIC-NODEBUG
amd64
>
> Regards,
> /Bruce
On Thu, Nov 30, 2017 at 02:00:38PM +0800, kefu chai wrote:
> otherwise the build fails with
>
> In file included from contigmem.c:57:
> /usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error: use of undeclared
> identifier 'vm_cnt'
> return (vm_cnt.v_free_count += adj);
> ^
> 1 error generated.
> *** Error code 1
>
> Signed-off-by: Kefu Chai <tchaikov@gmail.com>
> ---
The commit log could do with being updated to note that the error occurs
with, currently unreleased, FreeBSD 12 Otherwise:
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
b/lib/librte_eal/bsdapp/contigmem/contigmem.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/rwlock.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
+#include <sys/vmmeter.h>
#include <machine/bus.h>