No need to split mbuf structure to two cache lines for 128-byte cache
line size targets as it can fit on a single 128-byte cache line.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
The file rte_config.h is automatically generated and included.
No need to #include it.
The example performance-thread needs a makefile fix to avoid
overwriting the default cflags.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
fix the error reported by checkpatch:
"ERROR: return is not a function, parentheses are not required"
remove parentheses in return like:
"return (logical expressions)"
remove parentheses in return a function like:
"return (rte_mempool_lookup(...))"
Fixes: 6307b909b8 ("lib: remove extra parenthesis after return")
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
In fedora 22 with GCC version 5.3.1, when compile,
will result an error:
include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2"
is not defined [-Werror=undef]
#elif RTE_MACHINE_CPUFLAG_AVX2
Fixes: 9484092baa ("eal/x86: optimize memcpy for AVX512 platforms")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
If eth_ring vdevs are created from the command line with the --vdev option,
they create their own rings which are not shared by other vdevs.
Some of tests in this suite require that the vdevs share rings, so some
of the tests fail.
For vdevs to share rings they must be created in the test code with the
rte_eth_from_rings() function using rings created with the rte_ring_create()
function.
Use the command line option --vdev=eth_ring0 to create port 0.
This option is not mandatory for the tests to pass. It allows some additional
functional tests on cmd-line created rings to be executed.
Create two rings and five ethdevs in test_pmd_ring.c for ports 1 to 5,
and then use these to run the unit tests on the pmd ring functionality.
Improve test output by adding the port number to printf statements,
and adding a printf describing each test.
Fixes: 572eb3cd83 ("ring: simplify unit tests")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
In the KNI unit test, if all test cases passed, it should
return with 0. This patch fixes the issue of returning
wrong value.
Fixes: fc27caaafd ("kni: remove deprecated functions")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Renamed function name to comply with coding standard.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
memory_autotest loops infinitely when at least one the memsegs
is bigger than 4GB.
The issue is the result of an integer overflow/wraparound of
the offset variable.
Fix it by using the correct type (size_t).
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fix crash in pmd_perf_test autotest (div by 0) when no packets received
Also fixes the fact that the test passes even if exec_burst fails
To repeat the issue:
The system must be incorrectly set up so that all packets will be lost,
i.e. no loopback cable, etc. This is an edge case, but still the test
should not crash or pass when failing.
run the test app
RTE>> set_rxtx_sc poll_before_xmit
RTE>> pmd_perf_autotest
--snip--
> Generate 4096 packets @socket 1
> start to receive total expect 4096
> 4096 packets lost, IDLE 10000 times
> Floating point exception (core dumped)
Signed-off-by: David Hunt <david.hunt@intel.com>
app/test/test_cryptodev_perf.c(1837): error #192: unrecognized
character escape sequence
printf("\n%u\t%u\t\%u\t\t%u\t\t%u", dev_num, 0,
"\%u" is the root cause of this issue, just fix it.
Fixes: 202d375c60 ("app/test: add cryptodev unit and performance tests")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
This patch relates to ABI change proposed for librte_table.
The key_mask parameter is added for 8-byte and 16-byte
key extendible bucket and LRU tables.The release notes
is updated and the deprecation notice is removed.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Added to acl table unit test check for bulk add and bulk delete.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
armv8-a has optional CRC32 extension, march=armv8-a+crc enables code
generation for the ARMv8-A architecture together with
the optional CRC32 extensions.
added RTE_MACHINE_CPUFLAG_CRC32 to detect the availability of
CRC32 extension in compile time. At run-time, The RTE_CPUFLAG_CRC32
can be used to find the availability.
armv8-a+crc target support added in GCC 4.9,
Used inline assembly and emulated __ARM_FEATURE_CRC32 to work
with tool-chain < 4.9
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
unit tests are run by using cryptodev_qat_autotest or
cryptodev_aesni_autotest from the test apps interactive console.
performance tests are run by using the cryptodev_qat_perftest or
cryptodev_aesni_mb_perftest command from the test apps interactive
console.
If you which to run the tests on a QAT device there must be one
bound to igb_uio kernel driver.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: John Griffin <john.griffin@intel.com>
Signed-off-by: Des O Dea <des.j.o.dea@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
This implementation is based on IBM POWER version of
rte_cpuflags. We use software emulation of HW capability
registers, because those are usually not directly accessible
from userspace on ARM.
Signed-off-by: Vlastimil Kosar <kosar@rehivetech.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: David Marchand <david.marchand@6wind.com>
The reorder library unit test was performed under the assumption that
the start sequence number was always 0.
This is not the case anymore as the start sequence number is initialized
by the first packet inserted into the reorder buffer.
This patch updates the unit test to reflect the new behavior.
Fixes: 7e1fa1de8a ("reorder: allow random number as starting point")
Reported-by: Mukesh Dua <mukesh.dua81@gmail.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
One of the ways to reproduce the issue:
testpmd <EAL-OPTIONS> -- -i --txqflags=0
testpmd> set fwd txonly
testpmd> set txpkts 64,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
testpmd> set txsplit rand
testpmd> start
After some time TX on ixgbe queue will hang,
and all packet transmission on that queue will stop.
This bug was first reported and investigated by
Vlad Zolotarov <vladz@cloudius-systems.com>:
"We can reproduce this issue when stressed the xmit path with a lot of highly
fragmented TCP frames (packets with up to 33 fragments with non-headers
fragments as small as 4 bytes) with all offload features enabled."
The root cause is that ixgbe_xmit_pkts() in some cases violates the HW rule
that the distance between TDs with RS bit set should not exceed 40 TDs.
>From the latest 82599 spec update:
"When WTHRESH is set to zero, the software device driver should set the RS bit
in the Tx descriptors with the EOP bit set and at least once in the 40
descriptors."
The fix is to make sure that the distance between TDs with RS bit set
would never exceed HW limit.
As part of that fix, tx_rs_thresh for ixgbe PMD is not allowed to be greater
then to 32 to comply with HW restrictions.
With that fix slight slowdown for the full-featured ixgbe TX path
might be observed (from our testing - up to 4%).
ixgbe simple TX path is unaffected by that patch.
Reported-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Hash_autotest is in test group 2 which had only 32 MB
of memory, which is increased to 64 MB to make it run.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
eal_flags_autotest was broken after commit
19bfa4dd ("eal: make the -n argument optional"),
since the unit test was checking that app would not run
if -n flag was missing, which now it is possible.
Also, subtest test_missing_n_flag() has been renamed
to test_invalid_n_flag(), as now -n flag is not compulsory.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
If using multiple cores on a system with hardware transactional
memory support, thread scaling does not work, as there was a single
point in the hash library which is a bottleneck for all threads,
which is the "free_slots" ring, which stores all the indices of
the free slots in the table.
This patch fixes the problem, by creating a local cache per logical core,
which stores locally indices of free slots,
so most times, writer threads will not interfere each other.
Fixes: 48a3991196 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Add a performance test for ring pmd, comparing performance of the pmd
compared to the basic rte_ring APIs.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This is a useful default for simple applications where the assignment
of lcores to CPUs doesn't matter. It's also useful for more complex
applications that automatically assign tasks to cores based on the
NUMA topology.
Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
'virtual' is a keyword and can't be used if the code is to compile with
C++ compilers.
If rte_devargs.h was included in C++ code, compilation with clang++
failed with an error. g++ did not fail, but only because of a bug
that treats it as an anonymous struct with a decl-specifier which it
ignores.
This simply renames the member to 'virt'.
Reported-by: Ming Zhao <mzhao@luminatewireless.com>
Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
This patch relates to ABI change proposed for librte_port. Macros to
access the packet meta-data stored within the packet buffer has been
adjusted to cover the packet mbuf structure.
The LIBABIVER number is incremented.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
LPM table and pipeline apps have been modified to
include name parameter of the lpm table.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
The function rte_jhash2() was renamed rte_jhash_32b and
macros RTE_HASH_KEY_LENGTH_MAX and RTE_HASH_BUCKET_ENTRIES_MAX
were tagged as deprecated, so they can be removed in 2.2.
RTE_HASH_KEY_LENGTH is replaced in unit tests by an internal macro
for the memory allocation of all keys used.
The library version number is incremented.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
These functions were tagged as deprecated in 2.0 so they can be
removed in 2.2.
The library version is incremented.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: update doc and version]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The functions and structures are moved to app/test in order to keep
existing unit tests. Some minor changes were done in these functions
because of library scope restrictions.
An enum is also copied in two other applications to keep existing code.
The library version is incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The library version is incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The extended unified packet type is now part of the standard ABI.
As mbuf struct is changed, the mbuf library version is incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
In table_autotest, the structures containing the parameters
to create the tables were not initialized, and therefore,
some checks could fail and so the unit test.
Also, due to this initialization, one of the tests that was
checking if the table was improperly initialized has been
removed, as it is not needed anymore (duplicated)
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
In commit: 1129992baa checking for offset alignment was removed.
Unit tests wasn't updated to reflect that change. This patch changes
checks with unaligned offsets to make tests pass.
Fixes: 1129992baa ("port: fix unaligned access to metadata")
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Test failed on verification if number of bytes
transmitted on each slave is not less than 90%
and greater than 110% of mean value of bytes transmitted
thru one slave. This was verified on a real system
but is difficult to achieve using virtualpmd.
That's why for unit tests only, it is sufficient to verify that with
high load (2 seconds transmission) all slaves are transmitting
so the traffic is balanced.
Fixes: 0c8396e6d7 ("bond: unit tests for mode 5")
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
'--no-huge' option now can workable with -m option.
Unit test for eal flag should change pass criterion.
Fixes: a7de7e6beb ("eal: allow combining -m and --no-huge")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
In previous setting, mempool size and cache_size were both 32.
It does not satisfy with cache_size checking rule by now.
Cache size should be less than CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE and
mempool size / 1.5.
Fixes: 462321b44a ("mempool: limit cache size")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: remove unused PKT_BURST_SZ]
Add new timer-manage race-condition test: We wrote a test to confirm
our suspicion that we could crash rte_timer_manage() under the right
circumstances. We repeatedly set several timers to expire at roughly
the same time on the master core. The master lcore just delays and runs
rte_timer_manage() about ten times per second. The slave lcores all
watch the first timer (timer-0) to see when rte_timer_manage() is
running on the master, i.e., timer-0's state is not PENDING.
At this point, each slave attempts to reset a subset of the timers to
a later expiration time. The goal here is to have the slaves moving
most of the timers to a different place in the master's pending-list,
while the master is traversing the same next-pointers (the slaves'
sl_next[0] pointers) and running callback functions. This eventually
results in the master traversing a corrupted linked-list.
In our observations, it results in an infinite loop.
Signed-off-by: Robert Sanford <rsanford@akamai.com>
Fix app/test timer stress test 2: Sometimes this test fails and
seg-faults because the slave lcores get out of phase with the master.
The master uses a single int, 'ready', to synchronize multiple slave
lcores through multiple phases of the test.
To resolve, we construct simple synchronization primitives that use one
atomic-int state variable per slave. The master tells the slaves when to
start, and then waits for all of them to finish. Each slave waits for
the master to tell it to start, and then tells the master when it has
finished.
Signed-off-by: Robert Sanford <rsanford@akamai.com>
Implement rte_memzone_free which, as its name implies, would free a
memzone.
Currently memzone are tracked in an array and cannot be free.
To be able to reuse the same array to track memzones, we have to
change how we keep track of reserved memzones.
With this patch, any memzone with addr NULL is not used, so we also need
to change how we look for the next memzone entry free.
Add new unit test for rte_memzone_free API.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Some unit test are not relevant anymore. It is the case of those malloc
UTs that checked corner cases when allocating MALLOC_MEMZONE_SIZE
chunks, and the case of those memzone UTs relaying of specific free
memsegs of rhte reserved memzone.
Other UTs just need to be update, for example, to calculate maximum free
block size available.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The cuckoo hash has a fixed number of entries per bucket, so the
configuration parameter for this is unused. We change this field in the
parameters struct to "reserved" to indicate that there is now no such
parameter value, while at the same time keeping ABI consistency.
Fixes: 48a3991196 ("hash: replace with cuckoo hash implementation")
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
The original code mistakenly defaulted to X86 when RTE_ARCH_PPC_64 was
left undefined. This did not accommodate other non-PPC/non-X86
architectures. This patch fixes this issue.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Since now rte_hash structure is private, a new function
has been added to let the user iterate through the hash table,
returning next key and data associated on each iteration,
plus the position where they were stored.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Usually hash tables not only store keys, but also data associated
to them. In order to maintain the existing API, the old functions
will still return the index where the key was stored.
The new functions will return the data associated to that key.
In the case of the lookup_bulk function, it will return also
the number of entries found and a bitmask of which entries
were found.
Unit tests have been updated to use these new functions.
As a final point, a flag has been added in rte_hash_parameters
to indicate if there are new parameters for future versions,
so there is no need to maintain multiple versions
of the existing functions in the future.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: fix || operator in a precondition check]
Added reset function to be able to empty the table,
without having to destroy and create it again.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This patch replaces the existing hash library with another approach,
using the Cuckoo Hash method to resolve collisions (open addressing),
which pushes items from a full bucket when a new entry tries
to be added in it, storing the evicted entry in an alternative location,
using a secondary hash function.
This gives the user the ability to store more entries when a bucket
is full, in comparison with the previous implementation.
Therefore, the unit test has been updated, as some scenarios have changed
(such as the previous removed restriction).
Also note that the API has not been changed, although new fields
have been added in the rte_hash structure (structure is internal now).
The main change when creating a new table is that the number of entries
per bucket is fixed now, so its parameter is ignored now
(still there to maintain the same parameters structure).
The hash unit test has been updated to reflect these changes.
As a last note, the maximum burst size in lookup_burst function
hash been increased to 64, to improve performance.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Add new unit test for calculating the average table utilization,
using random keys, based on number of entries that can be added
until we encounter one that cannot be added (bucket if full).
Also, replace current hash_perf unit test to see performance more clearly.
The current hash_perf unit test takes too long and add keys that
may or may not fit in the table and look up/delete that may not be
in the table. This new unit test gets a set of keys that we know
that fits in the table, and then measure the time to add/look up/delete
them.
Note that performance numbers include time to take a random key
from a pre-made array of keys, plus a quick check of return value.
Also, as stated above, expect higher numbers, as all operations
in the new unit tests will be successful, which means that
it will take more time, than mixing both successful and unsuccesful
operations.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
rte_hash structure should not be a public structure,
and therefore it should be moved to the C file and be declared
as internal. rte_hash_hash implementation is also moved
to the C file, as it uses the structure.
This patch also removes part of a unit test that was checking
a field of the structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
In test application, the default size of allocated mempool is calculated
as following:
(RTE_MAX_LCORE * (RTE_MEMPOOL_CACHE_MAX_SIZE + max_kept_objects)) - 1
The objective is to ensure that all cores can fill their cache and keep
'max_kept_objects' at the same time. As RTE_MAX_LCORE is 128 and
RTE_MEMPOOL_CACHE_MAX_SIZE is 512 in the default configuration, it can
produce very large mempools (170 MB).
We can replace the number of core by a dynamic value, which drastically
reduces the amount of memory needed for this test (5 MB with 4 cores).
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This patch simply applies the transform previously committed in
scripts/cocci/mtod-offset.cocci. No other modifications have been
made here.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
On machines that are strict on pointer alignment, current code breaks
on GCC's -Wcast-align checks on casts from narrower to wider types.
This patch introduces new unaligned_uint(16|32|64)_t types, which
correctly retain alignment in such cases. Strict alignment
architectures will need to define CONFIG_RTE_ARCH_STRICT_ALIGN in
order to effect these new types.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This patch adds a new auto-test for testing the scaling
of concurrent inserts into rte_hash when protected by
the normal spinlock vs. the spinlock with HTM lock
elision. The test also benchmarks single-threaded
access without any locks.
Signed-off-by: Roman Dementiev <roman.dementiev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Some test rules had equal priority for the same category.
That can cause an ambiguity in build trie and test results.
Specify different priority value for each rule from the same category.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Added new test that verifies that rte_jhash_1words,
rte_jhash_2words and rte_jhash_3words return the same
values as rte_jhash.
Note that this patch has been added after the update
of the jhash function because these 3 functions did not
return the same values as rte_jhash before
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Changed name to something more meaningful,
and mark rte_jhash2 as deprecated.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jenkins hash function was developed originally in 1996,
and was integrated in first versions of DPDK.
The function has been improved in 2006,
achieving up to 35% better performance, compared to the original one.
This patch integrates that code into the rte_jhash library.
It also updates the precalculated hash values in the unit test,
as the code now returns different values (expected).
A final note has been added in release notes for stating
the changes made.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
In order to make sure that the hash functions are returning
the correct values, new tests have been added:
- First test compares precalculated hash values with values calculated
from the existing hash functions.
- Second test compares values returned from rte_jhash2 and rte_jhash,
expecting same return (only for multiple of 4 bytes keys)
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
In order to see more clearly the performance difference
between different hash functions, order of the loops
have been changed, so it iterates first through initial values,
then key sizes and then the hash functions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Previous key sizes used for testing did not have much purpose.
This patch substitutes them with some more meaninful
(standard multiple of 2 key sizes, plus IPv4/v6 tuple and others)
Also an arbitrary initial value has been added to increase
the test coverage, and RTE_DIM macro is used to iterate the loops.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Cycles per hash calculation were measured per single operation.
It is much more accurate to run several iterations between measurements
and divide by number of iterations.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This patch moves hash function performance tests to a separate file,
so user can check performance of the existing hash functions quicker,
without having to run all the other hash operation performance tests,
which takes some time.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This change returns a system error code if tests fail when
running any of the "make test" targets.
This allows the tests to report failures while running in
continuous integration environments.
Previously "make test" returned $? == 0 for all combinations
of success, failure and exception conditions.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Each test requires a certain minimal amount of memory.
Spreading memory on all sockets means that the test will get less memory than
what it wanted on multi sockets system.
So replace all_sockets() with per_sockets().
Also doubled memory on group_5 as current requirement is not enough.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Fix trailing whitespace, space before tab and empty lines at end of file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: fix indent and alignment in test_acl.h and test_sched.c]
Add a new top-level "drivers" directory to which all PMDs will be moved
for easier maintenance of both lib folder and drivers themselves. This
new directory is a dependency of all the apps in the app folder, so
the makefiles for each app are updated.
To the new top-level directory add a "net" subdirectory to classify
more specifically our existing PMDs as ethernet drivers
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
[Thomas: fix dependencies and merge several patches]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Latest mbuf changes (priv_size addition and related fixes)
exposed small problem with testpmd and few other sample apps:
when mbuf size is exaclty 2KB or less, that causes
ixgbe PMD to select scattered RX even for configs with 'normal'
max packet length (max_rx_pkt_len == ETHER_MAX_LEN).
To overcome that problem and unify the code, new macro was created
to represent recommended minimal buffer length for mbuf.
When appropriate, samples are updated to use that macro.
Fixes: dfb03bbe2b ("app/testpmd: use standard functions to initialize
mbufs and mbuf pool")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The distributor header file includes the mbuf header file, but it does not
need to do so as it only uses pointers to the struct rte_mbuf type, and
does not use any of the mbuf internals, nor any of the mbuf functions or
macros. Therefore the inclusion is unnecessary, and can be replaced by a
forward declaration of the mbuf type.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Verify that we can attach a mbuf to another one that does not have
the same data room size and priv_size.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Check that the data in the cloned mbuf is the same than in the
reference mbuf.
Check that the reference counter is incremented for each segment.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
It's better to name the mbuf 'm' instead of 'mc' as it's not a clone.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect mbufs):
- ip_fragmentation
- ip_pipeline
- ipv4_multicast
- vhost
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The PCI device id table is immutable and should be made const
in all drivers. The pseudo drivers can initialize their local
copy as necessary.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
To initialize a structure with zeros, one field was explicitly set
to avoid "missing initializer" bug with old GCC (e.g. 4.4).
This warning is now disabled (commit <insertlater>) for old versions of GCC,
so the workarounds may be removed.
These initializers should not be needed for static variables but they
are still used to workaround an ICC bug (see commit b2595c4aa9).
There is one remaining exception where {0} initializer doesn't work cleanly,
even with recent GCC:
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:735:9:
error: missing braces around initializer [-Werror=missing-braces]
struct rte_mbuf mb_def = {0}; /* zeroed mbuf */
Tested with gcc-4.4.7 (CentOS), gcc-4.7.2 (Debian), gcc-4.9.2 (Arch),
clang-3.6.0 and icc-13.1.1.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>
The ethernet device ops function table should be made const for
safety and security.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The test PMD uses a special type of eth_dev_ops to test features.
Rather allocating this separately, just put in the private data area.
This allows for next change to make dev_ops const.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
rte_free like Glibc free allows rte_free(NULL) as null operation.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Remove useless memset, since dev_private is created by rte_zmalloc
it must already be zero.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Option var-tracking-assignments supported in gcc from 4.4.
Add gcc version check wil fix this issue.
error: unrecognized command line option "-fno-var-tracking-assignments"
Fixes: 74adbc5ef7 ("app/test: disable variable tracking assignment for memcpy")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Build app/test will be failed for function only defined but not used.
test_prefetch.c:65: error: ‘testfn_prefetch_cmd’ defined but not used
Add attribute used in test function declaration can fix this.
static void __attribute__((used)) testfn_##t(void);
Fixes: 727909c592 ("app/test: introduce dynamic commands list")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Fix a warning when the rte_common.h header is included in a compilation
using -Wbad-function-cast, such as in Open vSwitch where the
following warning is emitted repeatedly:
../rte_common.h: In function 'rte_is_aligned':
../rte_common.h:184:9: warning: cast from function call of
type 'uintptr_t' to non-matching type 'void *' [-Wbad-function-cast]
This change fixes the issue in rte_common.h by using the RTE_ALIGN_FLOOR
macro to get the aligned floor value with generic type casting.
Also removed the rte_align_floor_int() function and replaced it with
the RTE_PTR_ALIGN_FLOOR() macro.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
There is no remaining reference to E_RTE_NO_TAILQ.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
This register system makes it possible to reserve a tailq for the dpdk
libraries.
The "dynamic" tailqs are right after the "static" tailqs in shared mem.
Primary process is responsible for writing the tailq names, so that secondary
processes can find them.
This is a temp commit, "static" tailqs are removed after conversion of all
users in next commits.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The "reserve" macros and functions do not check if the requested entry is free.
They do nothing more than the lookup function (which itself "creates" entries
...).
The rte_tailq api is marked as "internal use" in documentation and these macros
are only used in test application, so just get rid of them.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
test_hash.c: In function ‘test_crc32_hash_alg_equiv’:
error: format ‘%lu’ expects argument of type ‘long unsigned int’,
but argument 2 has type ‘size_t’ [-Werror=format]
According to C99, for size_t type should use format "%zu"
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The malloc family returns void * and therefore cast is unnecessary.
Use calloc rather than zmalloc with multiply for array.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This new parameter is needed to keep device type like PCI or virtual.
Port detaching processes are different between PCI device and virtual
device.
RTE_ETH_DEV_PCI indicates device type is PCI. RTE_ETH_DEV_VIRTUAL
indicates device is virtual.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
New function test_crc32_hash_alg_equiv() checks whether software,
4-byte operand and 8-byte operand versions of CRC32 hash function
implementations return the same result value.
Signed-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Main code changes:
1. Added more typical data points for a thorough performance test
2. Added unaligned test cases since it's common in DPDK usage
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Removed unnecessary test cases for base move functions
since the function "func_test" covers them all.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
VTA is for debugging only, it increases compile time and binary size,
especially when there're a lot of inlines.
So disable it since memcpy test contains a lot of inline calls.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
- API rte_timer_reset() should return -1 when the timer is in the
RUNNING or CONFIG state. Instead, it ignores the return value of
internal function __rte_timer_reset() and always returns 0.
We change rte_timer_reset() to return the value returned by
__rte_timer_reset().
- Enhance timer stress test 2 to report how many timer reset
collisions occur, i.e., how many times rte_timer_reset() fails
due to a timer being in the CONFIG state.
Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
In test_sched, we are missing NULL pointer checks after create_mempool()
and rte_pktmbuf_alloc(). Add in these checks using TEST_ASSERT_NOT_NULL macros.
VERIFY macro was removed and replaced by standard test ASSERTS from "test.h" header.
This provides additional information to track when the failure occurred.
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Following commit c07691ae10, an implicit change has been done in the
devargs API.
This triggers problem in virtual pmds that did not check for parameters
validity as it was implicitely valid.
Fix this by restoring the empty argument as "" and add a note in the api.
Restore associated tests.
Fixes: c07691ae10 ("devargs: remove limit on parameters length")
Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
The 'callbacks' member of the rte_eth_dev structure has been renamed
to 'link_intr_cbs' to make it clear that it refers to callbacks from
NIC interrupts. This allows us to add other types of callbacks to
the structure without ambiguity.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This patch removes all references to RTE_MBUF_REFCNT, setting the refcnt
field in the mbuf struct permanently.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Since rte_hash_crc() can now be run regardless of SSE4.2 support,
we can safely remove compile checks for RTE_MACHINE_CPUFLAG_SSE4_2
in test utilities.
Signed-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This patch removes the flexbytes_offset from rte_fdir_conf, because
the flexible payload setting is done by flex_conf instead of flexbytes_offset.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Added 4 unit tests checking link bonding mode 6 behavior.
Also modified virtual_pmd so it is possible to provide packets,
that should be received with rx_burst and to inspect packets
transmitted by tx_burst.
In packet_burst_generator.c function creating eth_header is
modified, so it accepts ether_type as a parameter and function
creating arp_header is added. Updated other unit tests to get
rid of compilation errors.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
This patch modify mode older name from
BONDING_MODE_ADAPTIVE_TRANSMIT_LOAD_BALANCING to BONDING_MODE_TLB
This patch also changes order of TEST_ASSERT macro in
test_tlb_verify_slave_link_status_change_failover.
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
This patch links test application against librte_pmd_ring.so for shared
libraries. It's required as long as librte_pmd_ring provides some additional
routines used for testing purposes and must be "hard-linked".
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
This patch adds unit tests for mode 4. It is split into separate
file to avoid problems with other modes that does not need to
look into packets payload.
This patch includes also a modification of maximum number of ports
used in their tests for bonding modes 0-3 from 16 to 6.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Adding new reorder unit test for the test app.
The command to run the unit test from the test shell is: reorder_autotest
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Add missing free for devargs->args and fix tests.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The Link bonding library is incorrectly using receive packet type flags
in the transmit policy hashing functions, which would cause packets
generated locally to be incorrectly distributed across the slave
devices. This patch completely removes the dependency on the packet
type flags and uses the ether_type from either the Ethernet header or
the VLAN headers for branching.
This patch also includes the associate changes in the test suite and in
the packet_burst_generator code to remove the dependences on the packet
type flags.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Make sure that test_acl would not ignore error conditions.
Run classify() with all possible values.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
This patch contains a fix for link bonding handling of vlan tagged packets in mode 3 and 5.
Currently xmit_slave_hash function misinterprets the PKT_RX_VLAN_PKT flag to mean that
there is a vlan tag within the packet when in actually means that there is a valid entry
in the vlan_tci field in the mbuf.
- Fixed VLAN tag support in hashing functions.
- Adds support for TCP in layer 4 header hashing.
- Splits transmit hashing function into separate functions for each policy to
reduce branching and to make the code clearer.
- Fixed incorrect flag set in test application packet generator.
Test report: http://dpdk.org/ml/archives/dev/2015-January/010792.html
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
One occurrence call to strncmp had the closing brace in the wrong
place. Changing this form:
if (strncmp(X, Y, sizeof(X) != 0))
which does a comparison of length 1, to
if (strncmp(X, Y, sizeof(X)) != 0)
which does the correct length comparison and then compares the result
to zero in the "if" part.
Seen with clang-3.5:
"error: size argument in 'strncmp' call is a comparison"
This patch is similar to 261386248 but it looks that one occurrence
was forgotten.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
One of the test assertion macros was missing the "do" part of the
do-while. This issue was picked up by clang reporting an empty while
loop body for the closing while of the do-while pair.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
If mbuf allocation failed for whatever reason, we would get a NULL
pointer exception in test_table_acl.c:test_pipeline_single_filter test
case.
We fix this by causing an early break out of the application loop. If we
quit the test immediately we would leak any existing allocated mbufs,
but by breaking instead, we allow the test to continue and clean up the
mbufs already in the pipeline, while still having a test failure as the
mbuf counts should not match.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
In the kvargs test cases, we were checking for errors by checking if the
returned pointer value was NULL. In the error handling, we then tried to
free back the NULL pointer, which would cause a crash.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Since commit a155d4301 "support link bonding device initialization",
EAL probes drivers to the PCI devices in rte_eal_init,
then PCI resources are mapped if a device
is bound to igb_uio driver, for instance.
Therefore, test app probes all the devices and multiprocess unit test
tries to map resources twice in the secondary processes, and test fails,
caused by RTE_PCI_DRV_NEEDED_MAPPING flag in dummy pci driver my_driver2.
Test is fixed by setting the driver flags to 0.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Since commit b91c67e5a6,
maximum number of cores is 128, which has increase
the total memory necessary for a rte_mempool structure,
as the per-lcore local cache has been doubled in size.
Therefore, eal_flags unit test was broken since it needed
to use more hugepages.
Increased memory to 18MB, as that is the actual minimum memory necessary
(depending on the physical memory segments, DPDK may need less memory)
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Adding call to mac_address_slaves_update from the lsc handler when the
first slave become active to propagate any mac changes made while
devices are inactive
Changed removing slave logic to use memmove instead of memcpy to move
data within the same array, as this was corrupting the slave array.
Adding unit test to cover failing assignment scenarios
Test report: http://dpdk.org/ml/archives/dev/2014-December/009623.html
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
When using test-pmd with flow director in FreeBSD, the application will
segfault/Bus error while parsing the command-line. This is due to how
each commands result structure is represented during parsing, where the offsets
for each tokens value is stored in a character array(char result_buf[BUFSIZ])
in cmdline_parse()(./lib/librte_cmdline/cmdline_parse.c).
The overflow occurs where BUFSIZ is less than the size of a commands result
structure, in this case "struct cmd_pkt_filter_result"
(app/test-pmd/cmdline.c) is 1088 bytes and BUFSIZ on FreeBSD is 1024 bytes as
opposed to 8192 bytes on Linux.
The problem can be reproduced by running test-pmd on FreeBSD:
./testpmd -c 0x3 -n 4 -- -i --portmask=0x3 --pkt-filter-mode=perfect
And adding a filter:
add_perfect_filter 0 udp src 192.168.0.0 1024 dst 192.168.0.0 1024 flexbytes
0x800 vlan 0 queue 0 soft 0x17
This patch removes the OS dependency on BUFSIZ and defines and uses a
library #define CMDLINE_PARSE_RESULT_BUFSIZE 8192
Added boundary checking to ensure this buffer size cannot overflow, with
an error message being produced.
Suggested-by: Olivier Matz <olivier.matz@6wind.com>
http://git.droids-corp.org/?p=libcmdline.git;a=commitdiff;h=b1d5b169352e57df3fc14c51ffad4b83f3e5613f
Signed-off-by: Alan Carew <alan.carew@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
This Patch add unit tests for mode 5 - tlb - to the oders
link bonding unit tests.
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
CACHE_LINE_SIZE is a macro defined in machine/param.h in FreeBSD and
conflicts with DPDK macro version.
Adding RTE_ prefix to avoid conflicts.
CACHE_LINE_MASK and CACHE_LINE_ROUNDUP are also prefixed.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
[Thomas: updated on HEAD, including PPC]
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Curent implementation in test_memzone.c has bugs in finding the
second smallest memory segment. It's the last smallest memory segment,
but it's not the second smallest memory segment. This bug may cause test
failure in some cases. This patch fixes this bug.
Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
IBM Power architecture has different huge page sizes (16MB, 16GB) than
x86.This patch defines RTE_PGSIZE_16M and RTE_PGSIZE_16G in the
rte_page_sizes enum variable and adds huge page size support of DPDK
for IBM Power architecture.
Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
IBM Power architecture has different cache line size (128 bytes) than
x86 (64 bytes). This patch defines CACHE_LINE_SIZE to 128 bytes to
override the default value 64 bytes to support IBM Power Architecture.
Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
IBM Power processor doesn't have CPU flag hardware registers. This patch
uses aux vector software register to get CPU flags and add CPU flag
checking support for IBM Power architecture.
Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Updated the unit tests to cover both librte_power implementations as well as
the external API.
Signed-off-by: Alan Carew <alan.carew@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Enable users to specify the lcore id that is used as master lcore.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
In current version, used cores can only be specified using a bitmask.
It will now be possible to specify cores in 2 different ways:
- Using a bitmask (-c [0x]nnn): bitmask must be in hex format
- Using a list in following format: -l <c1>[-c2][,c3[-c4],...]
The letter -l can stand for lcore or list.
-l 0-7,16-23,31 being equivalent to -c 0x80FF00FF
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
No need to have different headers for Linux and BSD.
These files are identicals with exception of internal config which has
uio and vfio fields only useful for Linux.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Adding support for lsc interrupt from bonded device to link
bonding library with supporting unit tests in the test application.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
This patch fixes two occurrences where a call to strncmp had the closing
brace in the wrong place. Changing this form:
if (strncmp(X,Y,sizeof(X) != 0))
which does a comparison of length 1, to
if (strncmp(X,Y,sizeof(X)) != 0)
which does the correct length comparison and then compares the result to
zero in the "if" part, as the author presumably originally intended.
Reported-by: Larry Wang <liang-min.wang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
eal_flags and multiprocess unit tests use --file-prefix option
which is not supported in FreeBSD, so it has been removed
if compiled for this OS.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This field is added for librte_distributor. User of librte_distributor
is advocated to set value of mbuf->hash.usr before calling
rte_distributor_process. The value of usr is the tag which stands as
identifier of flow.
Signed-off-by: Qinglai Xiao <jigsaw@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The unit test can be used to measure cycles per packet in different rx/tx routines.
The NIC works in loopback mode. So it doesn't require test equipment to measure throughput.
As result, the unit test shows the average cycles per packet consuming.
When doing the test, make sure the link is UP.
Usage Example:
1. Run unit test app in interactive mode
app/test -c f -n 4 -- -i
2. Run and wait for the result
pmd_perf_autotest
There's option to choose rx/tx pair, default is vector.
set_rxtx_mode [vector|scalar|full|hybrid]
Note: To get acurate scalar fast, please choose 'vector' or 'hybrid' without INC_VEC=y in config
It supports to measure standalone rx or tx.
Usage Example:
Choose rx or tx standalone, default is both
set_rxtx_anchor [rxtx|rxonly|txonly]
It also supports to measure standalone RX burst cycles.
In this way, it won't repeat re-send received packets.
Now it measures two situations, poll before/after xmit(w or w/o desc. cache conflict)
Usage Example:
Set stream control mode, by default is continuous
set_rxtx_sc [continuous|poll_before_xmit|poll_after_xmit]
Test report: http://dpdk.org/ml/archives/dev/2014-October/007145.html
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Yong Liu <yong.liu@intel.com>