Skip to content

Commit

Permalink
Update igb_uio.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfb8856606 committed Sep 6, 2022
1 parent 13c736b commit 1c59c67
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
14 changes: 14 additions & 0 deletions dpdk/kernel/linux/igb_uio/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions dpdk/kernel/linux/igb_uio/igb_uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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");
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions dpdk/kernel/linux/igb_uio/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ 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() +
'/../../../lib/librte_eal/include',
'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'))

0 comments on commit 1c59c67

Please sign in to comment.