Sync DPDK's modifies.

1. igb_uio.
2. mlx5 drivers.
3. i40e drivers.
4. Freebsd-13.0
This commit is contained in:
用jfb8856606 2023-09-11 07:23:39 +00:00
parent ef3b2dc851
commit 2cc2cdcf16
4 changed files with 42 additions and 3 deletions

View File

@ -1513,7 +1513,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 <ethdev_driver.h>
#include <rte_bus_pci.h>
@ -1115,6 +1116,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)
{
@ -1135,7 +1137,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']
kernel_build_dir = get_option('kernel_dir')
kernel_source_dir = get_option('kernel_dir')

View File

@ -30,6 +30,22 @@ typedef cpuset_t rte_cpuset_t;
#define RTE_HAS_CPUSET
#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY
#if __FreeBSD_version >= 1301000
#define RTE_CPU_AND(dst, src1, src2) do \
{ \
cpuset_t tmp; \
CPU_COPY(src1, &tmp); \
CPU_AND(&tmp, &tmp, src2); \
CPU_COPY(&tmp, dst); \
} while (0)
#define RTE_CPU_OR(dst, src1, src2) do \
{ \
cpuset_t tmp; \
CPU_COPY(src1, &tmp); \
CPU_OR(&tmp, &tmp, src2); \
CPU_COPY(&tmp, dst); \
} while (0)
#else
#define RTE_CPU_AND(dst, src1, src2) do \
{ \
cpuset_t tmp; \
@ -44,6 +60,7 @@ typedef cpuset_t rte_cpuset_t;
CPU_OR(&tmp, src2); \
CPU_COPY(&tmp, dst); \
} while (0)
#endif
#define RTE_CPU_FILL(set) CPU_FILL(set)
/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */
@ -56,6 +73,15 @@ typedef cpuset_t rte_cpuset_t;
CPU_COPY(&tmp, dst); \
} while (0)
#else
#if __FreeBSD_version >= 1301000
#define RTE_CPU_NOT(dst, src) do \
{ \
cpuset_t tmp; \
CPU_FILL(&tmp); \
CPU_ANDNOT(&tmp, &tmp, src); \
CPU_COPY(&tmp, dst); \
} while (0)
#else
#define RTE_CPU_NOT(dst, src) do \
{ \
cpuset_t tmp; \
@ -63,6 +89,7 @@ typedef cpuset_t rte_cpuset_t;
CPU_ANDNOT(&tmp, src); \
CPU_COPY(&tmp, dst); \
} while (0)
#endif
#endif /* CPU_NAND */
#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */