|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1 |
|
| #
06c047b6 |
| 09-Feb-2022 |
Stephen Hemminger <[email protected]> |
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free functions found by nullfree.cocci
Signed-off-by: Stephen Hemminger <[email protected]>
show more ...
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1 |
|
| #
e30ef3a3 |
| 14-Oct-2021 |
Vladimir Medvedkin <[email protected]> |
test/hash: fix buffer overflow with jhash
This patch fixes buffer overflow reported by ASAN, please reference https://bugs.dpdk.org/show_bug.cgi?id=818
Some tests for the rte_hash table use the rte
test/hash: fix buffer overflow with jhash
This patch fixes buffer overflow reported by ASAN, please reference https://bugs.dpdk.org/show_bug.cgi?id=818
Some tests for the rte_hash table use the rte_jhash_32b() as the hash function. This hash function interprets the length argument in units of 4 bytes.
This patch adds a wrapper function around rte_jhash_32b() to reflect API differences regarding the length argument, effectively dividing it by 4.
For some tests rte_jhash() is used with keys of length not a multiple of 4 bytes. From the rte_jhash() documentation: If input key is not aligned to four byte boundaries or a multiple of four bytes in length, the memory region just after may be read (but not used in the computation).
This patch increases the size of the proto field of the flow_key struct up to uint32_t.
Bugzilla ID: 818 Fixes: af75078fece3 ("first public release") Cc: [email protected]
Signed-off-by: Vladimir Medvedkin <[email protected]> Acked-by: Yipeng Wang <[email protected]>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2 |
|
| #
9c7d8eed |
| 21-Oct-2020 |
Dharmik Thakkar <[email protected]> |
test/hash: add RCU tests
Add functional and performance tests for the integrated RCU QSBR.
Suggested-by: Honnappa Nagarahalli <[email protected]> Signed-off-by: Dharmik Thakkar <dharmik.
test/hash: add RCU tests
Add functional and performance tests for the integrated RCU QSBR.
Suggested-by: Honnappa Nagarahalli <[email protected]> Signed-off-by: Dharmik Thakkar <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]> Acked-by: Yipeng Wang <[email protected]>
show more ...
|
|
Revision tags: v20.11-rc1, v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1 |
|
| #
9c99878a |
| 01-Jul-2020 |
Jerin Jacob <[email protected]> |
log: introduce logtype register macro
Introduce the RTE_LOG_REGISTER macro to avoid the code duplication in the logtype registration process.
It is a wrapper macro for declaring the logtype, regist
log: introduce logtype register macro
Introduce the RTE_LOG_REGISTER macro to avoid the code duplication in the logtype registration process.
It is a wrapper macro for declaring the logtype, registering it and setting its level in the constructor context.
Signed-off-by: Jerin Jacob <[email protected]> Acked-by: Adam Dybkowski <[email protected]> Acked-by: Sachin Saxena <[email protected]> Acked-by: Akhil Goyal <[email protected]>
show more ...
|
|
Revision tags: v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3 |
|
| #
f2fc83b4 |
| 09-Feb-2020 |
Thomas Monjalon <[email protected]> |
replace unused attributes
There is a common macro __rte_unused, avoiding warnings, which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <[email protected]>
|
| #
ef5baf34 |
| 09-Feb-2020 |
Thomas Monjalon <[email protected]> |
replace packed attributes
There is a common macro __rte_packed for packing structs, which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <[email protected]>
|
| #
27fb5dd2 |
| 23-Mar-2020 |
Ruifeng Wang <[email protected]> |
test: skip some subtests in no-huge mode
When running with '--no-huge' flag, tests failed with messages as: ACL context creation with invalid NUMA should have failed! fbk hash creation shoul
test: skip some subtests in no-huge mode
When running with '--no-huge' flag, tests failed with messages as: ACL context creation with invalid NUMA should have failed! fbk hash creation should have failed test_table_pipeline: Check pipeline invalid params failed.
These cases test against invalid socket ID as input parameter, and expect error return. But function calls return success because invalid sock ID is overwritten to SOCKET_ID_ANY when in no-huge mode.
The tests against invalid socket ID are skipped in no-huge mode.
Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mode") Cc: [email protected]
Signed-off-by: Ruifeng Wang <[email protected]> Reviewed-by: Gavin Hu <[email protected]> Acked-by: Aaron Conole <[email protected]> Acked-by: Yipeng Wang <[email protected]>
show more ...
|
|
Revision tags: v20.02-rc2 |
|
| #
71bdd8a1 |
| 24-Jan-2020 |
Pavan Nikhilesh <[email protected]> |
app: use common macro RTE_DIM
Use RTE_DIM macro to calculate array size.
Suggested-by: David Marchand <[email protected]> Signed-off-by: Pavan Nikhilesh <[email protected]> Acked-by:
app: use common macro RTE_DIM
Use RTE_DIM macro to calculate array size.
Suggested-by: David Marchand <[email protected]> Signed-off-by: Pavan Nikhilesh <[email protected]> Acked-by: David Marchand <[email protected]>
show more ...
|
|
Revision tags: v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1, v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1 |
|
| #
0c9da755 |
| 29-May-2019 |
David Marchand <[email protected]> |
net: replace IPv4/v6 constants with uppercase name
Since we change these macros, we might as well avoid triggering complaints from checkpatch because of mixed case.
old=RTE_IPv4 new=RTE_IPV4 git gr
net: replace IPv4/v6 constants with uppercase name
Since we change these macros, we might as well avoid triggering complaints from checkpatch because of mixed case.
old=RTE_IPv4 new=RTE_IPV4 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
old=RTE_ETHER_TYPE_IPv4 new=RTE_ETHER_TYPE_IPV4 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
old=RTE_ETHER_TYPE_IPv6 new=RTE_ETHER_TYPE_IPV6 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Olivier Matz <[email protected]>
show more ...
|
| #
24ac604e |
| 21-May-2019 |
Olivier Matz <[email protected]> |
net: add rte prefix to IP defines
Add 'RTE_' prefix to defines: - rename IPv4( as RTE_IPv4(. - rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN. - rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK. -
net: add rte prefix to IP defines
Add 'RTE_' prefix to defines: - rename IPv4( as RTE_IPv4(. - rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN. - rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK. - rename IPV4_IHL_MULTIPLIER as RTE_IPV4_IHL_MULTIPLIER. - rename IPV4_HDR_DF_SHIFT as RTE_IPV4_HDR_DF_SHIFT. - rename IPV4_HDR_MF_SHIFT as RTE_IPV4_HDR_MF_SHIFT. - rename IPV4_HDR_FO_SHIFT as RTE_IPV4_HDR_FO_SHIFT. - rename IPV4_HDR_DF_FLAG as RTE_IPV4_HDR_DF_FLAG. - rename IPV4_HDR_MF_FLAG as RTE_IPV4_HDR_MF_FLAG. - rename IPV4_HDR_OFFSET_MASK as RTE_IPV4_HDR_OFFSET_MASK. - rename IPV4_HDR_OFFSET_UNITS as RTE_IPV4_HDR_OFFSET_UNITS. - rename IPV4_ANY as RTE_IPV4_ANY. - rename IPV4_LOOPBACK as RTE_IPV4_LOOPBACK. - rename IPV4_BROADCAST as RTE_IPV4_BROADCAST. - rename IPV4_ALLHOSTS_GROUP as RTE_IPV4_ALLHOSTS_GROUP. - rename IPV4_ALLRTRS_GROUP as RTE_IPV4_ALLRTRS_GROUP. - rename IPV4_MAX_LOCAL_GROUP as RTE_IPV4_MAX_LOCAL_GROUP. - rename IPV4_MIN_MCAST as RTE_IPV4_MIN_MCAST. - rename IPV4_MAX_MCAST as RTE_IPV4_MAX_MCAST. - rename IS_IPV4_MCAST as RTE_IS_IPV4_MCAST. - rename IPV6_HDR_FL_SHIFT as RTE_IPV6_HDR_FL_SHIFT. - rename IPV6_HDR_TC_SHIFT as RTE_IPV6_HDR_TC_SHIFT. - rename IPV6_HDR_FL_MASK as RTE_IPV6_HDR_FL_MASK. - rename IPV6_HDR_TC_MASK as RTE_IPV6_HDR_TC_MASK.
Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v19.05, v19.05-rc4 |
|
| #
a55f182b |
| 09-May-2019 |
Dharmik Thakkar <[email protected]> |
test/hash: check freeing key with position
This patch adds a unit test for rte_hash_free_key_with_position().
Suggested-by: Linfan <[email protected]> Signed-off-by: Dharmik Thakkar <dharmik.
test/hash: check freeing key with position
This patch adds a unit test for rte_hash_free_key_with_position().
Suggested-by: Linfan <[email protected]> Signed-off-by: Dharmik Thakkar <[email protected]> Acked-by: Yipeng Wang <[email protected]>
show more ...
|
|
Revision tags: v19.05-rc3, v19.05-rc2, v19.05-rc1 |
|
| #
54e5545d |
| 26-Feb-2019 |
Dharmik Thakkar <[email protected]> |
test/hash: replace config macro with runtime log level
Need to set hash log type to debug to print debug information, using following eal parameter: --log-level=test.hash:debug
Suggested-by: Thomas
test/hash: replace config macro with runtime log level
Need to set hash log type to debug to print debug information, using following eal parameter: --log-level=test.hash:debug
Suggested-by: Thomas Monjalon <[email protected]> Signed-off-by: Dharmik Thakkar <[email protected]> Reviewed-by: Honnappa Nagarahalli <[email protected]> Reviewed-by: Gavin Hu <[email protected]> Reviewed-by: Phil Yang <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
a9de470c |
| 26-Feb-2019 |
Bruce Richardson <[email protected]> |
test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we ca
test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we can move it back to where it all started in early versions of DPDK - the "app/" folder.
This move has a couple of advantages: * This reduces clutter at the top level of the project, due to one less folder. * It eliminates the separate build task necessary for building the autotests using make "make test-build" which means that developers are less likely to miss something in their own compilation tests * It re-aligns the final location of the test binary in the app folder when building with make with it's location in the source tree.
For meson builds, the autotest app is different from the other apps in that it needs a series of different test cases defined for it for use by "meson test". Therefore, it does not get built as part of the main loop in the app folder, but gets built separately at the end.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
|
Revision tags: v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3, v18.11-rc2, v18.11-rc1, v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5, v18.05-rc4, v18.05-rc3, v18.05-rc2, v18.05-rc1, v18.02, v18.02-rc4, v18.02-rc3, v18.02-rc2, v18.02-rc1, v17.11, v17.11-rc4, v17.11-rc3, v17.11-rc2, v17.11-rc1, v17.08, v17.08-rc4, v17.08-rc3, v17.08-rc2, v17.08-rc1, v17.05, v17.05-rc4, v17.05-rc3, v17.05-rc2, v17.05-rc1, v17.02, v17.02-rc3, v17.02-rc2, v17.02-rc1, v16.11, v16.11-rc3, v16.11-rc2, v16.11-rc1 |
|
| #
c4783d96 |
| 12-Sep-2016 |
Olivier Matz <[email protected]> |
app/test: decrease memory requirements for hash
In hash autotest, the size of tables that should be successfully created is 32K entries (256KB), except for the table called "different_name", which i
app/test: decrease memory requirements for hash
In hash autotest, the size of tables that should be successfully created is 32K entries (256KB), except for the table called "different_name", which is 1M entries (8MB). When memory is too fragmented (with 2M hugepages), the test can fail.
To avoid allocation failures due to memory fragmentation, decrease the size of the table to 32K.
Signed-off-by: Olivier Matz <[email protected]>
show more ...
|
|
Revision tags: v16.07, v16.07-rc5, v16.07-rc4, v16.07-rc3 |
|
| #
26e09db6 |
| 13-Jul-2016 |
Thomas Monjalon <[email protected]> |
app/test: rework command registration
The tests are registered with their command name by adding a structure to a list. The structure of each test was declared in each test file and passed to the re
app/test: rework command registration
The tests are registered with their command name by adding a structure to a list. The structure of each test was declared in each test file and passed to the register macro. This rework generate the structure inside the register macro.
Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: Jan Viktorin <[email protected]>
show more ...
|
|
Revision tags: v16.07-rc2 |
|
| #
6dc34e0a |
| 04-Jul-2016 |
Yari Adan Petralanda <[email protected]> |
hash: retrieve a key given its position
The function rte_hash_get_key_with_position is added in this patch. As the position returned when adding a key is frequently used as an offset into an array o
hash: retrieve a key given its position
The function rte_hash_get_key_with_position is added in this patch. As the position returned when adding a key is frequently used as an offset into an array of user data, this function performs the operation of retrieving a key given this offset.
A possible use case would be to delete a key from the hash table when its entry in the array of data has certain value. For instance, the key could be a flow 5-tuple, and the value stored in the array a time stamp.
Signed-off-by: Juan Antonio Montesinos <[email protected]> Signed-off-by: Yari Adan Petralanda <[email protected]> Acked-by: Pablo de Lara <[email protected]>
show more ...
|
|
Revision tags: v16.07-rc1 |
|
| #
775a8cfc |
| 04-May-2016 |
Thomas Monjalon <[email protected]> |
app/test: shorten execution time
The autotests are too long to be run often. This patch reduces the needed time of some tests in fast_test.
Signed-off-by: Thomas Monjalon <[email protected]>
|
| #
656ecbe9 |
| 19-Apr-2016 |
Thomas Monjalon <[email protected]> |
hash: remove aliases for bulk lookup
The function rte_hash_lookup_multi() was renamed rte_hash_lookup_bulk() in DPDK 1.4 and was kept as an undocumented alias.
Signed-off-by: Thomas Monjalon <thoma
hash: remove aliases for bulk lookup
The function rte_hash_lookup_multi() was renamed rte_hash_lookup_bulk() in DPDK 1.4 and was kept as an undocumented alias.
Signed-off-by: Thomas Monjalon <[email protected]>
show more ...
|
|
Revision tags: v16.04, v16.04-rc4 |
|
| #
1aadacb5 |
| 06-Apr-2016 |
Olivier Matz <[email protected]> |
hash: fix allocation of an existing object
Change rte_hash*_create() functions to return NULL and set rte_errno to EEXIST when the object name already exists. This is the behavior described in the A
hash: fix allocation of an existing object
Change rte_hash*_create() functions to return NULL and set rte_errno to EEXIST when the object name already exists. This is the behavior described in the API documentation in the header file.
These functions were returning a pointer to the existing object in that case, but it is a problem as the caller did not know if the object had to be freed or not.
Doing this change also makes the hash API more consistent with the other APIs (mempool, rings, ...).
Fixes: 916e4f4f4e ("memory: fix for multi process support")
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Pablo de Lara <[email protected]>
show more ...
|
|
Revision tags: v16.04-rc3, v16.04-rc2, v16.04-rc1, v2.2.0, v2.2.0-rc4, v2.2.0-rc3, v2.2.0-rc2 |
|
| #
da8dcc27 |
| 23-Nov-2015 |
Jerin Jacob <[email protected]> |
hash: use armv8-a CRC32 instructions
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
hash: use armv8-a CRC32 instructions
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 <[email protected]>
show more ...
|
|
Revision tags: v2.2.0-rc1 |
|
| #
0f201fe9 |
| 04-Sep-2015 |
Pablo de Lara <[email protected]> |
hash: remove deprecated function and macros
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
hash: remove deprecated function and macros
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 <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]>
show more ...
|
|
Revision tags: v2.1.0, v2.1.0-rc4, v2.1.0-rc3, v2.1.0-rc2, v2.1.0-rc1 |
|
| #
f9edbc9b |
| 11-Jul-2015 |
Pablo de Lara <[email protected]> |
hash: add iterate function
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 itera
hash: add iterate function
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 <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| #
b26473ff |
| 11-Jul-2015 |
Pablo de Lara <[email protected]> |
hash: add reset function
Added reset function to be able to empty the table, without having to destroy and create it again.
Signed-off-by: Pablo de Lara <[email protected]> Acked-by: B
hash: add reset function
Added reset function to be able to empty the table, without having to destroy and create it again.
Signed-off-by: Pablo de Lara <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| #
48a39911 |
| 11-Jul-2015 |
Pablo de Lara <[email protected]> |
hash: replace with cuckoo hash implementation
This patch replaces the existing hash library with another approach, using the Cuckoo Hash method to resolve collisions (open addressing), which pushes
hash: replace with cuckoo hash implementation
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 <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| #
359e17bf |
| 09-Jul-2015 |
Pablo de Lara <[email protected]> |
app/test: improve hash unit tests
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
app/test: improve hash unit tests
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 <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|