Skip to content

Commit 2cc2cdc

Browse files
committed
Sync DPDK's modifies.
1. igb_uio. 2. mlx5 drivers. 3. i40e drivers. 4. Freebsd-13.0
1 parent ef3b2dc commit 2cc2cdc

File tree

4 files changed

+42
-3
lines changed

4 files changed

+42
-3
lines changed

dpdk/drivers/net/i40e/i40e_ethdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
15131513
}
15141514
/* Firmware of SFP x722 does not support 802.1ad frames ability */
15151515
if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
1516-
hw->device_id == I40E_DEV_ID_SFP_I_X722)
1516+
hw->device_id == I40E_DEV_ID_SFP_I_X722 ||
1517+
hw->device_id == I40E_DEV_ID_10G_BASE_T_X722)
15171518
hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
15181519

15191520
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 <ethdev_driver.h>
2829
#include <rte_bus_pci.h>
@@ -1115,6 +1116,7 @@ mlx5_sysfs_check_switch_info(bool device_dir,
11151116
* @return
11161117
* 0 on success, a negative errno value otherwise and rte_errno is set.
11171118
*/
1119+
static int (*real_if_indextoname)(unsigned int, char *);
11181120
int
11191121
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
11201122
{
@@ -1135,7 +1137,16 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
11351137
char c;
11361138
ssize_t line_size;
11371139

1138-
if (!if_indextoname(ifindex, ifname)) {
1140+
// for ff tools
1141+
if (!real_if_indextoname) {
1142+
real_if_indextoname = dlsym(RTLD_NEXT, "if_indextoname");
1143+
if (!real_if_indextoname) {
1144+
rte_errno = errno;
1145+
return -rte_errno;
1146+
}
1147+
}
1148+
1149+
if (!real_if_indextoname(ifindex, ifname)) {
11391150
rte_errno = errno;
11401151
return -rte_errno;
11411152
}

dpdk/kernel/linux/meson.build

Lines changed: 1 addition & 1 deletion
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
kernel_build_dir = get_option('kernel_dir')
77
kernel_source_dir = get_option('kernel_dir')

dpdk/lib/eal/freebsd/include/rte_os.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ typedef cpuset_t rte_cpuset_t;
3030
#define RTE_HAS_CPUSET
3131

3232
#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY
33+
#if __FreeBSD_version >= 1301000
34+
#define RTE_CPU_AND(dst, src1, src2) do \
35+
{ \
36+
cpuset_t tmp; \
37+
CPU_COPY(src1, &tmp); \
38+
CPU_AND(&tmp, &tmp, src2); \
39+
CPU_COPY(&tmp, dst); \
40+
} while (0)
41+
#define RTE_CPU_OR(dst, src1, src2) do \
42+
{ \
43+
cpuset_t tmp; \
44+
CPU_COPY(src1, &tmp); \
45+
CPU_OR(&tmp, &tmp, src2); \
46+
CPU_COPY(&tmp, dst); \
47+
} while (0)
48+
#else
3349
#define RTE_CPU_AND(dst, src1, src2) do \
3450
{ \
3551
cpuset_t tmp; \
@@ -44,6 +60,7 @@ typedef cpuset_t rte_cpuset_t;
4460
CPU_OR(&tmp, src2); \
4561
CPU_COPY(&tmp, dst); \
4662
} while (0)
63+
#endif
4764
#define RTE_CPU_FILL(set) CPU_FILL(set)
4865

4966
/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */
@@ -56,13 +73,23 @@ typedef cpuset_t rte_cpuset_t;
5673
CPU_COPY(&tmp, dst); \
5774
} while (0)
5875
#else
76+
#if __FreeBSD_version >= 1301000
77+
#define RTE_CPU_NOT(dst, src) do \
78+
{ \
79+
cpuset_t tmp; \
80+
CPU_FILL(&tmp); \
81+
CPU_ANDNOT(&tmp, &tmp, src); \
82+
CPU_COPY(&tmp, dst); \
83+
} while (0)
84+
#else
5985
#define RTE_CPU_NOT(dst, src) do \
6086
{ \
6187
cpuset_t tmp; \
6288
CPU_FILL(&tmp); \
6389
CPU_ANDNOT(&tmp, src); \
6490
CPU_COPY(&tmp, dst); \
6591
} while (0)
92+
#endif
6693
#endif /* CPU_NAND */
6794

6895
#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */

0 commit comments

Comments
 (0)