需要帮助在 Ubuntu 18.04 上安装 i40e

需要帮助在 Ubuntu 18.04 上安装 i40e
oot@vpre:~/patch/i40e-2.2.4/src# make install
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-54-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /root/patch/i40e-2.2.4/src/i40e_main.o
/root/patch/i40e-2.2.4/src/i40e_main.c: In function ‘i40e_get_netdev_stats_struct’:
/root/patch/i40e-2.2.4/src/i40e_main.c:442:13: error: implicit declaration of function ‘ACCESS_ONCE’; did you mean ‘READ_ONCE’? [-Werror=implicit-function-declaration]
   tx_ring = ACCESS_ONCE(vsi->tx_rings[i]);
             ^~~~~~~~~~~
             READ_ONCE
/root/patch/i40e-2.2.4/src/i40e_main.c:442:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   tx_ring = ACCESS_ONCE(vsi->tx_rings[i]);
           ^
/root/patch/i40e-2.2.4/src/i40e_main.c: In function ‘i40e_update_vsi_stats’:
/root/patch/i40e-2.2.4/src/i40e_main.c:838:5: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   p = ACCESS_ONCE(vsi->tx_rings[q]);
     ^
/root/patch/i40e-2.2.4/src/i40e_main.c: At top level:
/root/patch/i40e-2.2.4/src/i40e_main.c:5812:14: warning: ‘struct tc_to_netdev’ declared inside parameter list will not be visible outside of this definition or declaration
       struct tc_to_netdev *tc)
              ^~~~~~~~~~~~
/root/patch/i40e-2.2.4/src/i40e_main.c: In function ‘__i40e_setup_tc’:
/root/patch/i40e-2.2.4/src/i40e_main.c:5818:8: error: dereferencing pointer to incomplete type ‘struct tc_to_netdev’
  if (tc->type != TC_SETUP_MQPRIO)
        ^~
/root/patch/i40e-2.2.4/src/i40e_main.c:5818:18: error: ‘TC_SETUP_MQPRIO’ undeclared (first use in this function); did you mean ‘TC_SETUP_BLOCK’?
  if (tc->type != TC_SETUP_MQPRIO)
                  ^~~~~~~~~~~~~~~
                  TC_SETUP_BLOCK
/root/patch/i40e-2.2.4/src/i40e_main.c:5818:18: note: each undeclared identifier is reported only once for each function it appears in
/root/patch/i40e-2.2.4/src/i40e_main.c: At top level:
/root/patch/i40e-2.2.4/src/i40e_main.c:10158:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .ndo_setup_tc  = __i40e_setup_tc,
                   ^~~~~~~~~~~~~~~
/root/patch/i40e-2.2.4/src/i40e_main.c:10158:19: note: (near initialization for ‘i40e_netdev_ops.ndo_setup_tc’)
/root/patch/i40e-2.2.4/src/i40e_main.c: In function ‘i40e_probe’:
/root/patch/i40e-2.2.4/src/i40e_main.c:12283:2: error: implicit declaration of function ‘setup_timer’; did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
  setup_timer(&pf->service_timer, i40e_service_timer, (unsigned long)pf);
  ^~~~~~~~~~~
  sk_stop_timer
/root/patch/i40e-2.2.4/src/i40e_main.c: In function ‘i40e_remove’:
/root/patch/i40e-2.2.4/src/i40e_main.c:12628:23: error: ‘struct timer_list’ has no member named ‘data’
  if (pf->service_timer.data)
                       ^
/root/patch/i40e-2.2.4/src/i40e_main.c: In function ‘__i40e_setup_tc’:
/root/patch/i40e-2.2.4/src/i40e_main.c:5828:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/root/patch/i40e-2.2.4/src/i40e_main.o' failed
make[2]: *** [/root/patch/i40e-2.2.4/src/i40e_main.o] Error 1
Makefile:1552: recipe for target '_module_/root/patch/i40e-2.2.4/src' failed
make[1]: *** [_module_/root/patch/i40e-2.2.4/src] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-54-generic'
Makefile:72: recipe for target 'default' failed
make: *** [default] Error 2

相关内容