Intel E810 ice driver fails build

Hi,
trying to build from source Intel latest ice driver on Rocky 9.1 (5.14.0-162.6.1.el9_1.0.1.x86_64)
build fails with these errers

 CC [M]  /root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.o
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c: In function 'ice_vdcm_get_pasid':
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c:1370:17: error: implicit declaration of function 'iommu_aux_get_pasid'; did you mean 'iommu_sva_get_pasid'? [-Werror=implicit-function-declaration]
 1370 |         pasid = iommu_aux_get_pasid(domain, ivdm->parent_dev);
      |                 ^~~~~~~~~~~~~~~~~~~
      |                 iommu_sva_get_pasid
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c: At top level:
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c:1519:10: error: 'const struct mdev_parent_ops' has no member named 'open'
 1519 |         .open                   = ice_vdcm_open_device,
      |          ^~~~
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c:1520:10: error: 'const struct mdev_parent_ops' has no member named 'release'
 1520 |         .release                = ice_vdcm_close_device,
      |          ^~~~~~~
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c: In function 'ice_vdcm_init':
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c:1538:52: error: 'IOMMU_DEV_FEAT_AUX' undeclared (first use in this function); did you mean 'IOMMU_DEV_FEAT_SVA'?
 1538 |         err = iommu_dev_enable_feature(&pdev->dev, IOMMU_DEV_FEAT_AUX);
      |                                                    ^~~~~~~~~~~~~~~~~~
      |                                                    IOMMU_DEV_FEAT_SVA
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c:1538:52: note: each undeclared identifier is reported only once for each function it appears in
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c: In function 'ice_vdcm_deinit':
/root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.c:1562:47: error: 'IOMMU_DEV_FEAT_AUX' undeclared (first use in this function); did you mean 'IOMMU_DEV_FEAT_SVA'?
 1562 |         iommu_dev_disable_feature(&pdev->dev, IOMMU_DEV_FEAT_AUX);
      |                                               ^~~~~~~~~~~~~~~~~~
      |                                               IOMMU_DEV_FEAT_SVA
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:295: /root/rpmbuild/BUILD/ice-1.10.1.2/src/ice_vdcm.o] Error 1
make[1]: *** [Makefile:1915: /root/rpmbuild/BUILD/ice-1.10.1.2/src] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.14.0-162.6.1.el9_1.0.1.x86_64'
make: *** [Makefile:149: all] Error 2
make: Leaving directory '/root/rpmbuild/BUILD/ice-1.10.1.2/src'
error: Bad exit status from /var/tmp/rpm-tmp.IIFcLq (%build)


RPM build errors:
    Macro expanded in comment on line 43: %kernel_module_package_buildreqs ...

    Bad exit status from /var/tmp/rpm-tmp.IIFcLq (%build)

The ice driver is in the 9.1 kernel. I’m curious to know why you like to build it from source.

It is possible that the source code from Intel is “too old” to build on 9.1. For example I see ‘IOMMU_DEV_FEAT_AUX’ in the 9.0 kernel but it has been removed from the 9.1 kernel.

I’m building RPM files from Intel provided tarballs.
not familiar with different option to get the latest versions.
I’ve contacted Intel support and they’re not officially supporting Rocky, but i tried the same with RHEL 9 (same kernel) and got the same result
so I’m waiting on Intel team

You should build as standard user, not as root.

The declaration may be out-of-sync with the definition. Find out (e.g. from the included headers) where struct mdev_parent_ops is declared and if it has a member called ‘open’.