Sync DPDK's modifies.

1. igb_uio.
    2. mlx5 drivers.
    3. i40e drivers.
This commit is contained in:
用jfb8856606 2023-09-11 08:11:16 +00:00
parent 9e4ac2d556
commit ddc33d7042
3 changed files with 17 additions and 5 deletions

View File

@ -1579,7 +1579,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
}
/* Firmware of SFP x722 does not support 802.1ad frames ability */
if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
hw->device_id == I40E_DEV_ID_SFP_I_X722)
hw->device_id == I40E_DEV_ID_SFP_I_X722 ||
hw->device_id == I40E_DEV_ID_10G_BASE_T_X722)
hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",

View File

@ -23,6 +23,7 @@
#include <stdalign.h>
#include <sys/un.h>
#include <time.h>
#include <dlfcn.h>
#include <rte_ethdev_driver.h>
#include <rte_bus_pci.h>
@ -1084,6 +1085,7 @@ mlx5_sysfs_check_switch_info(bool device_dir,
* @return
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int (*real_if_indextoname)(unsigned int, char *);
int
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
{
@ -1104,7 +1106,16 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
char c;
ssize_t line_size;
if (!if_indextoname(ifindex, ifname)) {
// for ff tools
if (!real_if_indextoname) {
real_if_indextoname = dlsym(RTLD_NEXT, "if_indextoname");
if (!real_if_indextoname) {
rte_errno = errno;
return -rte_errno;
}
}
if (!real_if_indextoname(ifindex, ifname)) {
rte_errno = errno;
return -rte_errno;
}

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
subdirs = ['kni']
subdirs = ['kni', 'igb_uio']
# if we are cross-compiling we need kernel_dir specified
if get_option('kernel_dir') == '' and meson.is_cross_build()
@ -11,7 +11,7 @@ endif
kernel_dir = get_option('kernel_dir')
if kernel_dir == ''
# use default path for native builds
kernel_version = run_command('uname', '-r').stdout().strip()
kernel_version = run_command('uname', '-r', check: true).stdout().strip()
kernel_dir = '/lib/modules/' + kernel_version
endif
@ -23,7 +23,7 @@ endif
# test running make in kernel directory, using "make kernelversion"
make_returncode = run_command('make', '-sC', kernel_dir + '/build',
'kernelversion').returncode()
'kernelversion', check: true).returncode()
if make_returncode != 0
error('Cannot compile kernel modules as requested - are kernel headers installed?')
endif