6 A DPAA2 DPIO (Data Path I/O) is a hardware object that provides
7 interfaces to enqueue and dequeue frames to/from network interfaces
8 and other accelerators. A DPIO also provides hardware buffer
9 pool management for network interfaces.
11 This document provides an overview the Linux DPIO driver, its
12 subcomponents, and its APIs.
14 See Documentation/networking/dpaa2/overview.rst for a general overview of DPAA2
15 and the general DPAA2 driver architecture in Linux.
20 The DPIO driver is bound to DPIO objects discovered on the fsl-mc bus and
21 provides services that:
22 A) allow other drivers, such as the Ethernet driver, to enqueue and dequeue
23 frames for their respective objects
24 B) allow drivers to register callbacks for data availability notifications
25 when data becomes available on a queue or channel
26 C) allow drivers to manage hardware buffer pools
28 The Linux DPIO driver consists of 3 primary components--
29 DPIO object driver-- fsl-mc driver that manages the DPIO object
30 DPIO service-- provides APIs to other Linux drivers for services
31 QBman portal interface-- sends portal commands, gets responses
36 +---+----+ +------+-----+
37 |DPIO obj| |DPIO service|
38 | driver |---| (DPIO) |
39 +--------+ +------+-----+
48 The diagram below shows how the DPIO driver components fit with the other
49 DPAA2 Linux driver components:
53 +------------+ +------------+
54 | Allocator |. . . . . . . | Ethernet |
55 |(DPMCP,DPBP)| | (DPNI) |
56 +-.----------+ +---+---+----+
58 . . <data avail, | |<enqueue,
59 . . tx confirm> | | dequeue>
61 | DPRC driver | . +--------+ +------------+
62 | (DPRC) | . . |DPIO obj| |DPIO service|
63 +----------+--+ | driver |-| (DPIO) |
64 | +--------+ +------+-----+
65 |<dev add/remove> +------|-----+
67 +----+--------------+ | portal i/f |
68 | MC-bus driver | +------------+
71 +-------------------+ |
73 =========================================|=========|========================
74 +-+--DPIO---|-----------+
77 +-----------------------+
79 ============================================================================
82 DPIO Object Driver (dpio-driver.c)
83 ----------------------------------
85 The dpio-driver component registers with the fsl-mc bus to handle objects of
86 type "dpio". The implementation of probe() handles basic initialization
87 of the DPIO including mapping of the DPIO regions (the QBman SW portal)
88 and initializing interrupts and registering irq handlers. The dpio-driver
89 registers the probed DPIO with dpio-service.
91 DPIO service (dpio-service.c, dpaa2-io.h)
92 ------------------------------------------
94 The dpio service component provides queuing, notification, and buffers
95 management services to DPAA2 drivers, such as the Ethernet driver. A system
96 will typically allocate 1 DPIO object per CPU to allow queuing operations
97 to happen simultaneously across all CPUs.
100 dpaa2_io_service_register()
101 dpaa2_io_service_deregister()
102 dpaa2_io_service_rearm()
105 dpaa2_io_service_pull_fq()
106 dpaa2_io_service_pull_channel()
107 dpaa2_io_service_enqueue_fq()
108 dpaa2_io_service_enqueue_qd()
109 dpaa2_io_store_create()
110 dpaa2_io_store_destroy()
111 dpaa2_io_store_next()
113 Buffer pool management
114 dpaa2_io_service_release()
115 dpaa2_io_service_acquire()
117 QBman portal interface (qbman-portal.c)
118 ---------------------------------------
120 The qbman-portal component provides APIs to do the low level hardware
121 bit twiddling for operations such as:
122 -initializing Qman software portals
123 -building and sending portal commands
124 -portal interrupt configuration and processing
126 The qbman-portal APIs are not public to other drivers, and are
127 only used by dpio-service.
129 Other (dpaa2-fd.h, dpaa2-global.h)
130 ----------------------------------
132 Frame descriptor and scatter-gather definitions and the APIs used to
133 manipulate them are defined in dpaa2-fd.h.
135 Dequeue result struct and parsing APIs are defined in dpaa2-global.h.