Jasvinder Singh [Wed, 5 Apr 2017 20:49:49 +0000 (21:49 +0100)]
net: add CRC computation API
APIs for selecting the architecure specific implementation and computing
the crc (16-bit and 32-bit CRCs) are added. For CRCs calculation, scalar
as well as x86 intrinsic(sse4.2) versions are implemented.
The scalar version is based on generic Look-Up Table(LUT) algorithm,
while x86 intrinsic version uses carry-less multiplication for
fast CRC computation.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Gaetan Rivet [Fri, 31 Mar 2017 12:04:39 +0000 (14:04 +0200)]
app/testpmd: use ethdev iterator to list devices
This commit replaces redundant code with public ethdev layer calls.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 31 Mar 2017 12:04:38 +0000 (14:04 +0200)]
ethdev: add device iterator
This iterator helps applications iterate over the device list and skip
holes caused by invalid or detached devices.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 31 Mar 2017 12:04:37 +0000 (14:04 +0200)]
ethdev: expose device states
The hotplug API introduced multiple states for a device with possible
values defined internally, while the related field in struct rte_eth_dev
was made public.
Exposing those states improves consistency because applications have to
deal with the device list directly.
"DEV_DETACHED" is renamed "RTE_ETH_DEV_UNUSED" to better reflect that
the emptiness of a slot is not necessarily the result of detaching a
device.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Ferruh Yigit [Wed, 5 Apr 2017 15:32:10 +0000 (16:32 +0100)]
event/sw: fix build with icc
build error:
.../drivers/event/sw/sw_evdev_scheduler.c(379):
error #300: const variable "dummy_rob" requires an initializer
static const struct reorder_buffer_entry dummy_rob;
^
Variable "dummy_rob" defined as const but already cast to another
pointer and its content updated. Remove const qualifier from variable.
Fixes:
617995dfc5b2 ("event/sw: add scheduling logic")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Wed, 5 Apr 2017 15:32:09 +0000 (16:32 +0100)]
event/octeontx: fix build with icc
build error:
.../drivers/event/octeontx/ssovf_worker.c(212):
error #592: variable "get_work0" is used before its value is set
RTE_SET_USED(get_work0);
^
.../drivers/event/octeontx/ssovf_worker.c(213):
error #592: variable "get_work1" is used before its value is set
RTE_SET_USED(get_work1);
^
For x86 these variables set but not used, move macros below
where values assigned.
Fixes:
f61808eaa9ad ("event/octeontx: add start function")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Wed, 5 Apr 2017 15:03:12 +0000 (16:03 +0100)]
ring: fix build with icc
build error:
In file included from .../lib/librte_ring/rte_ring.c(90):
.../lib/librte_ring/rte_ring.h(162):
error #1366: a reduction in alignment without the "packed" attribute
is ignored
} __rte_cache_aligned;
^
Alignment attribute moved to first element of the struct
Fixes:
a6619414e0a9 ("ring: make struct and macros type agnostic")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reshma Pattan [Thu, 30 Mar 2017 21:01:02 +0000 (22:01 +0100)]
app/testpmd: add latency statistics calculation
This patch adds latency stats commandline argument to testpmd,
allowing to specify the lcore to use for latencystats updates.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reshma Pattan [Thu, 30 Mar 2017 21:01:01 +0000 (22:01 +0100)]
latency: added new library for latency stats
Add a library designed to calculate latency statistics and report them
to the application when queried. The library measures minimum, average and
maximum latencies, and jitter in nano seconds. The current implementation
supports global latency stats, i.e. per application stats.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Remy Horton [Thu, 30 Mar 2017 21:01:00 +0000 (22:01 +0100)]
app/testpmd: add bitrate statistics calculation
Calculate bitrate statistics using the bitrate stats library. The
resulting statistics can be viewed via proc_info.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Remy Horton [Thu, 30 Mar 2017 21:00:59 +0000 (22:00 +0100)]
bitrate: add bitrate statistics library
This patch adds a library that calculates peak and average data-rate
statistics. For ethernet devices. These statistics are reported using
the metrics library.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reshma Pattan [Thu, 30 Mar 2017 21:00:58 +0000 (22:00 +0100)]
app/proc_info: add metrics displaying
Modify the dpdk-procinfo process to display the newly added metrics.
Added new command line option "--metrics" to display metrics.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
Remy Horton [Thu, 30 Mar 2017 21:00:57 +0000 (22:00 +0100)]
metrics: add information metrics library
This patch adds a new information metrics library. This Metrics
library implements a mechanism by which producers can publish
numeric information for later querying by consumers. Metrics
themselves are statistics that are not generated by PMDs, and
hence are not reported via ethdev extended statistics.
Metric information is populated using a push model, where
producers update the values contained within the metric
library by calling an update function on the relevant metrics.
Consumers receive metric information by querying the central
metric data, which is held in shared memory.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Jens Freimann [Wed, 5 Apr 2017 12:28:33 +0000 (14:28 +0200)]
doc: add missing step in PVP reference benchmark howto
After we configure QEMU we also need to call 'make' to build the binary.
This step is currently missing in the description and this patch fixes
it.
Signed-off-by: Jens Freimann <jfreiman@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Wed, 5 Apr 2017 12:18:01 +0000 (14:18 +0200)]
doc: remove old deprecation notices
The ring and distributor reworks are done.
Fixes:
a6619414e0a9 ("ring: make struct and macros type agnostic")
Fixes:
775003ad2f96 ("distributor: add new burst-capable library")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Qi Zhang [Tue, 4 Apr 2017 02:33:08 +0000 (22:33 -0400)]
app/testpmd: add command to show/clear VF stats
Add two commands to show/clear VF stats
show vf stats <port_id> <vf_id>
clear vf stats <port_id> <vf_id>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:40 +0000 (18:40 +0200)]
net/i40e: use dynamic log type for control logs
This is an example of how a dynamic log type can be used in a
PMD.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:39 +0000 (18:40 +0200)]
app/testpmd: new command to dump log types
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:38 +0000 (18:40 +0200)]
app/test: new command to dump log types
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:37 +0000 (18:40 +0200)]
eal: deprecate log functions
Deprecate the following functions:
- rte_set_log_level(), replaced by rte_log_set_global_level()
- rte_get_log_level(), replaced by rte_log_get_global_level()
- rte_set_log_type(), replaced by rte_log_set_level()
- rte_get_log_type(), replaced by rte_log_get_level()
The new functions provide a better control of the per-type log level,
and have a better name prefix (rte_log_).
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:36 +0000 (18:40 +0200)]
eal: change specific log levels at startup
Example of use:
./app/test-pmd --log-level='pmd\.i40e.*,8'
This enables debug logs for all dynamic logs whose type starts with
'pmd.i40e'.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:35 +0000 (18:40 +0200)]
eal: change several log levels matching a regexp
Introduce a function to set the log level of several log types that
match a regular expression.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:34 +0000 (18:40 +0200)]
eal: dump registered log types
Introduce a function to dump the global level and the registered log
types.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:40:33 +0000 (18:40 +0200)]
eal: support dynamic log types
Introduce 2 new functions to support dynamic log types:
- rte_log_register(): register a log name, and return a log type id
- rte_log_set_level(): set the log level of a given log type
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Wed, 5 Apr 2017 10:00:53 +0000 (12:00 +0200)]
mbuf: bump library version
The reorganization of the mbuf structure induces an ABI breakage.
Bump the library version, and update the documentation accordingly.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:07 +0000 (18:28 +0200)]
mbuf: add a timestamp field
The field itself is not fully described yet, but this commit reserves
the room in the mbuf.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:06 +0000 (18:28 +0200)]
mbuf: move sequence number in second cache line
Move this field in the second cache line, since no driver use it
in Rx path. The freed space will be used by a timestamp in next
commit.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:05 +0000 (18:28 +0200)]
mbuf: use 2 bytes for port and nb segments
Change the size of m->port and m->nb_segs to 16 bits. It is now possible
to reference a port identifier larger than 256 and have a mbuf chain
larger than 256 segments.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Jerin Jacob [Tue, 4 Apr 2017 16:28:04 +0000 (18:28 +0200)]
mbuf: make rearm data address naturally aligned
To avoid multiple stores on fast path, Ethernet drivers
aggregate the writes to data_off, refcnt, nb_segs and port
to an uint64_t data and write the data in one shot
with uint64_t* at &mbuf->rearm_data address.
Some of the non-IA platforms have store operation overhead
if the store address is not naturally aligned.This patch
fixes the performance issue on those targets.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:03 +0000 (18:28 +0200)]
drivers/net: do not touch mbuf next or nb segs on Rx
Now that the m->next pointer and m->nb_segs is expected to be set (to
NULL and 1 respectively) after a mempool_get(), we can avoid to write them
in the Rx functions of drivers.
Only some drivers are patched, it's not an exhaustive patch. It gives
the idea to do the same in other drivers.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:02 +0000 (18:28 +0200)]
mbuf: set mbuf fields while in pool
Set the value of m->refcnt to 1, m->nb_segs to 1 and m->next
to NULL when the mbuf is stored inside the mempool (unused).
This is done in rte_pktmbuf_prefree_seg(), before freeing or
recycling a mbuf.
Before this patch, the value of m->refcnt was expected to be 0
while in pool.
The objectives are:
- to avoid drivers to set m->next to NULL in the early Rx path, since
this field is in the second 64B of the mbuf and its access could
trigger a cache miss
- rationalize the behavior of raw_alloc/raw_free: one is now the
symmetric of the other, and refcnt is never changed in these functions.
To optimize the freeing of the segments, we try try to only update
m->refcnt, m->next, and m->nb_segs when it's required (idea from
Konstantin Ananyev <konstantin.ananyev@intel.com>).
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:01 +0000 (18:28 +0200)]
mbuf: make raw free function public
Rename __rte_mbuf_raw_free() as rte_mbuf_raw_free() and make
it public. The old function is kept for compat but is marked as
deprecated.
The next commit changes the behavior of rte_mbuf_raw_free() to
make it more consistent with rte_mbuf_raw_alloc().
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 4 Apr 2017 16:28:00 +0000 (18:28 +0200)]
mbuf: make segment prefree function public
Document the function and make it public, since it is used at several
places in the drivers. The old one is marked as deprecated.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Jerin Jacob [Fri, 31 Mar 2017 15:00:41 +0000 (20:30 +0530)]
doc: add Cavium OCTEONTX eventdev PMD to release notes
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:21 +0000 (22:58 +0530)]
doc: add OCTEONTX ssovf details
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:20 +0000 (22:58 +0530)]
test/eventdev: add remaining tests based on existing helpers
Add the following tests based existing helper functions
- Queue based producer-consumer ingress order test
- Run existing queue and flow based ordering test in dequeue timeout
mode
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:19 +0000 (22:58 +0530)]
test/eventdev: add octeontx producer-consumer based order
Add flow based producer-consumer based ingress order test
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:18 +0000 (22:58 +0530)]
test/eventdev: add octeontx queue and flow based max stage
Add queue and flow based pipeline test with maximum number of
stages available in the device.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:17 +0000 (22:58 +0530)]
test/eventdev: add octeontx queue based max stage
Add queue based pipeline test with maximum number of stages available
in the device.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:16 +0000 (22:58 +0530)]
test/eventdev: add octeontx flow based max stage
Add flow based pipeline test with maximum number of stages available
in the device.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:15 +0000 (22:58 +0530)]
test/eventdev: add octeontx queue based two stage sched
Add queue based two stage pipeline test with all combination
of schedule types.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:14 +0000 (22:58 +0530)]
test/eventdev: add octeontx flow based two stage sched
Add flow based two stage pipeline test with all combination
of schedule types.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:13 +0000 (22:58 +0530)]
test/eventdev: add octeontx multi link establishment
Add unit test case to verify queue to port multi link
establishment operation.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:12 +0000 (22:58 +0530)]
test/eventdev: add octeontx single link establishment
Add test case to verify queue to port single link establishment operation.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:11 +0000 (22:58 +0530)]
test/eventdev: add octeontx multi queue and multi port
Add unit test case to verify multi queue enqueue and multi core/port
dequeue operation.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:09 +0000 (22:58 +0530)]
test/eventdev: add octeontx priority test
Added unit test case to verify the priority associated with
each event queue available in the device.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:08 +0000 (22:58 +0530)]
test/eventdev: add octeontx multi queue enq/deq tests
Added unit test case to verify enqueue and dequeue operations
with multiple queues and a single port.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Tue, 4 Apr 2017 15:12:41 +0000 (20:42 +0530)]
test/eventdev: add octeontx simple enq/deq tests
Added unit test case to verify simple event enqueue and dequeue
operation with different schedule types
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:04 +0000 (22:58 +0530)]
test/eventdev: add octeontx unit test infrastructure
add test setup and teardown routines.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:03 +0000 (22:58 +0530)]
event/octeontx: add stop and close functions
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:02 +0000 (22:58 +0530)]
event/octeontx: add start function
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:01 +0000 (22:58 +0530)]
event/octeontx: support worker dequeue
If device is configured with RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT
configuration then use different fast path dequeue handler to wait till
requested amount of nanosecond if the event is not available.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Fri, 3 Mar 2017 17:28:00 +0000 (22:58 +0530)]
event/octeontx: support worker enqueue
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:59 +0000 (22:57 +0530)]
event/octeontx: add SSO HW device operations
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:58 +0000 (22:57 +0530)]
event/octeontx: add dump function for easier debugging
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:57 +0000 (22:57 +0530)]
event/octeontx: support dequeue timeout tick conversion
SSO co-processor runs at a different frequency than core clock.
Request PF to convert the ns to SSO get_work timeout period.
On dequeue, If device is configured with
RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT configuration then
use different fast path dequeue handler to wait till requested
amount of nanosecond if the event is not available.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:56 +0000 (22:57 +0530)]
event/octeontx: support linking queues to ports
queues to port link and unlink establishment is through
setting/resetting the queue/group membership in
SSOW_VHWS_GRPMSK_CHGX
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:55 +0000 (22:57 +0530)]
event/octeontx: support event ports
Add in the data-structures for the ports used by workers
to sent events to/from the HW scheduler. Also add a
function to release the resource allocated in setup
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:54 +0000 (22:57 +0530)]
event/octeontx: support event queues
Pretty much everything done in HW. Need to configure
the priority associated with event queue aka sso group
through a mailbox request to PF
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:53 +0000 (22:57 +0530)]
event/octeontx: add configure function
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:52 +0000 (22:57 +0530)]
event/octeontx: add device capabilities function
Add the info_get function to return details on the queues, flow,
prioritization capabilities, etc. which this device has.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:51 +0000 (22:57 +0530)]
event/octeontx: add octeontx eventdev driver
This adds the minimal changes to allow a octeontx eventdev
implementation to be compiled, linked and created at run time.
The eventdev does nothing, but can be created via vdev
on command line, e.g.
sudo ./build/app/test -c 0xff00 --vdev=event_octeontx
...
Initializing event_octeontx domain=4 max_queues=64 max_ports=32
RTE>>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:50 +0000 (22:57 +0530)]
event/octeontx: add mailbox support
ssovf VF device has mailbox mechanism to communicate
with PF device. This patch adds support for a mbox API to
send the mailbox request to PF device.
The ssovf VF device will be used as the communication channel
to talk to PF devices of all the network accelerated
co-processors in Octeontx. Exposing as shared function to
use it from pool, crypto, network devices.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:49 +0000 (22:57 +0530)]
event/octeontx: add vdev interface functions
ssovf and ssowvf PCIe VF devices are shared
between eventdev PMD and ethdev PMD. This patch
expose a set of interface API to get info
about probed ssovf and ssowvf VF resources to use
with eventdev and ethdev vdev devices latter.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:48 +0000 (22:57 +0530)]
event/octeontx: probe ssowvf pcie devices
An event device consists of event queues and event ports.
On Octeontx HW, each event queues(sso group/ssovf) and
event ports(sso hws/ssowvf) are enumerated as separate
SRIOV VF PCIe device. In order to expose as an event device,
On PCIe probe, the driver stores the information associated
with the PCIe device and later with vdev infrastructure
creates event device with earlier probed PCIe VF devices.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:47 +0000 (22:57 +0530)]
event/octeontx: probe ssovf pcie devices
An event device consists of event queues and event ports.
On Octeontx HW, each event queues(sso group/ssovf) and
event ports(sso hws/ssowvf) are enumerated as separate
SRIOV VF PCIe device. In order to expose as an event device,
On PCIe probe, the driver stores the information associated
with the PCIe device and later with vdev infrastructure
creates event device with earlier probed PCIe VF devices.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:46 +0000 (22:57 +0530)]
event/octeontx: add build and log infrastructure
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Harry van Haaren [Sat, 1 Apr 2017 10:41:16 +0000 (16:11 +0530)]
maintainers: add eventdev section and claim SW PMD
Add a section for the eventdev PMDs, and note the next-tree.
Claim maintainership of the software eventdev PMD.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:49 +0000 (20:30 +0100)]
doc: add SW eventdev PMD to release notes
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:48 +0000 (20:30 +0100)]
doc: add event device and software eventdev
This commit adds a section to the docs listing the event
device PMDs available.
It then adds the software eventdev PMD to the listed event
devices.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:47 +0000 (20:30 +0100)]
test/eventdev: add SW deadlock tests
This commit adds the worker loopback test to verify
that the deadlock avoidance scheme is functioning, and
a holb (head-of-line-blocking) test to ensure the head
of line blocking avoidance is correct.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:46 +0000 (20:30 +0100)]
test/eventdev: add SW xstats tests
This commit introduces xstats tests for statistics
and reset functionality.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:45 +0000 (20:30 +0100)]
test/eventdev: add SW tests for load balancing
This commit adds various tests for load-balancing and
queue prioritization.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:44 +0000 (20:30 +0100)]
test/eventdev: add basic SW tests
This commit adds basic enqueue and dequeue unit tests,
some negative invalid tests, and configuration.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:43 +0000 (20:30 +0100)]
test/eventdev: add SW test infrastructure
Add the test infrastructure, create and destroy the test
instance.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:42 +0000 (20:30 +0100)]
event/sw: support xstats
Add support for xstats to report out on the state of the eventdev.
Useful for debugging and for unit tests, as well as observability
at runtime and performance tuning of apps to work well with the
scheduler.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:41 +0000 (20:30 +0100)]
event/sw: add dump function for easier debugging
Segfault issue resolved when only partially configured and
rte_event_dev_dump() is called before start(),
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:40 +0000 (20:30 +0100)]
event/sw: add start stop and close functions
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:39 +0000 (20:30 +0100)]
event/sw: add scheduling logic
Add in the scheduling function which takes the events from the
producer queues and buffers them before scheduling them to consumer
queues. The scheduling logic includes support for atomic, reordered,
and parallel scheduling of flows.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:38 +0000 (20:30 +0100)]
event/sw: add worker core functions
add the event enqueue, dequeue and release functions to the eventdev.
These also include tracking of stats for observability in the load of
the scheduler.
Internally in the enqueue function, the various types of enqueue
operations, to forward an existing event, to send a new event, to
drop a previous event, are converted to a series of flags which will
be used by the scheduler code to perform the needed actions for that
event.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:37 +0000 (20:30 +0100)]
event/sw: support linking queues to ports
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:36 +0000 (20:30 +0100)]
event/sw: support event ports
Add in the data-structures for the ports used by workers to send
packets to/from the scheduler. Also add in the functions to
create/destroy those ports.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:35 +0000 (20:30 +0100)]
event/sw: support event queues
Add in the data structures for the event queues, and the eventdev
functions to create and destroy those queues.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:34 +0000 (20:30 +0100)]
event/sw: return default port/queue config
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:33 +0000 (20:30 +0100)]
event/sw: add configure function
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:32 +0000 (20:30 +0100)]
event/sw: add device capabilities function
Add in the info_get function to return details on the queues, flow,
prioritization capabilities, etc. that this device has.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Thu, 30 Mar 2017 19:30:31 +0000 (20:30 +0100)]
event/sw: add new software-only eventdev driver
This adds the minimal changes to allow a SW eventdev implementation to
be compiled, linked and created at run time. The eventdev does nothing,
but can be created via vdev on commandline, e.g.
sudo ./x86_64-native-linuxapp-gcc/app/test --vdev=event_sw0
...
PMD: Creating eventdev sw device event_sw0, numa_node=0, sched_quanta=128
RTE>>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:30 +0000 (20:30 +0100)]
test/eventdev: pass timeout ticks unsupported
This commit reworks the return value handling of the
timeout ticks test. This feature is not mandatory for
a pmd, the eventdev layer returns -ENOTSUP if the PMD
doesn't implement the function.
The test is modified to check if the return value is
-ENOTSUP, and return -ENOTSUP to the test framework,
which can handle "unsupported" tests since patch[1].
As such, this test will function correctly if the
patchset linked below is applied, it fails if the
patch is not applied and the PMD doesn't the timeout
ticks function.
Note it does not depend (as a compile time dependency)
on the patchset linked below.
[1] http://dpdk.org/dev/patchwork/patch/21979/
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Thu, 30 Mar 2017 19:30:29 +0000 (20:30 +0100)]
eventdev: improve docs of start function
This commit documents two error return values for the
rte_event_dev_start() function.
-ESTALE indicates not all ports are configured
-ENOLINK indicates that not all queues are linked to ports. If an
application enqueues to such a queue it can lead to deadlock
Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 31 Mar 2017 14:20:29 +0000 (19:50 +0530)]
doc: add eventdev library to release notes
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Gage Eads [Mon, 3 Apr 2017 12:35:51 +0000 (18:05 +0530)]
eventdev: add errno-style return values
This commit adds rte_errno return values to rte_event_enqueue_burst() and
rte_event_dequeue_burst().
These return values allows user software to differentiate between an
invalid argument (such as an invalid queue_id or sched_type in an enqueued
event) and backpressure from the event device.
The port and device ID checks are placed in RTE_LIBRTE_EVENTDEV_DEBUG
header guards to avoid the performance hit in non-debug execution.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Bruce Richardson [Fri, 10 Mar 2017 19:43:19 +0000 (19:43 +0000)]
eventdev: add extended stats
Add in APIs for extended stats so that eventdev implementations can report
out information on their internal state. The APIs are based on, but not
identical to, the equivalent ethdev functions.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Fri, 10 Mar 2017 19:43:17 +0000 (19:43 +0000)]
test/eventdev: link all queues before start
The software eventdev can lock-up if not all queues are
linked to a port. For this reason, the software evendev
fails to start if queues are not linked to anything.
This commit creates dummy links from all queues to port
0 in the eventdev setup function and start/stop test,
which would otherwise fail due to unlinked queues.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Fri, 10 Mar 2017 15:19:15 +0000 (15:19 +0000)]
eventdev: remove default queue overriding
PMDs that only do a specific type of scheduling cannot provide
CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
that every PMD supports CFG_ALL_TYPES.
By not overriding the default configuration of the queue as
suggested by the PMD, the eventdev_common unit tests can pass
on all PMDs, regardless of their capabilities.
RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
it can be removed now. Applications should use CFG_ALL_TYPES
if they require enqueue of all types a queue, or specify which
type of queue they require.
The CFG_DEFAULT value is changed to CFG_ALL_TYPES in event/skeleton,
to not break the compile.
A capability flag is added that indicates if the underlying PMD
supports creating queues of ALL_TYPES.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:44 +0000 (22:57 +0530)]
test/eventdev: fix reconfigure values
Minimum value of nb_event_ports and/or nb_event_queues
should be one before reconfiguring the event device.
Fixes:
f8f9d233ea0e ("test/eventdev: add unit tests")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jerin Jacob [Fri, 3 Mar 2017 17:27:43 +0000 (22:57 +0530)]
eventdev: return code in dequeue timeout conversion
eventdev driver may return error on dequeue timeout tick conversion.
Change the pmd callback interface to address the same.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Gage Eads [Mon, 3 Apr 2017 12:35:50 +0000 (18:05 +0530)]
eventdev: fix links map initialization for SW PMD
This patch initializes the links_map array entries to
EVENT_QUEUE_SERVICE_PRIORITY_INVALID, as expected by
rte_event_port_links_get(). This is necessary for the sw eventdev PMD,
which does not initialize links_map when rte_event_port_setup() calls
rte_event_port_unlink().
Fixes:
4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nipun Gupta [Fri, 3 Mar 2017 15:33:02 +0000 (21:03 +0530)]
eventdev: use generic device holder
rte_device is a generic device which is available to the applications
and EAL. This patch replaces rte_pci_device in 'struct rte_eventdev'
and in 'struct rte_event_dev_info' with common rte_device.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Harry van Haaren [Wed, 8 Mar 2017 10:35:34 +0000 (10:35 +0000)]
eventdev: improve API doc for timeout ticks
Improve the documentation of the return values of the
rte_event_dequeue_timeout_ticks() function, adding a
-ENOTSUP value for eventdevs that do not support waiting.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Fri, 10 Mar 2017 19:43:16 +0000 (19:43 +0000)]
eventdev: increase size of enq/deq conf variables
Large port enqueue sizes were not supported as the value
it was stored in was a uint8_t. Using uint8_ts to save
space in config apis makes no sense - increasing the 3
instances of uint8_t enqueue / dequeue depths to more
appropriate values (based on the context around them).
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>