Sync DPDK's modifies.

1. igb_uio.
2. mlx5 drivers.
3. i40e drivers.
This commit is contained in:
用jfb8856606 2023-09-11 09:38:40 +00:00
parent 738365f742
commit 648c3a8863
4 changed files with 32 additions and 11 deletions

View File

@ -1485,7 +1485,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

@ -24,6 +24,7 @@
#include <stdalign.h>
#include <sys/un.h>
#include <time.h>
#include <dlfcn.h>
#include <rte_atomic.h>
#include <rte_ethdev_driver.h>
@ -1679,6 +1680,7 @@ mlx5_dev_to_eswitch_info(struct rte_eth_dev *dev)
* @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)
{
@ -1698,7 +1700,17 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
char c;
int ret;
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

@ -162,7 +162,7 @@ static inline bool igbuio_kernel_is_locked_down(void)
#if __has_attribute(__fallthrough__)
#define fallthrough __attribute__((__fallthrough__))
#else
#define fallthrough do {} while (0)
#define fallthrough do {} while (0) /* fallthrough */
#endif
#endif

View File

@ -15,7 +15,21 @@
#include <linux/version.h>
#include <linux/slab.h>
#include <rte_pci_dev_features.h>
/**
* These enum and macro definitions are copied from the
* file rte_pci_dev_features.h
*/
enum rte_intr_mode {
RTE_INTR_MODE_NONE = 0,
RTE_INTR_MODE_LEGACY,
RTE_INTR_MODE_MSI,
RTE_INTR_MODE_MSIX
};
#define RTE_INTR_MODE_NONE_NAME "none"
#define RTE_INTR_MODE_LEGACY_NAME "legacy"
#define RTE_INTR_MODE_MSI_NAME "msi"
#define RTE_INTR_MODE_MSIX_NAME "msix"
#include "compat.h"
@ -498,18 +512,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto fail_release_iomem;
/* set 64-bit DMA mask */
err = pci_set_dma_mask(dev, DMA_BIT_MASK(64));
err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64));
if (err != 0) {
dev_err(&dev->dev, "Cannot set DMA mask\n");
goto fail_release_iomem;
}
err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64));
if (err != 0) {
dev_err(&dev->dev, "Cannot set consistent DMA mask\n");
goto fail_release_iomem;
}
/* fill uio infos */
udev->info.name = "igb_uio";
udev->info.version = "0.1";