xref: /dpdk/doc/guides/eventdevs/octeontx.rst (revision 8809f78c7dd9f33a44a4f89c58fc91ded34296ed)
1a9263e3cSJerin Jacob..  SPDX-License-Identifier: BSD-3-Clause
2a9263e3cSJerin Jacob    Copyright(c) 2017 Cavium, Inc
38616e6e2SJerin Jacob
48616e6e2SJerin JacobOCTEON TX SSOVF Eventdev Driver
595a6b04fSAnoob Joseph===============================
68616e6e2SJerin Jacob
7*8809f78cSBruce RichardsonThe OCTEON TX SSOVF PMD (**librte_event_octeontx**) provides poll mode
88616e6e2SJerin Jacobeventdev driver support for the inbuilt event device found in the **Cavium OCTEON TX**
98616e6e2SJerin JacobSoC family as well as their virtual functions (VF) in SR-IOV context.
108616e6e2SJerin Jacob
113abcd29fSJerin JacobMore information can be found at `Cavium, Inc Official Website
128616e6e2SJerin Jacob<http://www.cavium.com/OCTEON-TX_ARM_Processors.html>`_.
138616e6e2SJerin Jacob
148616e6e2SJerin JacobFeatures
158616e6e2SJerin Jacob--------
168616e6e2SJerin Jacob
178616e6e2SJerin JacobFeatures of the OCTEON TX SSOVF PMD are:
188616e6e2SJerin Jacob
198616e6e2SJerin Jacob- 64 Event queues
208616e6e2SJerin Jacob- 32 Event ports
218616e6e2SJerin Jacob- HW event scheduler
228616e6e2SJerin Jacob- Supports 1M flows per event queue
238616e6e2SJerin Jacob- Flow based event pipelining
248616e6e2SJerin Jacob- Flow pinning support in flow based event pipelining
258616e6e2SJerin Jacob- Queue based event pipelining
268616e6e2SJerin Jacob- Supports ATOMIC, ORDERED, PARALLEL schedule types per flow
278616e6e2SJerin Jacob- Event scheduling QoS based on event queue priority
288616e6e2SJerin Jacob- Open system with configurable amount of outstanding events
298616e6e2SJerin Jacob- HW accelerated dequeue timeout support to enable power management
308616e6e2SJerin Jacob- SR-IOV VF
31fd5baf09SPavan Nikhilesh- HW managed event timers support through TIMVF, with high precision and
32fd5baf09SPavan Nikhilesh  time granularity of 1us.
33fd5baf09SPavan Nikhilesh- Up to 64 event timer adapters.
348616e6e2SJerin Jacob
358616e6e2SJerin JacobSupported OCTEON TX SoCs
3695a6b04fSAnoob Joseph------------------------
378616e6e2SJerin Jacob- CN83xx
388616e6e2SJerin Jacob
398616e6e2SJerin JacobPrerequisites
408616e6e2SJerin Jacob-------------
418616e6e2SJerin Jacob
4226cb0a72SSantosh ShuklaSee :doc:`../platform/octeontx` for setup information.
438616e6e2SJerin Jacob
448616e6e2SJerin Jacob
458616e6e2SJerin JacobInitialization
468616e6e2SJerin Jacob--------------
478616e6e2SJerin Jacob
4895a6b04fSAnoob JosephThe OCTEON TX eventdev is exposed as a vdev device which consists of a set
498616e6e2SJerin Jacobof SSO group and work-slot PCIe VF devices. On EAL initialization,
508616e6e2SJerin JacobSSO PCIe VF devices will be probed and then the vdev device can be created
518616e6e2SJerin Jacobfrom the application code, or from the EAL command line based on
528616e6e2SJerin Jacobthe number of probed/bound SSO PCIe VF device to DPDK by
538616e6e2SJerin Jacob
542f6fec53SThomas Monjalon* Invoking ``rte_vdev_init("event_octeontx")`` from the application
558616e6e2SJerin Jacob
568616e6e2SJerin Jacob* Using ``--vdev="event_octeontx"`` in the EAL options, which will call
572f6fec53SThomas Monjalon  rte_vdev_init() internally
588616e6e2SJerin Jacob
598616e6e2SJerin JacobExample:
608616e6e2SJerin Jacob
618616e6e2SJerin Jacob.. code-block:: console
628616e6e2SJerin Jacob
638616e6e2SJerin Jacob    ./your_eventdev_application --vdev="event_octeontx"
648616e6e2SJerin Jacob
653516327eSPavan Nikhilesh
663516327eSPavan NikhileshSelftest
673516327eSPavan Nikhilesh--------
683516327eSPavan Nikhilesh
6995a6b04fSAnoob JosephThe functionality of OCTEON TX eventdev can be verified using this option,
703516327eSPavan Nikhileshvarious unit and functional tests are run to verify the sanity.
713516327eSPavan NikhileshThe tests are run once the vdev creation is successfully complete.
723516327eSPavan Nikhilesh
733516327eSPavan Nikhilesh.. code-block:: console
743516327eSPavan Nikhilesh
753b8bcfcdSJerin Jacob    --vdev="event_octeontx,selftest=1"
763516327eSPavan Nikhilesh
773516327eSPavan Nikhilesh
78d1925c87SPavan NikhileshEnable TIMvf stats
79d1925c87SPavan Nikhilesh------------------
80d1925c87SPavan NikhileshTIMvf stats can be enabled by using this option, by default the stats are
81d1925c87SPavan Nikhileshdisabled.
82d1925c87SPavan Nikhilesh
83d1925c87SPavan Nikhilesh.. code-block:: console
84d1925c87SPavan Nikhilesh
85d1925c87SPavan Nikhilesh    --vdev="event_octeontx,timvf_stats=1"
86d1925c87SPavan Nikhilesh
87d1925c87SPavan Nikhilesh
888616e6e2SJerin JacobLimitations
898616e6e2SJerin Jacob-----------
908616e6e2SJerin Jacob
918616e6e2SJerin JacobBurst mode support
928616e6e2SJerin Jacob~~~~~~~~~~~~~~~~~~
938616e6e2SJerin Jacob
948616e6e2SJerin JacobBurst mode is not supported. Dequeue and Enqueue functions accepts only single
958616e6e2SJerin Jacobevent at a time.
968616e6e2SJerin Jacob
9745a914c5SPavan NikhileshRx adapter support
9845a914c5SPavan Nikhilesh~~~~~~~~~~~~~~~~~~
9945a914c5SPavan Nikhilesh
10045a914c5SPavan NikhileshWhen eth_octeontx is used as Rx adapter event schedule type
10145a914c5SPavan Nikhilesh``RTE_SCHED_TYPE_PARALLEL`` is not supported.
102f874c1ebSPavan Nikhilesh
103f874c1ebSPavan NikhileshEvent timer adapter support
104f874c1ebSPavan Nikhilesh~~~~~~~~~~~~~~~~~~~~~~~~~~~
105f874c1ebSPavan Nikhilesh
106f874c1ebSPavan NikhileshWhen timvf is used as Event timer adapter the clock source mapping is as
107f874c1ebSPavan Nikhileshfollows:
108f874c1ebSPavan Nikhilesh
109f874c1ebSPavan Nikhilesh.. code-block:: console
110f874c1ebSPavan Nikhilesh
111f874c1ebSPavan Nikhilesh        RTE_EVENT_TIMER_ADAPTER_CPU_CLK  = TIM_CLK_SRC_SCLK
112f874c1ebSPavan Nikhilesh        RTE_EVENT_TIMER_ADAPTER_EXT_CLK0 = TIM_CLK_SRC_GPIO
113f874c1ebSPavan Nikhilesh        RTE_EVENT_TIMER_ADAPTER_EXT_CLK1 = TIM_CLK_SRC_GTI
114f874c1ebSPavan Nikhilesh        RTE_EVENT_TIMER_ADAPTER_EXT_CLK2 = TIM_CLK_SRC_PTP
115f874c1ebSPavan Nikhilesh
116f874c1ebSPavan NikhileshWhen timvf is used as Event timer adapter event schedule type
117f874c1ebSPavan Nikhilesh``RTE_SCHED_TYPE_PARALLEL`` is not supported.
118b4134b2dSPavan Nikhilesh
119227f2835SPavan NikhileshMax number of events
120227f2835SPavan Nikhilesh~~~~~~~~~~~~~~~~~~~~
121b4134b2dSPavan Nikhilesh
122227f2835SPavan NikhileshMax number of events in OCTEON TX Eventdev (SSO) are only limited by DRAM size
123227f2835SPavan Nikhileshand they can be configured by passing limits to kernel bootargs as follows:
124227f2835SPavan Nikhilesh
125227f2835SPavan Nikhilesh.. code-block:: console
126227f2835SPavan Nikhilesh
127227f2835SPavan Nikhilesh        ssopf.max_events=4194304
128227f2835SPavan Nikhilesh
129227f2835SPavan NikhileshThe same can be verified by looking at the following sysfs entry:
130227f2835SPavan Nikhilesh
131227f2835SPavan Nikhilesh.. code-block:: console
132227f2835SPavan Nikhilesh
133227f2835SPavan Nikhilesh        # cat /sys/module/ssopf/parameters/max_events
134227f2835SPavan Nikhilesh        4194304
135227f2835SPavan Nikhilesh
136227f2835SPavan NikhileshThe maximum number of events that can be added to SSO by the event adapters such
137227f2835SPavan Nikhileshas (Rx/Timer) should be limited to the above configured value.
138