Skip to content

Interrupt mode PMD

Zhou Danny dpdk-dev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 8 repliesIn review
  2. v45 patches 13 repliesSuperseded
  3. v35 patches 13 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches11 repliesSuperseded
v15 patches10 repliesSuperseded

Changes in v5 from the cover letter

- Rebase the patchset onto the HEAD
- Isolate ethdev from EAL for new-added wait-for-rx interrupt function
- Export wait-for-rx interrupt function for shared libraries
- Split-off a new patch file for changed struct rte_intr_handle that other patches depend on, to avoid breaking git bisect
- Change sample applicaiton to accomodate EAL function spec change accordingly

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ethdev: add rx interrupt enable/disable functionslib/librte_ether/rte_ethdev.c lib/librte_ether/rte_ethdev.h lib/librte_ether/rte_ether_version.map+104 -04 replies
2/6eal: add rx queue interrupt FDs to intr handle structlib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h+4 -00 replies
3/6ixgbe: enable rx queue interrupts for both PF and VFlib/librte_pmd_ixgbe/ixgbe_ethdev.c lib/librte_pmd_ixgbe/ixgbe_ethdev.h+368 -40 replies
4/6igb: enable rx queue interrupts for PFlib/librte_pmd_e1000/e1000_ethdev.h lib/librte_pmd_e1000/igb_ethdev.c+206 -250 replies
5/6eal: add per rx queue interrupt handling based on VFIOlib/librte_eal/bsdapp/eal/rte_eal_version.map lib/librte_eal/common/include/rte_eal.h lib/librte_eal/common/include/rte_interrupts.h +3 more+174 -446 replies
6/6l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switchexamples/l3fwd-power/main.c+114 -410 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYong Liuvincent jardinDanny ZhouStephen Hemminger
SeriesT-b T-b T-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
1/6T-b
2/6T-b
3/6T-b
4/6T-b
5/6T-b
6/6T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/6] Interrupt mode PMD

v5 changes
- Rebase the patchset onto the HEAD
- Isolate ethdev from EAL for new-added wait-for-rx interrupt function
- Export wait-for-rx interrupt function for shared libraries
- Split-off a new patch file for changed struct rte_intr_handle that other patches depend on, to avoid breaking git bisect
- Change sample applicaiton to accomodate EAL function spec change accordingly

v4 changes
- Export interrupt enable/disable functions for shared libraries
- Adjust position of new-added structure fields and functions to avoid breaking ABI

v3 changes
- Add return value for interrupt enable/disable functions
- Move spinlok from PMD to L3fwd-power
- Remove unnecessary variables in e1000_mac_info
- Fix miscelleous review comments

v2 changes
- Fix compilation issue in Makefile for missed header file.
- Consolidate internal and community review comments of v1 patch set.

The patch series introduce low-latency one-shot rx interrupt into DPDK with polling and interrupt mode switch control example.

DPDK userspace interrupt notification and handling mechanism is based on UIO with below limitation:
1) It is designed to handle LSC interrupt only with inefficient suspended pthread wakeup procedure (e.g. UIO wakes up LSC interrupt handling thread which then wakes up DPDK polling thread). In this way, it introduces non-deterministic wakeup latency for DPDK polling thread as well as packet latency if it is used to handle Rx interrupt.
2) UIO only supports a single interrupt vector which has to been shared by LSC interrupt and interrupts assigned to dedicated rx queues.

This patchset includes below features:
1) Enable one-shot rx queue interrupt in ixgbe PMD(PF & VF) and igb PMD(PF only).
2) Build on top of the VFIO mechanism instead of UIO, so it could support up to 64 interrupt vectors for rx queue interrupts.
3) Have 1 DPDK polling thread handle per Rx queue interrupt with a dedicated VFIO eventfd, which eliminates non-deterministic pthread wakeup latency in user space.
4) Demonstrate interrupts control APIs and userspace NAIP-like polling/interrupt switch algorithms in L3fwd-power example.

Known limitations:
1) It does not work for UIO due to a single interrupt eventfd shared by LSC and rx queue interrupt handlers causes a mess.
2) LSC interrupt is not supported by VF driver, so it is by default disabled in L3fwd-power now. Feel free to turn in on if you want to support both LSC and rx queue interrupts on a PF.

Danny Zhou (6):
ethdev: add rx interrupt enable/disable functions
eal: add rx queue interrupt FDs to intr handle struct
ixgbe: enable rx queue interrupts for both PF and VF
igb: enable rx queue interrupts for PF
eal: add per rx queue interrupt handling based on VFIO
l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode
switch

 examples/l3fwd-power/main.c                        | 155 ++++++---
 lib/librte_eal/bsdapp/eal/rte_eal_version.map      |   1 +
 lib/librte_eal/common/include/rte_eal.h            |   1 +
 lib/librte_eal/common/include/rte_interrupts.h     |  12 +
 lib/librte_eal/linuxapp/eal/eal_interrupts.c       | 191 ++++++++---
 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         |  12 +-
 .../linuxapp/eal/include/exec-env/rte_interrupts.h |   4 +
 lib/librte_eal/linuxapp/eal/rte_eal_version.map    |   1 +
 lib/librte_ether/rte_ethdev.c                      |  43 +++
 lib/librte_ether/rte_ethdev.h                      |  59 ++++
 lib/librte_ether/rte_ether_version.map             |   2 +
 lib/librte_pmd_e1000/e1000_ethdev.h                |   3 +
 lib/librte_pmd_e1000/igb_ethdev.c                  | 228 +++++++++++--
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c                | 365 ++++++++++++++++++++-
 lib/librte_pmd_ixgbe/ixgbe_ethdev.h                |   7 +
 15 files changed, 970 insertions(+), 114 deletions(-)
Signature · 1 line
1.8.1.4