Skip to content

Commit e57dc84

Browse files
shemmingerJerin Jacob
authored andcommitted
doc/eventdev: correct grammar and style issues
Use AI review to find and address various documentation issues in the eventdev programmer's guide: Grammar - Fix subject-verb agreement in multiple places - Fix article usage ("a" vs "an" before consonant/vowel sounds) - Fix relative pronoun usage ("which" vs "that") - Replace nonstandard verb "invocated" with "invoked" Spelling - Fix "setup up" to "set up" - Fix "as show below" to "as shown below" (multiple files) - Fix "rte mbuf" to "rte_mbuf" - Fix "rte_mbufs" to "rte_mbuf" - Fix missing backtick in RST markup Style - Capitalize "api" to "API" - Replace informal "For e.g," with "For example," - Remove extra whitespace - Fix "benefit of" to "benefit from" - Clarify awkward phrasing Code example - Fix invalid switch syntax "case default:" to "default:" Path corrections - Update outdated library path from libs/librte_eventdev to lib/eventdev Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
1 parent 85c1122 commit e57dc84

File tree

6 files changed

+33
-33
lines changed

6 files changed

+33
-33
lines changed

doc/guides/prog_guide/eventdev/dispatcher_lib.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ The event handler interface consists of two function pointers:
191191

192192
An event handler registration is valid on all lcores.
193193

194-
The functions pointed to by the match and process callbacks resides in
194+
The functions pointed to by the match and process callbacks reside in
195195
the application's domain logic, with one or more handlers per
196196
application module.
197197

@@ -215,7 +215,7 @@ An event is routed to no more than one handler. Thus, if a match
215215
function returns true, no further match functions will be invoked for
216216
that event.
217217

218-
Match functions must not depend on being invocated in any particular
218+
Match functions must not depend on being invoked in any particular
219219
order (e.g., in the handler registration order).
220220

221221
Events failing to match any handler are dropped, and the
@@ -224,15 +224,15 @@ Events failing to match any handler are dropped, and the
224224
Event Delivery
225225
^^^^^^^^^^^^^^
226226

227-
The handler callbacks are invocated by the dispatcher's service
227+
The handler callbacks are invoked by the dispatcher's service
228228
function, upon the arrival of events to the event ports bound to the
229229
running service lcore.
230230

231231
A particular event is delivered to at most one handler.
232232

233233
The application must not depend on all match callback invocations for
234-
a particular event batch being made prior to any process calls are
235-
being made. For example, if the dispatcher dequeues two events from
234+
a particular event batch being made before any process calls are
235+
made. For example, if the dispatcher dequeues two events from
236236
the event device, it may choose to find out the destination for the
237237
first event, and deliver it, and then continue to find out the
238238
destination for the second, and then deliver that event as well. The

doc/guides/prog_guide/eventdev/event_crypto_adapter.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Event Crypto Adapter Library
77
The DPDK :doc:`Eventdev library <eventdev>` provides event driven
88
programming model with features to schedule events.
99
The :doc:`../cryptodev_lib` provides an interface to
10-
the crypto poll mode drivers which supports different crypto operations.
11-
The Event Crypto Adapter is one of the adapter which is intended to
10+
the crypto poll mode drivers that support different crypto operations.
11+
The Event Crypto Adapter is one of the adapters that is intended to
1212
bridge between the event device and the crypto device.
1313

1414
The packet flow from crypto device to the event device can be accomplished
@@ -115,7 +115,7 @@ Adapter can be started in ``RTE_EVENT_CRYPTO_ADAPTER_OP_NEW`` or
115115
116116
If the application desires to have finer control of eventdev port allocation
117117
and setup, it can use the ``rte_event_crypto_adapter_create_ext()`` function.
118-
The ``rte_event_crypto_adapter_create_ext()`` function is passed as a callback
118+
The ``rte_event_crypto_adapter_create_ext()`` function is passed a callback
119119
function. The callback function is invoked if the adapter needs to use a
120120
service function and needs to create an event port for it. The callback is
121121
expected to fill the ``struct rte_event_crypto_adapter_conf`` structure
@@ -229,7 +229,7 @@ Configure the service function
229229
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230230

231231
If the adapter uses a service function, the application is required to assign
232-
a service core to the service function as show below.
232+
a service core to the service function as shown below.
233233

234234
.. code-block:: c
235235

doc/guides/prog_guide/eventdev/event_dma_adapter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RTE_EVENT_DMA_ADAPTER_OP_NEW mode
3636
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3737

3838
In the ``RTE_EVENT_DMA_ADAPTER_OP_NEW`` mode,
39-
application submits DMA operations directly to an DMA device.
39+
application submits DMA operations directly to a DMA device.
4040
The adapter then dequeues DMA completions from the DMA device
4141
and enqueues them as events to the event device.
4242
This mode does not ensure ingress ordering
@@ -230,7 +230,7 @@ Configuring service function
230230
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231231

232232
If the adapter uses a service function, the application is required
233-
to assign a service core to the service function as show below.
233+
to assign a service core to the service function as shown below.
234234

235235
.. code-block:: c
236236

doc/guides/prog_guide/eventdev/event_ethernet_rx_adapter.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ expected to fill the ``struct rte_event_eth_rx_adapter_conf structure``
6363
passed to it.
6464

6565
If the application desires to control the event buffer size at adapter level,
66-
it can use the ``rte_event_eth_rx_adapter_create_with_params()`` api. The event
66+
it can use the ``rte_event_eth_rx_adapter_create_with_params()`` API. The event
6767
buffer size is specified using ``struct rte_event_eth_rx_adapter_params::
6868
event_buf_size``. To configure the event buffer size at queue level, the boolean
6969
flag ``struct rte_event_eth_rx_adapter_params::use_queue_event_buf`` need to be
@@ -170,7 +170,7 @@ Querying Adapter Capabilities
170170

171171
The ``rte_event_eth_rx_adapter_caps_get()`` function allows
172172
the application to query the adapter capabilities for an eventdev and ethdev
173-
combination. For e.g, if the ``RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID``
173+
combination. For example, if the ``RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID``
174174
is set, the application can override the adapter generated flow ID in the event
175175
using ``rx_queue_flags`` field in ``struct rte_event_eth_rx_adapter_queue_conf``
176176
which is passed as a parameter to the ``rte_event_eth_rx_adapter_queue_add()``
@@ -191,7 +191,7 @@ Configuring the Service Function
191191
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
192192

193193
If the adapter uses a service function, the application is required to assign
194-
a service core to the service function as show below.
194+
a service core to the service function as shown below.
195195

196196
.. code-block:: c
197197
@@ -216,7 +216,7 @@ service function if one exists.
216216
Getting Adapter Statistics
217217
~~~~~~~~~~~~~~~~~~~~~~~~~~
218218

219-
The ``rte_event_eth_rx_adapter_stats_get()`` function reports counters defined
219+
The ``rte_event_eth_rx_adapter_stats_get()`` function reports counters defined
220220
in struct ``rte_event_eth_rx_adapter_stats``. The received packet and
221221
enqueued event counts are a sum of the counts from the eventdev PMD callbacks
222222
if the callback is supported, and the counts maintained by the service function,
@@ -248,7 +248,7 @@ adapter queue counters defined in struct ``rte_event_eth_rx_adapter_queue_stats`
248248
This function reports queue level stats only when queue level event buffer is
249249
used otherwise it returns -EINVAL.
250250

251-
The ``rte_event_eth_rx_adapter_queue_stats_reset`` function can be used to
251+
The ``rte_event_eth_rx_adapter_queue_stats_reset()`` function can be used to
252252
reset queue level stats when queue level event buffer is in use.
253253

254254
Getting Adapter Instance ID
@@ -294,7 +294,7 @@ monitor the buffer fill level and instruct the service function to selectively
294294
enqueue packets to the event device. The application may also use some other
295295
criteria to decide which packets should enter the event device even when
296296
the event buffer fill level is low. The
297-
``rte_event_eth_rx_adapter_cb_register()`` function allow the application
297+
``rte_event_eth_rx_adapter_cb_register()`` function allows the application
298298
to register a callback that selects which packets to enqueue to the event
299299
device.
300300

@@ -330,14 +330,14 @@ A loop processing ``rte_event_vector`` containing mbufs is shown below.
330330
switch (ev.event_type) {
331331
case RTE_EVENT_TYPE_ETH_RX_ADAPTER_VECTOR:
332332
case RTE_EVENT_TYPE_ETHDEV_VECTOR:
333-
struct rte_mbufs **mbufs;
333+
struct rte_mbuf **mbufs;
334334
335-
mbufs = (struct rte_mbufs **)ev[i].vec->mbufs;
335+
mbufs = (struct rte_mbuf **)ev[i].vec->mbufs;
336336
for (i = 0; i < ev.vec->nb_elem; i++) {
337337
/* Process each mbuf. */
338338
}
339339
break;
340-
case default:
340+
default:
341341
/* Handle other event_types. */
342342
}
343343

doc/guides/prog_guide/eventdev/event_ethernet_tx_adapter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Enqueuing Packets to the Adapter
137137
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138138

139139
The application needs to notify the adapter about the transmit port and queue used
140-
to send the packet. The transmit port is set in the ``struct rte mbuf::port`` field
140+
to send the packet. The transmit port is set in the ``struct rte_mbuf::port`` field
141141
and the transmit queue is set using the ``rte_event_eth_tx_adapter_txq_set()``
142142
function.
143143

@@ -196,7 +196,7 @@ The event device, ethernet device pairs which support the capability
196196
``RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR`` can process event vector of mbufs.
197197
Additionally, application can provide a hint to the Tx adapter that all the
198198
mbufs are destined to the same ethernet port and queue by setting the bit
199-
``rte_event_vector::attr_valid`` and filling `rte_event_vector::port`` and
199+
``rte_event_vector::attr_valid`` and filling ``rte_event_vector::port`` and
200200
``rte_event_vector::queue``.
201201
If ``rte_event_vector::attr_valid`` is not set then the Tx adapter should peek
202202
into each mbuf and transmit them to the requested ethernet port and queue pair.

doc/guides/prog_guide/eventdev/eventdev.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ and event driven programming models for packet processing, and applications are
2424
free to choose whatever model (or combination of the two) best suits their
2525
needs.
2626

27-
Step-by-step instructions of the eventdev design is available in the `API
27+
Step-by-step instructions of the eventdev design are available in the `API
2828
Walk-through`_ section later in this document.
2929

3030
Event struct
@@ -33,7 +33,7 @@ Event struct
3333
The eventdev API represents each event with a generic struct, which contains a
3434
payload and metadata required for scheduling by an eventdev. The
3535
``rte_event`` struct is a 16 byte C structure, defined in
36-
``libs/librte_eventdev/rte_eventdev.h``.
36+
``lib/eventdev/rte_eventdev.h``.
3737

3838
Event Metadata
3939
~~~~~~~~~~~~~~
@@ -67,8 +67,8 @@ the actual event being scheduled is. The payload is a union of the following:
6767

6868
These four items in a union occupy the same 64 bits at the end of the rte_event
6969
structure. The application can utilize the 64 bits directly by accessing the
70-
u64 variable, while the event_ptr, mbuf, vec are provided as a convenience
71-
variables. For example the mbuf pointer in the union can used to schedule a
70+
u64 variable, while the event_ptr, mbuf, vec are provided as convenience
71+
variables. For example, the mbuf pointer in the union can be used to schedule a
7272
DPDK packet.
7373

7474
Event Vector
@@ -320,8 +320,8 @@ can be achieved like this:
320320
Linking Queues to Ports with link profiles
321321
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322322

323-
An application can use link profiles if supported by the underlying event device to setup up
324-
multiple link profile per port and change them run time depending up on heuristic data.
323+
An application can use link profiles if supported by the underlying event device to set up
324+
multiple link profiles per port and change them at runtime depending on heuristic data.
325325
Using Link profiles can reduce the overhead of linking/unlinking and wait for unlinks in progress
326326
in fast-path and gives applications the ability to switch between preset profiles on the fly.
327327

@@ -397,11 +397,11 @@ it will be treated as a no-op.
397397
// Disable pre-scheduling if thread is about to be scheduled out
398398
// and issue dequeue() to drain pending events.
399399
400-
Application may provide a hint to the eventdev PMD
400+
Application may provide a hint to the eventdev PMD
401401
to pre-schedule the next event without releasing the current flow context.
402402
Event device that support this feature advertises the capability
403403
via the ``RTE_EVENT_DEV_CAP_PRESCHEDULE_EXPLICIT`` flag.
404-
If pre-scheduling is already enabled at a event device or event port level
404+
If pre-scheduling is already enabled at an event device or event port level
405405
or if the capability is not supported then the hint is ignored.
406406

407407
.. code-block:: c
@@ -412,8 +412,8 @@ Starting the EventDev
412412
~~~~~~~~~~~~~~~~~~~~~
413413

414414
A single function call tells the eventdev instance to start processing
415-
events. Note that all queues must be linked to for the instance to start, as
416-
if any queue is not linked to, enqueuing to that queue will cause the
415+
events. Note that all queues must be linked to at least one port for the instance to start, as
416+
if any queue is not linked, enqueuing to that queue will cause the
417417
application to backpressure and eventually stall due to no space in the
418418
eventdev.
419419

@@ -572,5 +572,5 @@ The eventdev library allows an application to easily schedule events as it
572572
requires, either using a run-to-completion or pipeline processing model. The
573573
queues and ports abstract the logical functionality of an eventdev, providing
574574
the application with a generic method to schedule events. With the flexible
575-
PMD infrastructure applications benefit of improvements in existing eventdevs
575+
PMD infrastructure applications benefit from improvements in existing eventdevs
576576
and additions of new ones without modification.

0 commit comments

Comments
 (0)