Intel E810 ice driver fails build

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-
/root/rpmbuild/BUILD/ice- In function 'ice_vdcm_get_pasid':
/root/rpmbuild/BUILD/ice- 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- At top level:
/root/rpmbuild/BUILD/ice- error: 'const struct mdev_parent_ops' has no member named 'open'
 1519 |         .open                   = ice_vdcm_open_device,
      |          ^~~~
/root/rpmbuild/BUILD/ice- error: 'const struct mdev_parent_ops' has no member named 'release'
 1520 |         .release                = ice_vdcm_close_device,
      |          ^~~~~~~
/root/rpmbuild/BUILD/ice- In function 'ice_vdcm_init':
/root/rpmbuild/BUILD/ice- 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- note: each undeclared identifier is reported only once for each function it appears in
/root/rpmbuild/BUILD/ice- In function 'ice_vdcm_deinit':
/root/rpmbuild/BUILD/ice- 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/ /root/rpmbuild/BUILD/ice-] Error 1
make[1]: *** [Makefile:1915: /root/rpmbuild/BUILD/ice-] 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-'
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’.