dpdk.git
7 years agoring: separate out head index manipulation
Bruce Richardson [Wed, 29 Mar 2017 15:21:28 +0000 (16:21 +0100)]
ring: separate out head index manipulation

We can write a single common function for head manipulation for enq
and a common one for deq, allowing us to have a single worker function
for enq and deq, rather than two of each. Update all other inline
functions to use the new functions.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: reduce scope of local variables
Bruce Richardson [Wed, 29 Mar 2017 15:21:27 +0000 (16:21 +0100)]
ring: reduce scope of local variables

The local variable i is only used for loop control so define it in
the enqueue and dequeue blocks directly, rather than at the function
level.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoexamples/quota_watermark: use ring space for watermarks
Bruce Richardson [Wed, 29 Mar 2017 15:21:26 +0000 (16:21 +0100)]
examples/quota_watermark: use ring space for watermarks

Now that the enqueue function returns the amount of space in the ring,
we can use that to replace the old watermark functionality. Update the
example app to do so, and re-enable it in the examples Makefile.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: return remaining entry count when dequeuing
Bruce Richardson [Wed, 29 Mar 2017 15:21:25 +0000 (16:21 +0100)]
ring: return remaining entry count when dequeuing

Add an extra parameter to the ring dequeue burst/bulk functions so that
those functions can optionally return the amount of remaining objs in the
ring. This information can be used by applications in a number of ways,
for instance, with single-consumer queues, it provides a max
dequeue size which is guaranteed to work.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: return free space when enqueuing
Bruce Richardson [Wed, 29 Mar 2017 15:21:24 +0000 (16:21 +0100)]
ring: return free space when enqueuing

Add an extra parameter to the ring enqueue burst/bulk functions so that
those functions can optionally return the amount of free space in the
ring. This information can be used by applications in a number of ways,
for instance, with single-producer queues, it provides a max
enqueue size which is guaranteed to work. It can also be used to
implement watermark functionality in apps, replacing the older
functionality with a more flexible version, which enables apps to
implement multiple watermark thresholds, rather than just one.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: make bulk and burst return values consistent
Bruce Richardson [Wed, 29 Mar 2017 15:21:23 +0000 (16:21 +0100)]
ring: make bulk and burst return values consistent

The bulk fns for rings returns 0 for all elements enqueued and negative
for no space. Change that to make them consistent with the burst functions
in returning the number of elements enqueued/dequeued, i.e. 0 or N.
This change also allows the return value from enq/deq to be used directly
without a branch for error checking.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: remove watermark support
Bruce Richardson [Wed, 29 Mar 2017 15:21:22 +0000 (16:21 +0100)]
ring: remove watermark support

Remove the watermark support. A future commit will add support for having
enqueue functions return the amount of free space in the ring, which will
allow applications to implement their own watermark checks, while also
being more useful to the app.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: remove the yield when waiting for tail update
Bruce Richardson [Wed, 29 Mar 2017 15:21:21 +0000 (16:21 +0100)]
ring: remove the yield when waiting for tail update

There was a compile time setting to enable a ring to yield when
it entered a loop in mp or mc rings waiting for the tail pointer update.
Build time settings are not recommended for enabling/disabling features,
and since this was off by default, remove it completely. If needed, a
runtime enabled equivalent can be used.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: remove debug setting
Bruce Richardson [Wed, 29 Mar 2017 15:21:20 +0000 (16:21 +0100)]
ring: remove debug setting

The debug option only provided statistics to the user, most of
which could be tracked by the application itself. Remove this as a
compile time option, and feature, simplifying the code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: eliminate duplication of size and mask fields
Bruce Richardson [Wed, 29 Mar 2017 15:21:19 +0000 (16:21 +0100)]
ring: eliminate duplication of size and mask fields

The size and mask fields are duplicated in both the producer and
consumer data structures. Move them out of that into the top level
structure so they are not duplicated.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: create common structure for prod and cons metadata
Bruce Richardson [Wed, 29 Mar 2017 15:21:18 +0000 (16:21 +0100)]
ring: create common structure for prod and cons metadata

create a common structure to hold the metadata for the producer and
the consumer, since both need essentially the same information - the
head and tail values, the ring size and mask.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoring: remove split cacheline build setting
Bruce Richardson [Wed, 29 Mar 2017 15:21:17 +0000 (16:21 +0100)]
ring: remove split cacheline build setting

Users compiling DPDK should not need to know or care about the arrangement
of cachelines in the rte_ring structure.  Therefore just remove the build
option and set the structures to be always split. On platforms with 64B
cachelines, for improved performance use 128B rather than 64B alignment
since it stops the producer and consumer data being on adjacent cachelines.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agomaintainers: add to distributor lib maintainers
David Hunt [Mon, 20 Mar 2017 10:08:42 +0000 (10:08 +0000)]
maintainers: add to distributor lib maintainers

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodoc: update distributor app guide for new burst API
David Hunt [Mon, 20 Mar 2017 10:08:41 +0000 (10:08 +0000)]
doc: update distributor app guide for new burst API

Changes in the thread layout described, with an updated diagram.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: update distributor lib guide for new burst API
David Hunt [Mon, 20 Mar 2017 10:08:40 +0000 (10:08 +0000)]
doc: update distributor lib guide for new burst API

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/distributor: give Rx thread a core
David Hunt [Mon, 20 Mar 2017 10:08:39 +0000 (10:08 +0000)]
examples/distributor: give Rx thread a core

Now that we're printing out a page of stats every second to the console,
we should give the stats it's own core so that we don't interfere with
the performance of the Rx core.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/distributor: tweak for performance
David Hunt [Mon, 20 Mar 2017 10:08:38 +0000 (10:08 +0000)]
examples/distributor: tweak for performance

This patch tunes Rx, Tx, and rte_distributor_process() burst sizes to
maximize performance.
It also addresses some checkpatch issues.
The result is approximately 10% performance increase.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/distributor: add dedicated core
David Hunt [Mon, 20 Mar 2017 10:08:37 +0000 (10:08 +0000)]
examples/distributor: add dedicated core

Give the distribution functionality it's own core for performance,
otherwise it's limited by the Rx core.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/distributor: wait for ports to come up
David Hunt [Mon, 20 Mar 2017 10:08:36 +0000 (10:08 +0000)]
examples/distributor: wait for ports to come up

On some machines, ports take several seconds to come up. This
patch causes the app to wait.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/distributor: allow for extra stats
David Hunt [Mon, 20 Mar 2017 10:08:35 +0000 (10:08 +0000)]
examples/distributor: allow for extra stats

This will allow us to see what's going on at various stages
throughout the sample app, with per-second visibility

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agotest/distributor: add performance test for burst mode
David Hunt [Mon, 20 Mar 2017 10:08:34 +0000 (10:08 +0000)]
test/distributor: add performance test for burst mode

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agotest/distributor: test single and burst API
David Hunt [Mon, 20 Mar 2017 10:08:33 +0000 (10:08 +0000)]
test/distributor: test single and burst API

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodistributor: add symbol versioning
David Hunt [Mon, 20 Mar 2017 10:08:32 +0000 (10:08 +0000)]
distributor: add symbol versioning

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodistributor: switch over to new API
David Hunt [Mon, 20 Mar 2017 10:08:30 +0000 (10:08 +0000)]
distributor: switch over to new API

This is the main switch over between the legacy API and the new
burst API. We rename all the functions in rte_distributor.c to remove
the _v1705, and we add in _v20 in the rte_distributor_v20.c

We also rename the rte_distributor_next.h as rte_distributor.h, as
this is now the public header.

At the same time, we need the autotests and sample app to compile
properly, hence those changes are in this patch also.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agotest/distributor: add extra parameters
David Hunt [Mon, 20 Mar 2017 10:08:29 +0000 (10:08 +0000)]
test/distributor: add extra parameters

In the next few patches, we'll want to test old and new API,
so here we're allowing different parameters to be passed to
the tests, instead of just a distributor struct.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodistributor: add SIMD flow matching
David Hunt [Mon, 20 Mar 2017 10:08:28 +0000 (10:08 +0000)]
distributor: add SIMD flow matching

Add an optimised version of the in-flight flow matching algorithm
using SIMD instructions. This should give up to 1.5x over the scalar
versions performance.

Falls back to scalar version if SSE4.2 not available

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodistributor: add new burst-capable library
David Hunt [Mon, 20 Mar 2017 10:08:27 +0000 (10:08 +0000)]
distributor: add new burst-capable library

This patch includes the code for new burst-capable distributor library.

It also includes the rte_distributor_next.h file which will
be used as the public header once we add in the symbol versioning
for v20 and v1705 APIs, at which stage we will rename it to
rte_distributor.h.

The new distributor code contains a very similar API to the legacy code,
but now sends bursts of up to 8 mbufs to each worker. Flow ID's are
reduced to 15 bits for an optimal flow matching algorithm.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodistributor: create private header file
David Hunt [Mon, 20 Mar 2017 10:08:26 +0000 (10:08 +0000)]
distributor: create private header file

We'll be adding internal implementation definitions in here
that are common to both burst and legacy APIs.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodistributor: rename legacy files
David Hunt [Mon, 20 Mar 2017 10:08:25 +0000 (10:08 +0000)]
distributor: rename legacy files

Move files out of the way so that we can replace with new
versions of the distributor library. Files are named in
such a way as to match the symbol versioning that we will
apply for backward ABI compatibility.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agocrypto/scheduler: fix include of local headers
Bruce Richardson [Tue, 28 Mar 2017 10:58:16 +0000 (11:58 +0100)]
crypto/scheduler: fix include of local headers

When a C file for a library/driver is including the public header files for
that library, those need to be included as local includes using quotes
rather than angle-brackets. Without doing so, parallel builds can fail, as
the compiler will only look for those headers in the global include folder
rather than locally, and the build system does not enforce that the headers
for a lib are installed before the rest of the lib is compiled.

Fixes: 097ab0bac017 ("crypto/scheduler: add API")
Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Fixes: 31439ee72b2c ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agonet/xenvirt: fix missing dependency on cmdline lib
Bruce Richardson [Tue, 28 Mar 2017 09:23:33 +0000 (10:23 +0100)]
net/xenvirt: fix missing dependency on cmdline lib

Xenvirt driver uses the cmdline lib for parsing ether addresses so add it
as a dependency to fix builds.

Fixes: feb9f680cd2c ("mk: optimize directory dependencies")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodrivers/crypto: use ring size function
Bruce Richardson [Mon, 27 Mar 2017 14:54:40 +0000 (15:54 +0100)]
drivers/crypto: use ring size function

Rather than reading the size directly from the ring structure, use the
dedicated ring function for that purpose.
Previous commits to do this only did so for the null crypto driver which
was the only one compiled in by default, but all other drivers need to be
similarly updated.

Fixes: b11c78a2e0c6 ("crypto/null: use ring size function")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal/bsd: query the cpu count only once
Bruce Richardson [Thu, 23 Mar 2017 15:09:58 +0000 (15:09 +0000)]
eal/bsd: query the cpu count only once

Rather than querying the number of CPUs on the system multiple times, and
printing out the number each time, just query the value from sysctl once
and store it for future reuse.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodevtools: make log checking script BSD-compatible
Bruce Richardson [Thu, 23 Mar 2017 15:09:26 +0000 (15:09 +0000)]
devtools: make log checking script BSD-compatible

The -e flag to readlink doesn't exist on FreeBSD so change it to -f instead
which is present on both BSD and Linux. Error reported is:

  readlink: illegal option -- e
  usage: readlink [-fn] [file ...]
  usage: dirname string [...]
  ./devtools/check-git-log.sh: /git-log-fixes.sh: not found

Fixes: 814c8822ef7b ("scripts: check cc stable mailing list in commit")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agomk: optimize directory dependencies
Olivier Matz [Fri, 24 Mar 2017 13:21:31 +0000 (14:21 +0100)]
mk: optimize directory dependencies

Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/vhost: free consumed Tx buffers on demand
Billy McFall [Fri, 24 Mar 2017 18:55:55 +0000 (14:55 -0400)]
net/vhost: free consumed Tx buffers on demand

Add support to the vHostdriver for the new API to force free consumed
buffers on Tx ring. vHost does not cache the mbufs so there is no work
to do.

Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/igb: free consumed Tx buffers on demand
Billy McFall [Fri, 24 Mar 2017 18:55:54 +0000 (14:55 -0400)]
net/igb: free consumed Tx buffers on demand

Add support to the e1000 igb driver for the new API to force free
consumed buffers on Tx ring. This API is independent of the tx_rs_thresh
setting. With this API, buffers should be free even if tx_rs_thresh is
not met.

e1000 igb driver does not implement a tx_rs_thresh to free mbufs, it
frees a slot in the ring as needed. However, it could be implemented at
some future date.

Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agoethdev: add API to free consumed buffers in Tx ring
Billy McFall [Fri, 24 Mar 2017 18:55:53 +0000 (14:55 -0400)]
ethdev: add API to free consumed buffers in Tx ring

Add a new API to force free consumed buffers on Tx ring. API will return
the number of packets freed (0-n) or error code if feature not supported
(-ENOTSUP) or input invalid (-ENODEV).

Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agoeal: add info about various init error codes
Aaron Conole [Wed, 22 Mar 2017 20:19:40 +0000 (16:19 -0400)]
eal: add info about various init error codes

The rte_eal_init function will now pass failure reason hints to the
application.  To help app developers decipher this, add some brief
information about what the codes are indicating.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on bus probe/scan failure
Aaron Conole [Wed, 22 Mar 2017 20:19:39 +0000 (16:19 -0400)]
eal: do not panic on bus probe/scan failure

For now, exit the init.  It's likely that even aborting the initialization
is premature in this case, as it may be possible to proceed even if one
bus or another is not available.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on vdev init failure
Aaron Conole [Wed, 22 Mar 2017 20:19:38 +0000 (16:19 -0400)]
eal: do not panic on vdev init failure

Even if one vdev should fail, there's no need to prevent further
processing.  Log the error, and reflect it to the higher levels to
decide.

Seems like it's possible to continue.  At least, the error is reflected
properly in the logs.  A user could then go and correct or investigate
the situation.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on PCI failures
Aaron Conole [Wed, 22 Mar 2017 20:19:37 +0000 (16:19 -0400)]
eal: do not panic on PCI failures

Some devices may be inaccessible for a variety of reasons, or the
PCI-bus may be unavailable causing the whole thing to fail.  Still,
better to continue attempts at probes.

Since PCI isn't neccessarily required, it may be possible to simply log
the error and continue on letting the user check the logs and restart
the application when things have failed.

This will usually be an issue because of permissions.  However, it could
also be caused by OOM.  In either case, errno will contain the
underlying cause.

For linux, it is safe to re-init the system here, so allow the
application to take corrective action and reinit.

For BSD, this is not the case, for other reasons, including hugepage
allocation has already happened, and needs to be properly uninitialized.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic if plugins fail to init
Aaron Conole [Wed, 22 Mar 2017 20:19:36 +0000 (16:19 -0400)]
eal: do not panic if plugins fail to init

Plugins are useful and important.  However, it seems crazy to abort
everything just because they don't initialize properly.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on interrupt thread init
Aaron Conole [Wed, 22 Mar 2017 20:19:35 +0000 (16:19 -0400)]
eal: do not panic on interrupt thread init

There could be some confusion as to why the call failed - this change
will always reflect the value of the error in rte_error.

When initializing the interrupt thread, there are a number of possible
reasons for failure - some of which are correctable by the application.
Do not panic() needlessly, and give the application a change to reflect
this information to the user.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on timer init failure
Aaron Conole [Wed, 22 Mar 2017 20:19:34 +0000 (16:19 -0400)]
eal: do not panic on timer init failure

After code inspection, there is no way for eal_timer_init() to fail.  It
simply returns 0 in all cases.  As such, this test could either go-away
or stay here as 'future-proofing'.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on a number of conditions
Aaron Conole [Wed, 22 Mar 2017 20:19:33 +0000 (16:19 -0400)]
eal: do not panic on a number of conditions

When log initialization fails, it's generally because the fopencookie
failed.  While this is rare in practice, it could happen, and it is
likely because of memory pressure.  So, flag the error, and allow the
user to retry.

Memory init can only fail when access to hugepages (either as primary or
secondary process) fails (and that is usually permissions).  Since the
manner of failure is not reversible, we cannot allow retry.

There are some theoretical racy conditions in the system that _could_
cause early tailq init to fail;  however, no need to panic the
application.  While it can't continue using DPDK, it could make better
alerts to the user.

rte_eal_alarm_init() call uses the linux timerfd framework to create a
poll()-able timer using standard posix file operations.  This could fail
for a few reasons given in the man-pages, but many could be
corrected by the user application.  No need to panic.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: set errno when exiting for already initialized
Aaron Conole [Wed, 22 Mar 2017 20:19:32 +0000 (16:19 -0400)]
eal: set errno when exiting for already initialized

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on memzone init failure
Aaron Conole [Wed, 22 Mar 2017 20:19:31 +0000 (16:19 -0400)]
eal: do not panic on memzone init failure

When memzone initialization fails, report the error to the calling
application rather than panic().  Without a good way of detaching /
releasing hugepages, at this point the application will have to restart.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on argument parsing error
Aaron Conole [Wed, 22 Mar 2017 20:19:30 +0000 (16:19 -0400)]
eal: do not panic on argument parsing error

It's possible that the application could take a corrective action here,
and either prompt the user for different arguments, or at least perform
a better logging.  Exiting this early prevents any useful information
gathering from the application layer.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on hugepage info init
Aaron Conole [Wed, 22 Mar 2017 20:19:29 +0000 (16:19 -0400)]
eal: do not panic on hugepage info init

When attempting to scan hugepages, signal to the eal that an error has
occurred, rather than performing a panic.

If we fail to acquire hugepage information, simply signal an error to
the application.  This clears the run_once counter, allowing the user or
application to take a corrective action and retry.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic when CPU is not supported
Aaron Conole [Wed, 22 Mar 2017 20:19:28 +0000 (16:19 -0400)]
eal: do not panic when CPU is not supported

This adds a new API to check for the eal cpu versions.

It's now possible to gracefully exit the application, or for
applications which support non-dpdk datapaths working in concert with
DPDK datapaths, there no longer is the possibility of exiting for
unsupported CPUs.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: do not panic on CPU detection
Aaron Conole [Wed, 22 Mar 2017 20:19:27 +0000 (16:19 -0400)]
eal: do not panic on CPU detection

There may be no way to gracefully recover, but the application
should be notified that a failure happened, rather than completely
aborting.  This allows the user to proceed with a "slow-path" type
solution.

After this change, the EAL CPU NUMA node resolution step can no longer
emit an rte_panic.  This aligns with the code in rte_eal_init, which
expects failures to return an error code.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agopci: fix device registration on FreeBSD
Ben Walker [Tue, 21 Mar 2017 18:32:15 +0000 (11:32 -0700)]
pci: fix device registration on FreeBSD

The FreeBSD implementation wasn't registering new devices
with the device framework on start up. However, common
code attempts to unregister them on shutdown which causes
a SEGFAULT. This fix makes the FreeBSD code do the same
thing as the Linux code for registration.

Fixes: 13a1317d3ba7 ("pci: create device list and fallback on its members")
Cc: stable@dpdk.org
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
7 years agotest: add a new unit test case status
Jerin Jacob [Sun, 19 Mar 2017 13:37:34 +0000 (19:07 +0530)]
test: add a new unit test case status

Add a new unit test case status called "unsupported".
This is useful in marking a test case "unsupported" if testcase
returns -ENOTSUP at runtime.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agotest: store only the test case name
Jerin Jacob [Sun, 19 Mar 2017 13:37:33 +0000 (19:07 +0530)]
test: store only the test case name

Store only the test case name in unit test case structure.The actor who
renders the test status can add appropriate test status. This enables
adding the new test case status without storing the additional
information in the unit test case structure.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agomk: remove invalid phony target
Olivier Matz [Fri, 17 Mar 2017 17:08:53 +0000 (18:08 +0100)]
mk: remove invalid phony target

There was a typo in the .PHONY for the test-build target. If we fix the
typo, the test-build target does not work, because it won't match the
'%' target anymore.

So just remove the .PHONY.

Fixes: 64592d97c1ae ("mk: do not build tests by default")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agomk: fix message when test application is not built
Olivier Matz [Fri, 17 Mar 2017 17:09:14 +0000 (18:09 +0100)]
mk: fix message when test application is not built

To build the tests, we should use "make test-build".

Fixes: 64592d97c1ae ("mk: do not build tests by default")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agomaintainers: resign from eal maintenance
David Marchand [Thu, 16 Mar 2017 10:47:08 +0000 (11:47 +0100)]
maintainers: resign from eal maintenance

I have been a little too busy these past months and could not really
do any real maintainer stuff for dpdk for a while now.

I have no clear idea when I could dedicate more time to dpdk.
So the best thing for the dpdk community would be to move the eal
maintenance to more involved people.

Signed-off-by: David Marchand <david.marchand@6wind.com>
7 years agomk: provide option to set major ABI version
Christian Ehrhardt [Wed, 1 Mar 2017 09:34:12 +0000 (10:34 +0100)]
mk: provide option to set major ABI version

Downstreams might want to provide different DPDK releases at the same
time to support multiple consumers of DPDK linked against older and newer
sonames.

Also due to the interdependencies that DPDK libraries can have applications
might end up with an executable space in which multiple versions of a
library are mapped by ld.so.

Think of LibA that got an ABI bump and LibB that did not get an ABI bump
but is depending on LibA.

    Application
    \-> LibA.old
    \-> LibB.new -> LibA.new

That is a conflict which can be avoided by setting CONFIG_RTE_MAJOR_ABI.
If set CONFIG_RTE_MAJOR_ABI overwrites any LIBABIVER value.
An example might be ``CONFIG_RTE_MAJOR_ABI=16.11`` which will make all
libraries librte<?>.so.16.11 instead of librte<?>.so.<LIBABIVER>.

We need to cut arbitrary long stings after the .so now and this would work
for any ABI version in LIBABIVER:
  $(Q)ln -s -f $< $(patsubst %.$(LIBABIVER),%,$@)
But using the following instead additionally allows to simplify the Make
File for the CONFIG_RTE_NEXT_ABI case.
  $(Q)ln -s -f $< $(shell echo $@ | sed 's/\.so.*/.so/')

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Jan Blunck <jblunck@infradead.org>
7 years agolpm6: extend next hop field
Vladyslav Buslov [Tue, 14 Mar 2017 17:17:38 +0000 (19:17 +0200)]
lpm6: extend next hop field

This patch extend next_hop field from 8-bits to 21-bits in LPM library
for IPv6.

Added versioning symbols to functions and updated
library and applications that have a dependency on LPM library.

Signed-off-by: Vladyslav Buslov <vladyslav.buslov@harmonicinc.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoapp/testpmd: add default MAC set command
Pascal Mazon [Mon, 13 Mar 2017 10:27:07 +0000 (11:27 +0100)]
app/testpmd: add default MAC set command

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoigb_uio: support devices with only I/O BAR
Matt Peters [Tue, 14 Mar 2017 16:33:09 +0000 (12:33 -0400)]
igb_uio: support devices with only I/O BAR

Allow the BAR setup to succeed if a device has at least 1 BAR region
defined.  Previously, the device probe would only succeed if at least one
memory BAR existed, but there are devices that have only port I/O BARs.

For example, on Virtual Box a virtio device has only a single I/O BAR
because by default MSI-X is not enabled.  While in qemu/kvm the virtio
device has MSI-X enabled and therefore has both an I/O and Memory BAR.

The following are excerpts from "lspci -nnvvvv -s 00:09.0" on both types of
systems.

Virtual Box:

    Region 0: I/O ports at d260 [size=32]
    Capabilities: [80] #00 [0000]

QEMU/KVM:

    Region 0: I/O ports at c060 [size=32]
    Region 1: Memory at febd1000 (32-bit, non-prefetchable) [size=4K]
    Expansion ROM at feb80000 [disabled] [size=256K]
    Capabilities: [40] MSI-X: Enable+ Count=3 Masked-
            Vector table: BAR=1 offset=00000000
            PBA: BAR=1 offset=00000800

Signed-off-by: Matt Peters <matt.peters@windriver.com>
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agombuf: use pktmbuf helper to create the pool
Hemant Agrawal [Tue, 14 Mar 2017 09:14:40 +0000 (10:14 +0100)]
mbuf: use pktmbuf helper to create the pool

When possible, replace the uses of rte_mempool_create() with
the helper provided in librte_mbuf: rte_pktmbuf_pool_create().

This is the preferred way to create a mbuf pool.

This also updates the documentation.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoremove unmaintained TILE-Gx architecture
Thomas Monjalon [Sat, 11 Feb 2017 20:36:12 +0000 (21:36 +0100)]
remove unmaintained TILE-Gx architecture

The TILE-Gx architecture and its driver mpipe are not maintained.
The code is removed to avoid confusion.

A last update has been done in 17.05 before removal.
It can be built with the updated toolchain:
http://www.mellanox.com/repository/solutions/tile-scm/
and libgxio:
http://www.mellanox.com/repository/solutions/tile-scm/libgxio-1.0.tar.xz

Quote from http://dpdk.org/ml/archives/dev/2017-February/057940.html
"
Mellanox agrees to remove TILE-Gx support from DPDK.org, but will continue
to support customers using DPDK.
Customer that needs support should contact Mellanox directly.
"

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
7 years agoexamples: fix optind reset
Keith Wiles [Tue, 14 Feb 2017 22:09:41 +0000 (16:09 -0600)]
examples: fix optind reset

The variable optind should be reset to one not zero.

From the man page:
"The variable optind is the index of the next element to be processed in
argv.  The system initializes this value to 1.
The caller can reset it to 1 to restart scanning of the same argv, or when
scanning a new argument vector.”

The problem I saw with my application was trying to parse the wrong
option, which can happen as DPDK parses the first part of the command line
and the application parses the second part. If you call getopt() multiple
times in the same execution, the behavior is not maintained when using
zero for optind.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
7 years agoapp/procinfo: add collectd format and host id
Roman Korynkevych [Wed, 1 Mar 2017 16:27:19 +0000 (16:27 +0000)]
app/procinfo: add collectd format and host id

Extended proc-info application to send DPDK port statistics to
STDOUT in the format expected by collectd exec plugin. Added
HOST ID option to identify the host DPDK process is running on
when multiple instance of DPDK are running in parallel. This is
needed for the barometer project in OPNFV.

Signed-off-by: Roman Korynkevych <romanx.korynkevych@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
7 years agoapp/testpmd: fix typos
Nirmoy Das [Mon, 27 Feb 2017 19:23:55 +0000 (20:23 +0100)]
app/testpmd: fix typos

Signed-off-by: Nirmoy Das <ndas@suse.de>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agoethdev: move a queue id check to generic layer
Olivier Matz [Fri, 17 Feb 2017 15:25:33 +0000 (16:25 +0100)]
ethdev: move a queue id check to generic layer

The check of queue_id is done in all drivers implementing
rte_eth_rx_queue_count(). Factorize this check in the generic function.

Note that the nfp driver was doing the check differently, which could
induce crashes if the queue index was too big.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoethdev: clarify API comments of Rx queue count
Olivier Matz [Fri, 17 Feb 2017 15:25:32 +0000 (16:25 +0100)]
ethdev: clarify API comments of Rx queue count

The API comments are not consistent between each other.

The function rte_eth_rx_queue_count() returns the number of used
descriptors on a receive queue.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoeal/ppc: support sPAPR IOMMU for vfio-pci
Gowrishankar Muthukrishnan [Mon, 6 Mar 2017 15:04:15 +0000 (20:34 +0530)]
eal/ppc: support sPAPR IOMMU for vfio-pci

Below changes adds pci probing support for vfio-pci devices in power8.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
7 years agoeal/linux: support running as unprivileged user
Ben Walker [Tue, 31 Jan 2017 17:44:53 +0000 (10:44 -0700)]
eal/linux: support running as unprivileged user

For Linux kernel 4.0 and newer, the ability to obtain
physical page frame numbers for unprivileged users from
/proc/self/pagemap was removed. Instead, when an IOMMU
is present, simply choose our own DMA addresses instead.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agodoc: add details on requirements for patch ack and merge
Bruce Richardson [Tue, 21 Feb 2017 12:02:47 +0000 (12:02 +0000)]
doc: add details on requirements for patch ack and merge

Add to the contributors guide the requirements and guidelines for
getting patches acked and merged. It details at what point the review
comments and the ack's need to be received in order to have a given
patch merged into a release.

These guidelines are as agreed by the DPDK technical board at the
meeting held on 2017-02-15.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agoexamples/quota_watermark: fix requirement for 2M pages
Bruce Richardson [Thu, 23 Feb 2017 16:42:03 +0000 (16:42 +0000)]
examples/quota_watermark: fix requirement for 2M pages

The sample app was forcing the shared memory block for high/low
watermarks to be placed in a memzone on 2M pages. This prevented it
from running on systems with just 1G pages, so remove the flag forcing
2M pages.

Fixes: 1d6c3ee3321a ("examples/quota_watermark: initial import")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoexamples/quota_watermark: correct code indentation
Bruce Richardson [Thu, 23 Feb 2017 16:42:02 +0000 (16:42 +0000)]
examples/quota_watermark: correct code indentation

The code indentation in the example app files used spaces rather than
tabs for indentation, and as such did not conform to DPDK conventions.
This left those modifying the code in a bind - to fix things on a line
by line basis so as to avoid checkpatch errors, or to keep things
consistent within the file, and accept checkpatch errors.

Since these files have not had too many changes since the original
import, there is little change history to lose by doing a complete
reformatting of the code, so just update all indentation to standard.
In the process, wrap long lines appropriately, avoiding splitting
error messages.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agocrypto/null: use ring size function
Bruce Richardson [Thu, 23 Feb 2017 16:42:01 +0000 (16:42 +0000)]
crypto/null: use ring size function

Rather than reading the size directly from the ring structure,
use the dedicated function for that purpose.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agoring: add a function to return the ring size
Bruce Richardson [Thu, 23 Feb 2017 16:42:00 +0000 (16:42 +0000)]
ring: add a function to return the ring size

Applications and other libraries should not be reading inside the
rte_ring structure directly to get the ring size. Instead add a fn
to allow it to be queried.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agoapp/pdump: fix duplicate macro definition
Bruce Richardson [Thu, 23 Feb 2017 16:41:59 +0000 (16:41 +0000)]
app/pdump: fix duplicate macro definition

RTE_RING_SZ_MASK is redefined here with the original definition in
rte_ring.h. Since rte_ring.h is already included, just remove the
duplicate definition here.

Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: ensure constness of container_of target
Jan Blunck [Tue, 14 Feb 2017 14:36:06 +0000 (15:36 +0100)]
eal: ensure constness of container_of target

This adds a check to ensure that the container_of() macro is not used to
cast away (remove) constness.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agoeal: fix container_of macro for const members
Jan Blunck [Tue, 14 Feb 2017 14:36:05 +0000 (15:36 +0100)]
eal: fix container_of macro for const members

This fixes the usage of structure members that are declared const to get
a pointer to the embedding parent structure.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agodoc: fix renamed bind tool
Julien Castets [Mon, 6 Mar 2017 16:15:26 +0000 (17:15 +0100)]
doc: fix renamed bind tool

Fixes: a5d7a3f77ddc ("unify tools naming")

Signed-off-by: Julien Castets <jcastets@scaleway.com>
7 years agodevtools: ignore warning on long log string
Allain Legacy [Wed, 1 Mar 2017 17:44:19 +0000 (12:44 -0500)]
devtools: ignore warning on long log string

The checkpatch.pl tool is flagging warnings on long debug log strings.
Since splitting these strings makes it difficult to search for logs it is
preferred to allow these as exceptions to the long line rule.  The addition
of the LONG_LINE_STRINGS to the list of exceptions will allow lines that
end with a string to exceed the maximum line length, but lines that end
with variables or other constructs will still be flagged as errors.  Also,
lines that make use of PRIx64 with string concatenation will still be
flagged if the beginning of the last string fragment begins after the 80
character threshold.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
7 years agodoc: use corelist instead of coremask
Keith Wiles [Mon, 27 Feb 2017 19:13:40 +0000 (11:13 -0800)]
doc: use corelist instead of coremask

The coremask option in DPDK is difficult to use and we should be
promoting the use of the corelist (-l) option. The patch
adjusts the docs to use -l EAL option instead of the -c option.

The patch only changes the docs and not the code as the -c option
will continue to exist unless it is removed in the future. The -c
option should be kept to maintain backward compatibility.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agomk: fix cleaning files
Ferruh Yigit [Wed, 22 Feb 2017 20:54:45 +0000 (20:54 +0000)]
mk: fix cleaning files

Remove remaining .lib.cmd, pmd.c, pmd.o and app.map files.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agodoc: add test related rules in make help
Ferruh Yigit [Thu, 16 Feb 2017 14:57:46 +0000 (14:57 +0000)]
doc: add test related rules in make help

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agomk: rename test related rules
Ferruh Yigit [Thu, 16 Feb 2017 14:57:45 +0000 (14:57 +0000)]
mk: rename test related rules

Make rules renamed to a common syntax, test-x:
fast_test    -> test-fast
ring_test    -> test-ring
mempool_test -> test-mempool
perf_test    -> test-perf

These are to run various sub-set of the unit tests.

Not touched to make rules that are already following the syntax:
test-basic
test-build
test

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agomk: add new test-basic rule
Ferruh Yigit [Thu, 16 Feb 2017 14:57:44 +0000 (14:57 +0000)]
mk: add new test-basic rule

Since "make test" and "make test-build" does dependency resolving, they
check for all dependent components (lib and drivers) which takes a few
seconds.

This is a good feature during development, but if the target is only
running unit test, that step is unnecessary, it is possible to compile
once and run unit test multiple times, without checking any code update.

For this purpose, a new make rule "make test-basic" added. Which only
runs the unit test, expects that unit test already compiled.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agomk: do not build tests by default
Ferruh Yigit [Thu, 16 Feb 2017 14:57:43 +0000 (14:57 +0000)]
mk: do not build tests by default

Don't build tests with default "make" command.

Require explicit command to build tests because not everybody interested
in running unit tests.

Following changes done in make rules:
"make test-build"  <--- Added
"make test"        <--- Updated functionality (build + run basic tests)

Now "make test" builds all tests and runs unit test (test).

Thanks to dependency resolving, it is possible to call "make test"
directly after config, "make test" will compile dependent components
(lib and drivers, but not apps).

And a new "make test-build" make rule added which will build
tests but not run unit test. "make test-build" has same dependency
resolving features with "make test"

To include "test" folder into makesystem, existing ROOTDIRS- variable
is used instead of hardcoding folder name into makefiles, current usage
of ROOTDIRS* variables are:

ROOTDIRS-y <-- root level folders prepared and compiled by default
ROOTDIRS-  <-- root level folders prepared but not compiled by default

The preparation is required for dependency resolving and cleaning.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agotest: move unit tests to separate directory
Ferruh Yigit [Thu, 16 Feb 2017 14:57:42 +0000 (14:57 +0000)]
test: move unit tests to separate directory

This is to logically group unit tests into their own folder,
separating them from "app" folder.

Hopefully this will make the unit test in DPDK more visible.

Following binaries moved to "test" folder:
cmdline-test
test-acl
test-pipeline
test            <-- various DPDK unit tests

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agotile: fix build
Chris Metcalf [Sat, 18 Feb 2017 01:52:29 +0000 (20:52 -0500)]
tile: fix build

Re-enable CONFIG_RTE_LIBRTE_SCHED, since it is needed to build
correctly.

Fix a few warnings when compiling mpipe_tilegx.c.

Remove an empty rte_cpu_feature_table[] array using a bogus type.

Properly set RTE_OBJCOPY_{TARGET,ARCH} in mk/arch/tile/rte.vars.mk.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
7 years agomk: generalize strict alignment warning handling
Chris Metcalf [Sat, 18 Feb 2017 01:52:28 +0000 (20:52 -0500)]
mk: generalize strict alignment warning handling

Rather than allowing just armv7 to have non-fatal strict alignment
cast warnings, generalize it to both strict alignment architectures,
armv7 and tile.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
7 years agonet/mpipe: remove requirement for non-upstreamed headers
Chris Metcalf [Sat, 18 Feb 2017 01:52:27 +0000 (20:52 -0500)]
net/mpipe: remove requirement for non-upstreamed headers

These headers are not part of the set that are upstreamed as part
of glibc or the kernel, and we only need a few defines from each.
The hardware is frozen so these values are not going to change
in any case.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
7 years agoeal/tile: avoid use of non-upstreamed header
Chris Metcalf [Sat, 18 Feb 2017 01:52:26 +0000 (20:52 -0500)]
eal/tile: avoid use of non-upstreamed header

It's trivial to directly invoke a read of the special-purpose
register that holds the clock cycle counter, so just do that.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
7 years agodoc: add default values of install variables
Thomas Monjalon [Fri, 17 Feb 2017 15:55:40 +0000 (16:55 +0100)]
doc: add default values of install variables

The variables DESTDIR and prefix are used with "make install"
to copy the files in $DESTDIR$prefix.
Their default values will be shown when calling "make help".

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: highlight pointed column in NIC overview table
Thomas Monjalon [Mon, 20 Feb 2017 16:04:14 +0000 (17:04 +0100)]
doc: highlight pointed column in NIC overview table

Every cells of a driver column are painted in yellow.

The trick is to generate some empty content as a big column
above and below the pointed cell.

The position: relative attribute is used for the highlight position
but it makes the border to disappear.

The overflow: hidden attribute is used to mask the generated content
outside of the table.

The class .wy-nav-content has a background which masks the highlighting.
Setting an opacity lower than 1, creates a new stack context and let
the column highlight to be shown.

The background of odd rows was grey and opaque. It is redefined with
a transparent alpha ratio in order to see highlighting on such rows.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: highlight pointed row in NIC overview table
Thomas Monjalon [Mon, 20 Feb 2017 16:14:01 +0000 (17:14 +0100)]
doc: highlight pointed row in NIC overview table

Every cells of a feature row are painted in yellow.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: set alignments in NIC overview table
Thomas Monjalon [Mon, 18 Apr 2016 12:28:25 +0000 (14:28 +0200)]
doc: set alignments in NIC overview table

Some CSS alignments were not explicitly set.
The pointer is also set to default for the table.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodevtools: make checkpatch cleaner for renamed files
David Hunt [Mon, 20 Feb 2017 04:08:33 +0000 (04:08 +0000)]
devtools: make checkpatch cleaner for renamed files

When a file is renamed, a normal diff will include all the code of
the renamed file, and checkpatch will find warnings and errors,
even though it's just a rename.

This change will result in a 'rename' line in the diff, resulting
in a much cleaner checkpatches result.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agomempool: remove deprecated get and put functions
Olivier Matz [Fri, 17 Feb 2017 12:28:27 +0000 (13:28 +0100)]
mempool: remove deprecated get and put functions

As announced in the deprecation notice, remove the functions for
single/multi producer/consumer enqueue/dequeue.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
7 years agomempool: remove deprecated count functions
Olivier Matz [Fri, 17 Feb 2017 12:28:26 +0000 (13:28 +0100)]
mempool: remove deprecated count functions

As announced in the deprecation notice, remove these functions.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
7 years agomaintainers: fix script paths
Thomas Monjalon [Tue, 21 Feb 2017 10:18:38 +0000 (11:18 +0100)]
maintainers: fix script paths

The directory scripts does not exist anymore.
The files have been moved but some paths were not updated
in the maintainers list.

Fixes: 9a98f50e890b ("scripts: move to devtools")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>