Update igb_uio.

This commit is contained in:
用jfb8856606 2022-09-06 04:45:51 +00:00
parent 13c736b9d7
commit 1c59c67009
3 changed files with 19 additions and 5 deletions

View File

@ -152,3 +152,17 @@ static inline bool igbuio_kernel_is_locked_down(void)
return false;
#endif
}
#ifndef fallthrough
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if __has_attribute(__fallthrough__)
#define fallthrough __attribute__((__fallthrough__))
#else
#define fallthrough do {} while (0) /* fallthrough */
#endif
#endif

View File

@ -250,7 +250,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
}
#endif
/* falls through - to MSI */
fallthrough;
case RTE_INTR_MODE_MSI:
#ifndef HAVE_ALLOC_IRQ_VECTORS
if (pci_enable_msi(udev->pdev) == 0) {
@ -269,7 +269,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
break;
}
#endif
/* falls through - to INTX */
fallthrough;
case RTE_INTR_MODE_LEGACY:
if (pci_intx_mask_supported(udev->pdev)) {
dev_dbg(&udev->pdev->dev, "using INTX");
@ -279,7 +279,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
break;
}
dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n");
/* falls through - to no IRQ */
fallthrough;
case RTE_INTR_MODE_NONE:
udev->mode = RTE_INTR_MODE_NONE;
udev->info.irq = UIO_IRQ_NONE;

View File

@ -8,7 +8,7 @@ mkfile = custom_target('igb_uio_makefile',
custom_target('igb_uio',
input: ['igb_uio.c', 'Kbuild'],
output: 'igb_uio.ko',
command: ['make', '-C', kernel_dir + '/build',
command: ['make', '-C', kernel_build_dir + '/build',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'EXTRA_CFLAGS=-I' + meson.current_source_dir() +
@ -16,5 +16,5 @@ custom_target('igb_uio',
'modules'],
depends: mkfile,
install: true,
install_dir: kernel_dir + '/extra/dpdk',
install_dir: kernel_build_dir + '/extra/dpdk',
build_by_default: get_option('enable_kmods'))