dpdk.git
6 years agoevent/sw: simplify credit scheme
Gage Eads [Mon, 11 Dec 2017 17:56:32 +0000 (11:56 -0600)]
event/sw: simplify credit scheme

This commit modifies the sw PMD credit scheme such that credits are
consumed when enqueueing a NEW event and released when an event is
released -- typically, the beginning and end of a pipeline. Workers that
simply forward events do not interact with the credit pool.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agoeventdev: add implicit release disable capability
Gage Eads [Mon, 11 Dec 2017 17:56:31 +0000 (11:56 -0600)]
eventdev: add implicit release disable capability

This commit introduces a capability for disabling the "implicit" release
functionality for a port, which prevents the eventdev PMD from issuing
outstanding releases for previously dequeued events when dequeuing a new
batch of events.

If a PMD does not support this capability, the application will receive an
error if it attempts to setup a port with implicit releases disabled.
Otherwise, if the port is configured with implicit releases disabled, the
application must release each dequeued event by invoking
rte_event_enqueue_burst() with RTE_EVENT_OP_RELEASE or
RTE_EVENT_OP_FORWARD.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agoevent/sw: use dynamically-sized IQs
Gage Eads [Thu, 30 Nov 2017 03:08:34 +0000 (21:08 -0600)]
event/sw: use dynamically-sized IQs

This commit introduces dynamically-sized IQs, by switching the underlying
data structure from a fixed-size ring to a linked list of queue 'chunks.'
This has a number of benefits:
- Certain corner cases were observed in which all of a pipeline's flows
  could be pinned to one port for extended periods, effectively turning a
  multi-core pipeline into single-core one. This was caused by an event
  producer having a larger new_event_threshold than the IQ depth, and
  injecting large numbers of packets that are ultimately backpressured in a
  worker's rx_ring, causing those packets' flows to be scheduled to that
  port.
  The dynamically sized IQ does not have this problem because each IQ can
  grow large enough to store all the system's events, such that
  backpressure will not reach the worker_ring.
- Slight performance improvement (~1-2%) in high throughput scenarios,
  tested with eventdev_pipeline_sw_pmd.

This implementation has a small increase in the queue storage memory
footprint (~70KB). This commit also removes the iq_size xstat, which no
longer applies to this implementation.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agoevent/sw: fix queue memory leak and multi-link bug
Gage Eads [Thu, 30 Nov 2017 03:08:33 +0000 (21:08 -0600)]
event/sw: fix queue memory leak and multi-link bug

This commit reinitializes a queue before it is reconfigured, such that
reorder buffer memory is not leaked.

This bug masked a few other problems, which this commit corrects as well:
- sw_port_link() allowed a port to link to a queue twice, such that the
  port could then successfully unlink the queue twice. Now the link
  function checks whether a port is already linked to the queue, and if so
  returns success but doesn't assign the a port a second slot in the
  queue's cq map.
- test_eventdev.c's test_eventdev_unlink() was unlinking a queue twice
  from the same port, and expecting the second unlink to succeed. Now the
  test unlinks, links, then unlinks again.
- test_eventdev.c's test_eventdev_link_get() was linking a single queue but
  expecting the unlink function to return nb_queues (where nb_queues > 1).
  The test now checks for a return value of 1.

Fixes: 5ffb2f142d95 ("event/sw: support event queues")
Fixes: 371a688fc159 ("event/sw: support linking queues to ports")
Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agotest/eventdev: use CPU event type
Jerin Jacob [Mon, 4 Dec 2017 08:11:18 +0000 (13:41 +0530)]
test/eventdev: use CPU event type

octeontx test application was using non RTE_EVENT_TYPE_CPU
event type to generate the event from CPU.  Upon the introduction
of ethdev Rx adapter, RTE_EVENT_TYPE_ETHDEV has special
meaning. So avoid using non RTE_EVENT_TYPE_CPU event types
to inject events from CPU.

Fixes: d0d654986018 ("net/octeontx: support event Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
6 years agoeventdev: set error code in port link/unlink functions
Gage Eads [Tue, 14 Nov 2017 22:44:10 +0000 (16:44 -0600)]
eventdev: set error code in port link/unlink functions

The return value for rte_event_port_{link, unlink}() is defined as the
"number of {links, unlinks} actually established." However, the eventdev
layer's error checking returns negative error values. This commit aligns
the eventdev code with the API definition by having it set rte_errno and
return 0 if it detects an error.

Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
6 years agoexamples/bbdev: add sample app
Amr Mokhtar [Thu, 11 Jan 2018 19:23:22 +0000 (19:23 +0000)]
examples/bbdev: add sample app

- sample application performing a loop-back over ethernet using
 a bbbdev device
- 'turbo_sw' PMD must be enabled for the app to be functional
- a packet is received on an ethdev port -> enqueued for baseband
 encode operation -> dequeued -> enqueued for baseband decode
 operation-> dequeued -> compared with original signal -> looped-back
 to the ethdev port

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoapp/testbbdev: add test application for bbdev
Amr Mokhtar [Thu, 11 Jan 2018 19:23:21 +0000 (19:23 +0000)]
app/testbbdev: add test application for bbdev

- full test suite for bbdev
- test App works seamlessly on all PMDs registered with bbdev
 framework
- a python script is provided to make our life easier
- supports execution of tests by parsing Test Vector files
- test Vectors can be added/deleted/modified with no need for
 re-compilation
- various tests can be executed:
 (a) Throughput test
 (b) Offload latency test
 (c) Operation latency test
 (d) Validation test
 (c) Sanity checks

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobb/turbo_sw: add software turbo driver
Amr Mokhtar [Thu, 11 Jan 2018 19:23:20 +0000 (19:23 +0000)]
bb/turbo_sw: add software turbo driver

- bbdev 'turbo_sw' is the software accelerated version of 3GPP L1
 Turbo coding operation using the optimized Intel FlexRAN SDK libraries.
- 'turbo_sw' pmd is disabled by default

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobb/null: add null base band device driver
Amr Mokhtar [Thu, 11 Jan 2018 19:23:19 +0000 (19:23 +0000)]
bb/null: add null base band device driver

- 'bbdev_null' is a basic pmd that performs a minimalistic
 bbdev operation
- useful for bbdev smoke testing and in measuring the overhead
 introduced by the bbdev library
- 'bbdev_null' pmd is enabled by default

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobbdev: introduce wireless base band device lib
Amr Mokhtar [Thu, 11 Jan 2018 19:23:18 +0000 (19:23 +0000)]
bbdev: introduce wireless base band device lib

- wireless baseband device (bbdev) library files
- bbdev is tagged as EXPERIMENTAL
- Makefiles and configuration macros definition
- bbdev library is enabled by default
- release notes of the initial version

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agomember: fix memory leak on error
Anatoly Burakov [Fri, 12 Jan 2018 17:23:16 +0000 (17:23 +0000)]
member: fix memory leak on error

rte_member may have allocated a tailq entry or setum before failure,
so free them.

Fixes: 857ed6c68cf2 ("member: implement main API")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
6 years agomempool/octeontx: fix natural alignment being optimized out
Pavan Nikhilesh [Thu, 18 Jan 2018 13:44:33 +0000 (19:14 +0530)]
mempool/octeontx: fix natural alignment being optimized out

The mbox messages are naturally aligned and in some cases compiler
optimization might disregard natural alignment.
Use volatile key word to force compiler to disable optimizing and
maintain alignment.

Fixes: aecb8e093b52 ("event/octeontx: introduce specialized mbox message copy")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agomempool/dpaa: optimize phy to virt conversion
Hemant Agrawal [Wed, 17 Jan 2018 08:51:32 +0000 (14:21 +0530)]
mempool/dpaa: optimize phy to virt conversion

If the allocation is from a single memzone, optimize
the phy-virt address conversions.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agombuf: fix performance of freeing with non atomic refcnt
Olivier Matz [Fri, 8 Dec 2017 15:46:51 +0000 (16:46 +0100)]
mbuf: fix performance of freeing with non atomic refcnt

When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference
counter uses an atomic operation. This is not necessary and impacts
the performance (seen with TRex traffic generator).

We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update()
because it would add an additional check.

Solves this by introducing __rte_mbuf_refcnt_update(), which
updates the reference counter without doing anything else.

Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool")
Cc: stable@dpdk.org
Suggested-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
6 years agotest/flow_classify: fix build warning
Jasvinder Singh [Thu, 18 Jan 2018 15:18:14 +0000 (15:18 +0000)]
test/flow_classify: fix build warning

Move all static variables defined in header file to c file.

error log: /usr/bin/ld: Warning: size of symbol 'count' changed
  from 8 in test_pmd_perf.o to 24 in test_flow_classify.o

Fixes: 50bdac5916d9 ("flow_classify: remove table id parameter from API")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agotest/mempool_perf: improve default mempool ops selection
Jerin Jacob [Sun, 19 Nov 2017 04:55:31 +0000 (10:25 +0530)]
test/mempool_perf: improve default mempool ops selection

Use of rte_eal_mbuf_default_mempool_ops() API will
allow to override pool handler through "--mbuf-pool-ops-name"
eal command line argument.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agotest/mempool: improve default mempool ops selection
Jerin Jacob [Tue, 9 Jan 2018 15:57:08 +0000 (21:27 +0530)]
test/mempool: improve default mempool ops selection

Use of rte_eal_mbuf_default_mempool_ops() API will
allow to override pool handler through "--mbuf-pool-ops-name"
eal command line argument.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agotest/flow_classify: remove port bound requirement
Bernard Iremonger [Thu, 4 Jan 2018 10:39:46 +0000 (10:39 +0000)]
test/flow_classify: remove port bound requirement

Remove the requirement to have a port bound to igb_uio in
order to run this test suite.

Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
Cc: stable@dpdk.org
Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agotest/memzone: fix freeing test
Phil Yang [Mon, 15 Jan 2018 05:43:33 +0000 (13:43 +0800)]
test/memzone: fix freeing test

When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the
counter's memory and lead to mz[] memory cannot be freed.

Fixd by extend to mz[RTE_MAX_MEMZONE + 1].

Fixes: ff909fe21f0a ("mem: introduce memzone freeing")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest/memzone: fix NULL freeing
Phil Yang [Mon, 15 Jan 2018 05:43:32 +0000 (13:43 +0800)]
test/memzone: fix NULL freeing

No need to free a NULL memzone. It will cause test
termination.

Fixes: 71330483a193 ("test/memzone: fix memory leak")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest/memzone: fix wrong test
Anatoly Burakov [Thu, 21 Dec 2017 18:19:44 +0000 (18:19 +0000)]
test/memzone: fix wrong test

When reserving memzones in autotest, it makes no sense to expect a
failed memzone reserve when we specify both size flags - instead,
we should expect a memzone reserved with one of the two sizes.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest/memzone: fix copy-paste typo
Anatoly Burakov [Thu, 21 Dec 2017 18:19:43 +0000 (18:19 +0000)]
test/memzone: fix copy-paste typo

Fixes: b77b5639726e ("mem: add huge page sizes for IBM Power")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest/memzone: fix typo
Anatoly Burakov [Thu, 21 Dec 2017 18:19:42 +0000 (18:19 +0000)]
test/memzone: fix typo

Fixes: 71330483a193 ("test/memzone: fix memory leak")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
6 years agotest/table: fix uninitialized parameter
Anatoly Burakov [Thu, 21 Dec 2017 15:53:05 +0000 (15:53 +0000)]
test/table: fix uninitialized parameter

delete_bulk() copies metadata to pointers provided by the entries
parameter, but in the unit test, they are uninitialized, leading
to rte_table attempting to memcpy into random garbage pointers.

Memsetting pointer table to zero will prevent that from happening.

Fixes: 48f2543cf0a8 ("app/test: add bulk adding and deleting")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
6 years agotest: add malloc stats dump command
Anatoly Burakov [Fri, 22 Dec 2017 09:51:00 +0000 (09:51 +0000)]
test: add malloc stats dump command

This can be useful for checking if an autotest leaks memory after
its execution.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agotest: register test as failed if setup failed
Anatoly Burakov [Fri, 22 Dec 2017 10:21:51 +0000 (10:21 +0000)]
test: register test as failed if setup failed

If test set up couldn't be completed, the test was previously
shown as succeeding, even though setup failed. Fix this to report
test as failed, and count all tests that should've been executed,
as failed as well.

Fixes: ffac67b1f71b ("app/test: new assert macros and test suite runner")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
6 years agotest/crypto: use skipped return result
Harry van Haaren [Thu, 11 Jan 2018 17:50:35 +0000 (17:50 +0000)]
test/crypto: use skipped return result

The cryptodev tests are updated to return SKIPPED instead
of failing if the PMD is not enabled, allowing test
infrastructure to identify that the test was not able to run.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest: add skipped return result
Harry van Haaren [Thu, 11 Jan 2018 17:50:34 +0000 (17:50 +0000)]
test: add skipped return result

This commit allows a test to return "skipped", indicating
that it cannot be run. This is useful for PMDs which have
not been compiled due to the unavailability of dependencies,
or their explicit disabling in the build configuration.

The result printing is updated to correctly indicate if a
test has been skipped.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest: use env variable to run tests
Harry van Haaren [Thu, 11 Jan 2018 17:50:33 +0000 (17:50 +0000)]
test: use env variable to run tests

With this patch the test binary checks the DPDK_TEST
environment variable and if set, the contents of the var
are inserted on the test app command line, and run.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: announce ABI change for ring structure
Olivier Matz [Mon, 11 Sep 2017 13:39:13 +0000 (15:39 +0200)]
doc: announce ABI change for ring structure

As discussed on the mailing list, the alignment constraint of
the ring structure can be relaxed.

Link: http://dpdk.org/dev/patchwork/patch/25039
Link: http://dpdk.org/dev/patchwork/patch/26103
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agoapp/procinfo: add compilation option in config
Anatoly Burakov [Fri, 12 Jan 2018 18:27:29 +0000 (18:27 +0000)]
app/procinfo: add compilation option in config

Unlike every other DPDK application's compilation, proc_info's
compilation cannot be turned off on Linux. Fix it by adding a
config option to base linuxapp config.

Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agoapp/testpmd: fix invalid Tx queue number setting
Wei Dai [Fri, 12 Jan 2018 11:31:22 +0000 (19:31 +0800)]
app/testpmd: fix invalid Tx queue number setting

If an invalid number of TX queues is configured from testpmd run-time
command like "port config all txq number" or from --txq in the command
to start testpmd, the global variable nb_txq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid txq setting and keeps its last correct value.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
6 years agoapp/testpmd: fix invalid Rx queue number setting
Wei Dai [Fri, 12 Jan 2018 11:31:21 +0000 (19:31 +0800)]
app/testpmd: fix invalid Rx queue number setting

If an invalid number of RX queues is configured from testpmd run-time
command like "port config all rxq number" or from --rxq in the command
to start testpmd, the global variable nb_rxq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid rxq setting and keeps its last correct value.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
6 years agopdump: fix error check when creating/canceling thread
Olivier Matz [Fri, 8 Dec 2017 10:20:13 +0000 (11:20 +0100)]
pdump: fix error check when creating/canceling thread

On error, pthread_create() returns a positive number (an errno)
but does not set the errno variable.

Fixes: 278f945402c5 ("pdump: add new library for packet capture")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agovfio: fix FreeBSD build
Moti Haimovsky [Wed, 17 Jan 2018 17:24:15 +0000 (19:24 +0200)]
vfio: fix FreeBSD build

This patch fixes the following compilation errors in bsdapp

lib/librte_eal/bsdapp/eal/eal.c:782:5:
error: no previous prototype for function 'rte_vfio_clear_group'
int rte_vfio_clear_group(int vfio_group_fd)
    ^

lib/librte_eal/bsdapp/eal/eal.c:782:30:
error: unused parameter 'vfio_group_fd'
int rte_vfio_clear_group(int vfio_group_fd)
                             ^

Fixes: c564a2a20093 ("vfio: expose clear group function for internal usages")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
6 years agolog: remove log level config option
Pavan Nikhilesh [Sat, 9 Dec 2017 13:23:58 +0000 (18:53 +0530)]
log: remove log level config option

Remove RTE_LOG_LEVEL config option, use existing RTE_LOG_DP_LEVEL config
option for controlling datapath log level.
RTE_LOG_LEVEL is no longer needed as dynamic logging can be used to
control global and module specific log levels.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
6 years agolog: update default log levels
Pavan Nikhilesh [Sat, 9 Dec 2017 13:23:57 +0000 (18:53 +0530)]
log: update default log levels

Use global default loglevel to DEBUG(8) and dynamic default loglevel
to INFO(7).

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
6 years agolog: update legacy modules dynamic logs regex
Pavan Nikhilesh [Sat, 9 Dec 2017 13:23:56 +0000 (18:53 +0530)]
log: update legacy modules dynamic logs regex

Update legacy log types regex strings used for registering dynamic logs.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
6 years agotest: add a testcase for dynamic logs
Olivier Matz [Fri, 8 Dec 2017 13:21:22 +0000 (14:21 +0100)]
test: add a testcase for dynamic logs

Update the logs test to also validate the dynamic log framework.
For now, also keep the old way using the static USER type.

Validated with:

   # build/app/test --no-huge
   ...
   RTE>>logs_autotest
   == dynamic log types
   error message
   critical message
   critical message
   error message
   == static log types
   TESTAPP1: error message
   TESTAPP1: critical message
   TESTAPP2: critical message
   TESTAPP1: error message
   Test OK

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
6 years agotest: rely on dynamic log level to display hexdumps
Olivier Matz [Fri, 8 Dec 2017 13:21:21 +0000 (14:21 +0100)]
test: rely on dynamic log level to display hexdumps

Instead of relying on a compile-time option, use the global log-level
to decide if the hexdumps should be displayed in the tests.

Valitation:

  # build/app/test --no-huge
  RTE>>crc_autotest
  Test OK

  # build/app/test --no-huge --log-level=8
  RTE>>crc_autotest
  [many hexdumps...]
  Test OK

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
6 years agoconfig: select maximum VFIO groups on ThunderX
Pavan Nikhilesh [Fri, 29 Dec 2017 07:58:56 +0000 (13:28 +0530)]
config: select maximum VFIO groups on ThunderX

Increase the max vfio groups to 128.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
6 years agovfio: make groups max configurable
Pavan Nikhilesh [Fri, 29 Dec 2017 07:58:55 +0000 (13:28 +0530)]
vfio: make groups max configurable

Make max vfio groups compile-time configurable so that platforms can
choose vfio group limit.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agobus/fslmc: clear the vfio group on error
Hemant Agrawal [Mon, 15 Jan 2018 05:11:26 +0000 (10:41 +0530)]
bus/fslmc: clear the vfio group on error

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agovfio: expose clear group function for internal usages
Hemant Agrawal [Mon, 15 Jan 2018 05:11:25 +0000 (10:41 +0530)]
vfio: expose clear group function for internal usages

other vfio based module e.g. fslmc will also need to use
the clear_group call.
So, exposing it and renaming it to *rte_vfio_clear_group*

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agoigb_uio: allow multi-process access
Xiao Wang [Mon, 1 Jan 2018 22:00:10 +0000 (14:00 -0800)]
igb_uio: allow multi-process access

In some case, one device are accessed by different processes via
different BARs, so one uio device may be opened by more than one
process, for this case we just need to enable interrupt once, and
pci_clear_master only when the last process closed.

Fixes: 5f6ff30dc507 ("igb_uio: fix interrupt enablement after FLR in VM")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agolib: fix missing includes in exported headers
Adrien Mazarguil [Thu, 21 Dec 2017 13:00:04 +0000 (14:00 +0100)]
lib: fix missing includes in exported headers

Many exported headers rely on definitions found in rte_config.h without
including it, as shown by the following command:

 grep -L '^#include <rte_config.h>' -- \
  $(grep -Rl \
    $(sed -n '/^#define \([^ ]\+\).*$/{s//\1/;H;};${x;s/\n//;s/\n/\\|/g;p;}' \
      build/include/rte_config.h) \
    -- build/include/)

We cannot assume external applications will include rte_config.h on their
own, neither directly nor through a -include parameter like DPDK does
internally.

This not only causes obvious compilation failures that can be reproduced
with check-includes.sh such as:

 [...]/rte_memory.h:88:43: error: â€˜RTE_CACHE_LINE_SIZE’ was not declared in
     this scope
  #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
                                            ^

It also results in less visible issues, for instance rte_hash_crc.h relying
on RTE_ARCH_X86_64's presence to provide dedicated inline functions.

This patch partially reverts the commit below and adds missing include
lines to the remaining files.

Fixes: f1a7a5c5f404 ("remove include of generated config header")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agomember: fix ISO C in exported header
Adrien Mazarguil [Thu, 21 Dec 2017 13:00:02 +0000 (14:00 +0100)]
member: fix ISO C in exported header

Reported by check-includes.sh:

 [...]/rte_member.h:107:40: error: ISO C does not permit named variadic
     macros [-Werror=variadic-macros]
  #define RTE_MEMBER_LOG(level, fmt, args...) \
                                         ^

Fixes: 857ed6c68cf2 ("member: implement main API")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agoflow_classify: fix ISO C in exported header
Adrien Mazarguil [Thu, 21 Dec 2017 12:59:59 +0000 (13:59 +0100)]
flow_classify: fix ISO C in exported header

Reported by check-includes.sh:

 [...]/rte_flow_classify.h:85:47: error: ISO C does not permit named
     variadic macros [-Werror=variadic-macros]
  #define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \
                                                ^

Fixes: be41ac2a330f ("flow_classify: introduce flow classify library")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agonet/i40e: fix ISO C in exported header
Adrien Mazarguil [Thu, 21 Dec 2017 12:59:57 +0000 (13:59 +0100)]
net/i40e: fix ISO C in exported header

Reported by check-includes.sh:

 [...]/rte_pmd_i40e.h:97:30: error: ISO C restricts enumerator values to
     range of `int' [-Werror=pedantic]
   RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF
                               ^

Fixes: edeab742edac ("net/i40e: get information about DDP profile")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agodevtools: update check-includes exceptions
Adrien Mazarguil [Thu, 21 Dec 2017 12:59:55 +0000 (13:59 +0100)]
devtools: update check-includes exceptions

rte_eal_interrupts.h is an internal file not supposed to be included
directly by applications.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/pcap: convert license headers to SPDX tags
Ferruh Yigit [Tue, 9 Jan 2018 13:13:48 +0000 (13:13 +0000)]
net/pcap: convert license headers to SPDX tags

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agoexamples/skeleton: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:38 +0000 (11:23 +0200)]
examples/skeleton: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/server_node_efd: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:37 +0000 (11:23 +0200)]
examples/server_node_efd: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/rxtx_callbacks: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:36 +0000 (11:23 +0200)]
examples/rxtx_callbacks: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/ptpclient: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:35 +0000 (11:23 +0200)]
examples/ptpclient: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/packet_ordering: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:34 +0000 (11:23 +0200)]
examples/packet_ordering: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/flow_filtering: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:33 +0000 (11:23 +0200)]
examples/flow_filtering: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/flow_classify: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:32 +0000 (11:23 +0200)]
examples/flow_classify: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/eventdev_pipeline: convert to new offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:31 +0000 (11:23 +0200)]
examples/eventdev_pipeline: convert to new offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/ethtool: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:30 +0000 (11:23 +0200)]
examples/ethtool: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/distributor: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:29 +0000 (11:23 +0200)]
examples/distributor: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/vm_power_manager: convert to new offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:28 +0000 (11:23 +0200)]
examples/vm_power_manager: convert to new offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/vmdq_dcb: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:27 +0000 (11:23 +0200)]
examples/vmdq_dcb: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/vmdq: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:26 +0000 (11:23 +0200)]
examples/vmdq: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/vhost: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:25 +0000 (11:23 +0200)]
examples/vhost: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/tep_termination: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:24 +0000 (11:23 +0200)]
examples/tep_termination: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/quota_watermark: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:23 +0000 (11:23 +0200)]
examples/quota_watermark: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/qos_sched: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:22 +0000 (11:23 +0200)]
examples/qos_sched: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/qos_meter: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:21 +0000 (11:23 +0200)]
examples/qos_meter: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/performance-thread: convert to new offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:20 +0000 (11:23 +0200)]
examples/performance-thread: convert to new offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/netmap_compat: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:19 +0000 (11:23 +0200)]
examples/netmap_compat: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/multi_process: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:18 +0000 (11:23 +0200)]
examples/multi_process: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/load_balancer: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:17 +0000 (11:23 +0200)]
examples/load_balancer: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/link_status_interrupt: convert to new offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:16 +0000 (11:23 +0200)]
examples/link_status_interrupt: convert to new offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/ipv4_multicast: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:15 +0000 (11:23 +0200)]
examples/ipv4_multicast: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/ipsec-secgw: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:14 +0000 (11:23 +0200)]
examples/ipsec-secgw: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agoexamples/ip_reassembly: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:13 +0000 (11:23 +0200)]
examples/ip_reassembly: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/ip_pipeline: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:12 +0000 (11:23 +0200)]
examples/ip_pipeline: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/ip_fragmentation: convert to new offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:11 +0000 (11:23 +0200)]
examples/ip_fragmentation: convert to new offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/kni: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:10 +0000 (11:23 +0200)]
examples/kni: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/exception_path: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:09 +0000 (11:23 +0200)]
examples/exception_path: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/bond: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:08 +0000 (11:23 +0200)]
examples/bond: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l3fwd-vf: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:07 +0000 (11:23 +0200)]
examples/l3fwd-vf: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l3fwd-power: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:06 +0000 (11:23 +0200)]
examples/l3fwd-power: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l3fwd-acl: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:05 +0000 (11:23 +0200)]
examples/l3fwd-acl: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l3fwd: convert to ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:04 +0000 (11:23 +0200)]
examples/l3fwd: convert to ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l2fwd-keepalive: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:03 +0000 (11:23 +0200)]
examples/l2fwd-keepalive: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l2fwd-jobstats: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:02 +0000 (11:23 +0200)]
examples/l2fwd-jobstats: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l2fwd-crypto: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:01 +0000 (11:23 +0200)]
examples/l2fwd-crypto: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/l2fwd: convert to new ethdev offloads API
Shahaf Shuler [Tue, 26 Dec 2017 09:23:00 +0000 (11:23 +0200)]
examples/l2fwd: convert to new ethdev offloads API

Ethdev offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agovhost: support Explicit Congestion Notification
Jiayu Hu [Wed, 22 Nov 2017 03:19:42 +0000 (11:19 +0800)]
vhost: support Explicit Congestion Notification

In virtio, Explicit Congestion Notification (ECN) includes two parts:
guest ECN and host ECN. Guest ECN means the frontend can handle TSO
packets which have ECN set, and host ECN means the backend can handle
TSO packets which have ECN set.

The ECN features are rarely used. However, virtio-net enables them by
default, and vhost-net support both. To make live migration from
vhost-net to vhost-user possible, this patch announces to support
guest and host ECN in vhost-user.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: use API to make RARP packet
Xiao Wang [Wed, 10 Jan 2018 01:23:55 +0000 (09:23 +0800)]
vhost: use API to make RARP packet

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet: add a helper for making RARP packet
Xiao Wang [Wed, 10 Jan 2018 01:23:54 +0000 (09:23 +0800)]
net: add a helper for making RARP packet

Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: add packet injection method
Xiao Wang [Wed, 10 Jan 2018 01:23:53 +0000 (09:23 +0800)]
net/virtio: add packet injection method

This patch adds dev_pause, dev_resume and inject_pkts APIs to allow
driver to pause the worker threads and inject special packets into
Tx queue. The next patch will be based on this.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: make control queue thread-safe
Xiao Wang [Wed, 10 Jan 2018 01:23:52 +0000 (09:23 +0800)]
net/virtio: make control queue thread-safe

The virtio_send_command function may be called from app's configuration
routine, but also from an interrupt handler called when live migration
is done on the backup side. So this patch makes control queue
thread-safe first.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agoexamples/vhost: fix startup check
Zhiyong Yang [Wed, 10 Jan 2018 06:01:01 +0000 (14:01 +0800)]
examples/vhost: fix startup check

For vhost sample, the operation if (dev_info.max_rx_queues >
MAX_QUEUES) in the function port_init causes startup failure
when using X710(i40e driver). X710 requires that MAX_QUEUES
should be defined no less than 320, however it is defined as
128 currently.

Such checking is overkill and Removal don't affect any
functionality (have already validated ixgbe and i40e).

The removal can avoid similar issue when introduing new physical NIC.

Fixes: 8bd6c395a568 ("examples/vhost: increase maximum queue number")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: fix error code check when creating thread
Olivier Matz [Fri, 8 Dec 2017 10:19:49 +0000 (11:19 +0100)]
vhost: fix error code check when creating thread

On error, pthread_create() returns a positive number (errno).
Fix the test on the return value.

Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
6 years agonet/virtio: init MTU in case no control channel
Zhike Wang [Fri, 5 Jan 2018 10:28:06 +0000 (02:28 -0800)]
net/virtio: init MTU in case no control channel

The max_mtu is kept as zero in case no CRTL channel, which leads
to failure when calling virtio_mtu_set().

Signed-off-by: Zhike Wang <wangzhike@jd.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: add reconnect thread name for client mode
Tonghao Zhang [Fri, 5 Jan 2018 14:10:39 +0000 (06:10 -0800)]
vhost: add reconnect thread name for client mode

This patch adds the name for vhost-user reconnect thread.
It can help us to know whether the thread is running.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>