Skip to content

Commit ddc33d7

Browse files
committed
Sync DPDK's modifies.
1. igb_uio. 2. mlx5 drivers. 3. i40e drivers.
1 parent 9e4ac2d commit ddc33d7

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

dpdk/drivers/net/i40e/i40e_ethdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
15791579
}
15801580
/* Firmware of SFP x722 does not support 802.1ad frames ability */
15811581
if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
1582-
hw->device_id == I40E_DEV_ID_SFP_I_X722)
1582+
hw->device_id == I40E_DEV_ID_SFP_I_X722 ||
1583+
hw->device_id == I40E_DEV_ID_10G_BASE_T_X722)
15831584
hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
15841585

15851586
PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",

dpdk/drivers/net/mlx5/linux/mlx5_ethdev_os.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <stdalign.h>
2424
#include <sys/un.h>
2525
#include <time.h>
26+
#include <dlfcn.h>
2627

2728
#include <rte_ethdev_driver.h>
2829
#include <rte_bus_pci.h>
@@ -1084,6 +1085,7 @@ mlx5_sysfs_check_switch_info(bool device_dir,
10841085
* @return
10851086
* 0 on success, a negative errno value otherwise and rte_errno is set.
10861087
*/
1088+
static int (*real_if_indextoname)(unsigned int, char *);
10871089
int
10881090
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
10891091
{
@@ -1104,7 +1106,16 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
11041106
char c;
11051107
ssize_t line_size;
11061108

1107-
if (!if_indextoname(ifindex, ifname)) {
1109+
// for ff tools
1110+
if (!real_if_indextoname) {
1111+
real_if_indextoname = dlsym(RTLD_NEXT, "if_indextoname");
1112+
if (!real_if_indextoname) {
1113+
rte_errno = errno;
1114+
return -rte_errno;
1115+
}
1116+
}
1117+
1118+
if (!real_if_indextoname(ifindex, ifname)) {
11081119
rte_errno = errno;
11091120
return -rte_errno;
11101121
}

dpdk/kernel/linux/meson.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright(c) 2018 Intel Corporation
33

4-
subdirs = ['kni']
4+
subdirs = ['kni', 'igb_uio']
55

66
# if we are cross-compiling we need kernel_dir specified
77
if get_option('kernel_dir') == '' and meson.is_cross_build()
@@ -11,7 +11,7 @@ endif
1111
kernel_dir = get_option('kernel_dir')
1212
if kernel_dir == ''
1313
# use default path for native builds
14-
kernel_version = run_command('uname', '-r').stdout().strip()
14+
kernel_version = run_command('uname', '-r', check: true).stdout().strip()
1515
kernel_dir = '/lib/modules/' + kernel_version
1616
endif
1717

@@ -23,7 +23,7 @@ endif
2323

2424
# test running make in kernel directory, using "make kernelversion"
2525
make_returncode = run_command('make', '-sC', kernel_dir + '/build',
26-
'kernelversion').returncode()
26+
'kernelversion', check: true).returncode()
2727
if make_returncode != 0
2828
error('Cannot compile kernel modules as requested - are kernel headers installed?')
2929
endif

0 commit comments

Comments
 (0)