mirror of https://github.com/F-Stack/f-stack.git
Sync DPDK's modifies.
1. igb_uio. 2. mlx5 drivers. 3. i40e drivers. 4. Freebsd-13.0
This commit is contained in:
parent
ef3b2dc851
commit
2cc2cdcf16
|
@ -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 */
|
/* Firmware of SFP x722 does not support 802.1ad frames ability */
|
||||||
if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
|
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;
|
hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
|
||||||
|
|
||||||
PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
|
PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <stdalign.h>
|
#include <stdalign.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
#include <ethdev_driver.h>
|
#include <ethdev_driver.h>
|
||||||
#include <rte_bus_pci.h>
|
#include <rte_bus_pci.h>
|
||||||
|
@ -1115,6 +1116,7 @@ mlx5_sysfs_check_switch_info(bool device_dir,
|
||||||
* @return
|
* @return
|
||||||
* 0 on success, a negative errno value otherwise and rte_errno is set.
|
* 0 on success, a negative errno value otherwise and rte_errno is set.
|
||||||
*/
|
*/
|
||||||
|
static int (*real_if_indextoname)(unsigned int, char *);
|
||||||
int
|
int
|
||||||
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
|
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;
|
char c;
|
||||||
ssize_t line_size;
|
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;
|
rte_errno = errno;
|
||||||
return -rte_errno;
|
return -rte_errno;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
# Copyright(c) 2018 Intel Corporation
|
# Copyright(c) 2018 Intel Corporation
|
||||||
|
|
||||||
subdirs = ['kni']
|
subdirs = ['kni', 'igb_uio']
|
||||||
|
|
||||||
kernel_build_dir = get_option('kernel_dir')
|
kernel_build_dir = get_option('kernel_dir')
|
||||||
kernel_source_dir = get_option('kernel_dir')
|
kernel_source_dir = get_option('kernel_dir')
|
||||||
|
|
|
@ -30,6 +30,22 @@ typedef cpuset_t rte_cpuset_t;
|
||||||
#define RTE_HAS_CPUSET
|
#define RTE_HAS_CPUSET
|
||||||
|
|
||||||
#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY
|
#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 \
|
#define RTE_CPU_AND(dst, src1, src2) do \
|
||||||
{ \
|
{ \
|
||||||
cpuset_t tmp; \
|
cpuset_t tmp; \
|
||||||
|
@ -44,6 +60,7 @@ typedef cpuset_t rte_cpuset_t;
|
||||||
CPU_OR(&tmp, src2); \
|
CPU_OR(&tmp, src2); \
|
||||||
CPU_COPY(&tmp, dst); \
|
CPU_COPY(&tmp, dst); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#endif
|
||||||
#define RTE_CPU_FILL(set) CPU_FILL(set)
|
#define RTE_CPU_FILL(set) CPU_FILL(set)
|
||||||
|
|
||||||
/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */
|
/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */
|
||||||
|
@ -56,6 +73,15 @@ typedef cpuset_t rte_cpuset_t;
|
||||||
CPU_COPY(&tmp, dst); \
|
CPU_COPY(&tmp, dst); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#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 \
|
#define RTE_CPU_NOT(dst, src) do \
|
||||||
{ \
|
{ \
|
||||||
cpuset_t tmp; \
|
cpuset_t tmp; \
|
||||||
|
@ -63,6 +89,7 @@ typedef cpuset_t rte_cpuset_t;
|
||||||
CPU_ANDNOT(&tmp, src); \
|
CPU_ANDNOT(&tmp, src); \
|
||||||
CPU_COPY(&tmp, dst); \
|
CPU_COPY(&tmp, dst); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#endif
|
||||||
#endif /* CPU_NAND */
|
#endif /* CPU_NAND */
|
||||||
|
|
||||||
#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */
|
#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */
|
||||||
|
|
Loading…
Reference in New Issue