In the latest i40e 2.24.6, there is inconsistent usage of conditionals leading to compilation errors.
I am porting to 6.6.9 kernel. In source src/i40e_virtchnl_pf.c, the function i40e_set_link_state is defined/implemented under three conditions, which must all be met (line 6663): #ifdef HAVE_NDO_SET_VF_LINK_STATE #ifdef CONFIG_DCB #ifdef CONFIG_PCI_IOV However, it is subsequently. used by function i40e_set_vf_enable under the single conditional at line 7595 #ifdef CONFIG_PCI_IOV Similarly, it is set in the i40e_vfd_ops table under the same conditional at line 9490 #ifdef CONFIG_PCI_IOV .get_link_state = i40e_get_link_state, .set_link_state = i40e_set_link_state, #endif The inconsistency leads to errors during compilation if CONFIG_PCI_IOV is defined and either HAVE_NDO_SET_VF_LINK_STATE or CONFIG_DCB is not. In my case, CONFIG_DCB is not enabled, and I would prefer not to enable it in my kernel config. What is the recommended solution? It is not clear to me why CONFIG_DCB is necessary. Should the two usages under a single #ifdef CONFIG_PCI_IOV be changed to require all three? e.g. #if defined(HAVE_NDO_SET_VF_LINK_STATE) && defined(CONFIG_DCB) && defined(CONFIG_PCI_IOV) Or perhaps can the two functions i40e_set_link_state and i40e_configure_vf_link be moved outside of the CONFIG_DCB check? Or is there another recommended solution? _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel Ethernet, visit https://community.intel.com/t5/Ethernet-Products/bd-p/ethernet-products