Page MenuHomeFreeBSD

linuxkpi: Fix a compilation issue when building the Intel QAT/QuickAssist driver
ClosedPublic

Authored by nc on Sat, Jan 9, 2:58 AM.

Details

Summary

linuxkpi: Fix the "error: unknown type name 'u32'" compilation issue when building the Intel QAT/QuickAssist driver.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nc requested review of this revision.Sat, Jan 9, 2:58 AM

For reference, the compile issue is:

In file included from /root/qat/quickassist/qat/freebsd/sys/modules/qat/qat_common/../../../../../common/freeBSD/drivers/crypto/qat/qat_common/adf_heartbeat.c:69:
/usr/src/sys/compat/linuxkpi/common/include/linux/random.h:66:15: error: unknown type name 'u32'
static inline u32
              ^
/usr/src/sys/compat/linuxkpi/common/include/linux/random.h:67:17: error: unknown type name 'u32'
prandom_u32_max(u32 max)
                ^
2 errors generated.
*** Error code 1

Stop.
make[3]: stopped in /root/qat/quickassist/qat/freebsd/sys/modules/qat/qat_common
*** Error code 1

Stop.
make[2]: stopped in /root/qat/quickassist/qat
gmake[1]: *** [Makefile:1272: qat-driver-all] Error 1
gmake[1]: Leaving directory '/root/qat'
gmake: *** [Makefile:550: all] Error 2
root@omen:~/qat #
sys/compat/linuxkpi/common/include/linux/random.h
37

Why asm/types.h and not linux/types.h? linux/types.h is what used by Linux' random.h.

Thanks for catching this! Updated.

kib edited reviewers, added: manu, bz, hselasky; removed: jhb, bdrewery, imp, scottl.
This revision is now accepted and ready to land.Sat, Jan 9, 6:51 PM

Thanks for approving!

I am a Ports committer but not a Source committer, and because of this, someone would need to commit this (unless I am misunderstanding something).

You should be able to commit with added tagline 'Approved by: hselasky, kib'