| 64fcadea | 03-May-2022 |
Thomas Monjalon <[email protected]> |
avoid AltiVec keyword vector
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily. As a rule, it is better to use the alternative keyword "__ve
avoid AltiVec keyword vector
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily. As a rule, it is better to use the alternative keyword "__vector", so we will be able to #undef vector after including AltiVec header.
Later it may become possible to #undef vector in rte_altivec.h with a compatibility breakage.
Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: David Christensen <[email protected]>
show more ...
|
| 2f51bc9c | 20-May-2022 |
David Marchand <[email protected]> |
eal/freebsd: fix use of newer cpuset macros
FreeBSD has updated its CPU macros to align more with the definitions used on Linux[1]. Unfortunately, while this makes compatibility better in future, it
eal/freebsd: fix use of newer cpuset macros
FreeBSD has updated its CPU macros to align more with the definitions used on Linux[1]. Unfortunately, while this makes compatibility better in future, it means we need to have both legacy and newer definition support. Use a meson check to determine which set of macros are used.
[1] https://cgit.freebsd.org/src/commit/?id=e2650af157bc
Bugzilla ID: 1014 Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity") Fixes: b6be16acfeb1 ("eal: fix control thread affinity with --lcores") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Signed-off-by: Bruce Richardson <[email protected]> Tested-by: Daxue Gao <[email protected]>
show more ...
|
| 26d734b5 | 14-Apr-2022 |
David Marchand <[email protected]> |
devargs: fix leak on hotplug failure
Caught by ASan, if a secondary process tried to attach a device with an incorrect driver name, devargs was leaked.
Fixes: 64051bb1f144 ("devargs: unify scratch
devargs: fix leak on hotplug failure
Caught by ASan, if a secondary process tried to attach a device with an incorrect driver name, devargs was leaked.
Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]>
show more ...
|
| 00901e4d | 25-Feb-2022 |
Luc Pelletier <[email protected]> |
eal/x86: fix unaligned access for small memcpy
Calls to rte_memcpy for 1 < n < 16 could result in unaligned loads/stores, which is undefined behaviour according to the C standard, and strict aliasin
eal/x86: fix unaligned access for small memcpy
Calls to rte_memcpy for 1 < n < 16 could result in unaligned loads/stores, which is undefined behaviour according to the C standard, and strict aliasing violations.
The code was changed to use a packed structure that allows aliasing (using the __may_alias__ attribute) to perform the load/store operations. This results in code that has the same performance as the original code and that is also C standards-compliant.
Fixes: af75078fece3 ("first public release") Cc: [email protected]
Signed-off-by: Luc Pelletier <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Tested-by: Konstantin Ananyev <[email protected]>
show more ...
|
| b70a9b78 | 12-May-2022 |
Tyler Retzlaff <[email protected]> |
eal: get/set thread affinity per thread identifier
Implement functions for getting/setting thread affinity. Threads can be pinned to specific cores by setting their affinity attribute.
Windows erro
eal: get/set thread affinity per thread identifier
Implement functions for getting/setting thread affinity. Threads can be pinned to specific cores by setting their affinity attribute.
Windows error codes are translated to errno-style error codes. The possible return values are chosen so that we have as much semantic compatibility between platforms as possible.
note: convert_cpuset_to_affinity has a limitation that all cpus of the set belong to the same processor group.
Signed-off-by: Narcisa Vasile <[email protected]> Signed-off-by: Tyler Retzlaff <[email protected]> Acked-by: Dmitry Kozlyuk <[email protected]>
show more ...
|
| 56539289 | 12-May-2022 |
Tyler Retzlaff <[email protected]> |
eal: provide current thread identifier
Provide a portable type-safe thread identifier. Provide rte_thread_self for obtaining current thread identifier.
Signed-off-by: Narcisa Vasile <navasile@linux
eal: provide current thread identifier
Provide a portable type-safe thread identifier. Provide rte_thread_self for obtaining current thread identifier.
Signed-off-by: Narcisa Vasile <[email protected]> Signed-off-by: Tyler Retzlaff <[email protected]> Acked-by: Dmitry Kozlyuk <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
show more ...
|
| f80ae1aa | 13-May-2022 |
Pavan Nikhilesh <[email protected]> |
hash: unify CRC32 selection for x86 and Arm
Merge CRC32 hash calculation public API implementation for x86 and Arm. Select the best available CRC32 algorithm when unsupported algorithm on a given CP
hash: unify CRC32 selection for x86 and Arm
Merge CRC32 hash calculation public API implementation for x86 and Arm. Select the best available CRC32 algorithm when unsupported algorithm on a given CPU architecture is requested by an application.
Previously, if an application directly includes `rte_crc_arm64.h` without including `rte_hash_crc.h` it will fail to compile.
Signed-off-by: Pavan Nikhilesh <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]>
show more ...
|
| 3011c5a4 | 13-May-2022 |
Pavan Nikhilesh <[email protected]> |
hash: split x86 and SW hash CRC intrinsics
Split x86 and SW hash crc intrinsics into separate files.
Signed-off-by: Pavan Nikhilesh <[email protected]> Reviewed-by: Ruifeng Wang <ruifeng.wan
hash: split x86 and SW hash CRC intrinsics
Split x86 and SW hash crc intrinsics into separate files.
Signed-off-by: Pavan Nikhilesh <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]> Acked-by: Yipeng Wang <[email protected]>
show more ...
|
| 44516e6b | 16-May-2022 |
Shijith Thotton <[email protected]> |
eventdev: add weight and affinity to queue attributes
Extended eventdev queue QoS attributes to support weight and affinity. If queues are of the same priority, events from the queue with highest we
eventdev: add weight and affinity to queue attributes
Extended eventdev queue QoS attributes to support weight and affinity. If queues are of the same priority, events from the queue with highest weight will be scheduled first. Affinity indicates the number of times, the subsequent schedule calls from an event port will use the same event queue. Schedule call selects another queue if current queue goes empty or schedule count reaches affinity count.
To avoid ABI break, weight and affinity attributes are not yet added to queue config structure and rely on PMD for managing it. New eventdev op queue_attr_get can be used to get it from the PMD.
Signed-off-by: Shijith Thotton <[email protected]> Acked-by: Jerin Jacob <[email protected]>
show more ...
|
| 97b914f4 | 16-May-2022 |
Shijith Thotton <[email protected]> |
eventdev: support setting queue attributes at runtime
Added a new eventdev API rte_event_queue_attr_set(), to set event queue attributes at runtime from the values set during initialization using rt
eventdev: support setting queue attributes at runtime
Added a new eventdev API rte_event_queue_attr_set(), to set event queue attributes at runtime from the values set during initialization using rte_event_queue_setup(). PMD's supporting this feature should expose the capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR.
Signed-off-by: Shijith Thotton <[email protected]> Acked-by: Jerin Jacob <[email protected]>
show more ...
|
| 1ff23ce6 | 13-May-2022 |
Pavan Nikhilesh <[email protected]> |
eventdev: quiesce an event port
Add function to quiesce any core specific resources consumed by the event port.
When the application decides to migrate the event port to another lcore or teardown t
eventdev: quiesce an event port
Add function to quiesce any core specific resources consumed by the event port.
When the application decides to migrate the event port to another lcore or teardown the current lcore it may to call `rte_event_port_quiesce` to make sure that all the data associated with the event port are released from the lcore, this might also include any prefetched events.
While releasing the event port from the lcore, this function calls the user-provided flush callback once per event.
Signed-off-by: Pavan Nikhilesh <[email protected]> Acked-by: Jerin Jacob <[email protected]>
show more ...
|
| 791dfec2 | 26-Apr-2022 |
Ankur Dwivedi <[email protected]> |
eventdev/timer: add telemetry
Adds telemetry support to get timer adapter info and timer adapter statistics.
Signed-off-by: Ankur Dwivedi <[email protected]> Reviewed-by: Jerin Jacob <jerinj@mar
eventdev/timer: add telemetry
Adds telemetry support to get timer adapter info and timer adapter statistics.
Signed-off-by: Ankur Dwivedi <[email protected]> Reviewed-by: Jerin Jacob <[email protected]>
show more ...
|
| b450a990 | 24-Mar-2022 |
David Marchand <[email protected]> |
eventdev/eth_rx: fix telemetry Rx stats reset
Caught by covscan:
1. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: logical_vs_bitwise: "~(*__ctype_b_loc()[(int)*params] & 2048 /* (unsigne
eventdev/eth_rx: fix telemetry Rx stats reset
Caught by covscan:
1. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: logical_vs_bitwise: "~(*__ctype_b_loc()[(int)*params] & 2048 /* (unsigned short)_ISdigit */)" is always 1/true regardless of the values of its operand. This occurs as the logical second operand of "||". 2. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: remediation: Did you intend to use "!" rather than "~"?
While isdigit return value should be compared as an int to 0, prefer ! since all of this file uses this convention.
Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Acked-by: Jay Jayatheerthan <[email protected]>
show more ...
|
| 93e1ea6d | 06-Apr-2022 |
Huisong Li <[email protected]> |
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag is not set in dev_configure, RSS will be not configured and enabled. However, RSS h
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag is not set in dev_configure, RSS will be not configured and enabled. However, RSS hash and reta can still be configured by ethdev ops to enable RSS if the flag isn't set. The behavior is inconsistent.
Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names") Cc: [email protected]
Signed-off-by: Huisong Li <[email protected]> Signed-off-by: Min Hu (Connor) <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| 8c9e97dd | 05-May-2022 |
Aman Singh <[email protected]> |
ethdev: fix build with vtune option
When VTune profile option is enabled, compilation error is seen.
Bugzilla ID: 1004 Fixes: f9bdee267ab8 ("ethdev: hide internal structures") Cc: [email protected]
ethdev: fix build with vtune option
When VTune profile option is enabled, compilation error is seen.
Bugzilla ID: 1004 Fixes: f9bdee267ab8 ("ethdev: hide internal structures") Cc: [email protected]
Signed-off-by: Aman Singh <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]>
show more ...
|
| c5736998 | 24-Mar-2022 |
Maxime Coquelin <[email protected]> |
vhost: fix missing virtqueue lock protection
This patch ensures virtqueue metadata are not being modified while rte_vhost_vring_call() is executed.
Fixes: 6c299bb7322f ("vhost: introduce vring call
vhost: fix missing virtqueue lock protection
This patch ensures virtqueue metadata are not being modified while rte_vhost_vring_call() is executed.
Fixes: 6c299bb7322f ("vhost: introduce vring call API") Cc: [email protected]
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| 09c28563 | 25-Apr-2022 |
David Marchand <[email protected]> |
vhost: validate FDs attached to messages
Some message handlers do not expect any file descriptor attached as ancillary data. Provide a common way to enforce this by adding a accepts_fd boolean in th
vhost: validate FDs attached to messages
Some message handlers do not expect any file descriptor attached as ancillary data. Provide a common way to enforce this by adding a accepts_fd boolean in the message handler structure. When a message handler sets accepts_fd to true, it is responsible for calling validate_msg_fds with a right expected file descriptor count. This will avoid leaking some file descriptor by mistake when adding support for new vhost user message types.
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| e4b12ba5 | 25-Apr-2022 |
David Marchand <[email protected]> |
vhost: refactor messages handlers declaration
Move message handler description and callbacks into a single array and remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.
Signed-off-by: David M
vhost: refactor messages handlers declaration
Move message handler description and callbacks into a single array and remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| 1419e8d9 | 08-Apr-2022 |
Xuan Ding <[email protected]> |
vhost: add unsafe API to check in-flight packets
In async data path, when vring state changes or device is destroyed, it is necessary to know the number of in-flight packets in DMA engine. This patc
vhost: add unsafe API to check in-flight packets
In async data path, when vring state changes or device is destroyed, it is necessary to know the number of in-flight packets in DMA engine. This patch provides a thread unsafe API to return the number of in-flight packets for a vhost queue without using any lock.
Signed-off-by: Xuan Ding <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| 48ff13ef | 05-May-2022 |
David Marchand <[email protected]> |
test/mem: disable ASan when accessing unallocated memory
As described in bugzilla, ASan reports accesses to all memory segment as invalid, since those parts have not been allocated with rte_malloc.
test/mem: disable ASan when accessing unallocated memory
As described in bugzilla, ASan reports accesses to all memory segment as invalid, since those parts have not been allocated with rte_malloc. Move __rte_no_asan to rte_common.h and disable ASan on a part of the test.
Bugzilla ID: 880 Fixes: 6cc51b1293ce ("mem: instrument allocator for ASan") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Acked-by: Anatoly Burakov <[email protected]>
show more ...
|
| 99783e21 | 27-Apr-2022 |
Anoob Joseph <[email protected]> |
security: fix SA lifetime comments
Fix comments to reflect the hard expiry fields.
Fixes: ad7515a39f2a ("security: add SA lifetime configuration") Cc: [email protected]
Reported-by: Thomas Monjalon
security: fix SA lifetime comments
Fix comments to reflect the hard expiry fields.
Fixes: ad7515a39f2a ("security: add SA lifetime configuration") Cc: [email protected]
Reported-by: Thomas Monjalon <[email protected]> Signed-off-by: Anoob Joseph <[email protected]> Reviewed-by: Morten Brørup <[email protected]>
show more ...
|
| 28c5d600 | 05-May-2022 |
Tianhao Chai <[email protected]> |
eal: fix C++ include for device event and DMA
Currently the "extern C" section ends right before rte_dev_dma_unmap and other DMA function declarations, causing some C++ compilers to produce C++ mang
eal: fix C++ include for device event and DMA
Currently the "extern C" section ends right before rte_dev_dma_unmap and other DMA function declarations, causing some C++ compilers to produce C++ mangled symbols to rte_dev_dma_unmap instead of C symbols. This leads to build failures later when linking a final executable against this object.
Fixes: a753e53d517b ("eal: add device event monitor framework") Cc: [email protected]
Signed-off-by: Tianhao Chai <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Tyler Retzlaff <[email protected]>
show more ...
|
| 4d8bdd8b | 04-May-2022 |
Anatoly Burakov <[email protected]> |
malloc: fix ASan handling for unmapped memory
Currently, when we free previously allocated memory, we mark the area as "freed" for ASan purposes (flag 0xfd). However, sometimes, freeing a malloc ele
malloc: fix ASan handling for unmapped memory
Currently, when we free previously allocated memory, we mark the area as "freed" for ASan purposes (flag 0xfd). However, sometimes, freeing a malloc element will cause pages to be unmapped from memory and re-backed with anonymous memory again. This may cause ASan's "use-after-free" error down the line, because the allocator will try to write into memory areas recently marked as "freed".
To fix this, we need to mark the unmapped memory area as "available", and fixup surrounding malloc element header/trailers to enable later malloc routines to safely write into new malloc elements' headers or trailers.
Bugzilla ID: 994 Fixes: 6cc51b1293ce ("mem: instrument allocator for ASan") Cc: [email protected]
Reported-by: David Marchand <[email protected]> Signed-off-by: Anatoly Burakov <[email protected]>
show more ...
|
| 90bf3f89 | 21-Apr-2022 |
Deepak Khandelwal <[email protected]> |
mem: skip attaching external memory in secondary process
Currently, EAL init in secondary processes will attach all fbarrays in the memconfig to have access to the primary process's page tables. How
mem: skip attaching external memory in secondary process
Currently, EAL init in secondary processes will attach all fbarrays in the memconfig to have access to the primary process's page tables. However, fbarrays corresponding to external memory segments should not be attached at initialization, because this will happen as part of `rte_extmem_attach` [1] or `rte_malloc_heap_memory_attach` [2] calls.
1: https://doc.dpdk.org/api/rte__memory_8h.html#a2796da68de6825f8edf53759f8e4d230 2: https://doc.dpdk.org/api/rte__malloc_8h.html#af6360dea35bdf162feeb2b62cf149fd3
Fixes: ff3619d6244b ("malloc: allow attaching to external memory chunks") Cc: [email protected]
Suggested-by: Anatoly Burakov <[email protected]> Signed-off-by: Deepak Khandelwal <[email protected]> Acked-by: Anatoly Burakov <[email protected]>
show more ...
|
| 8001c0dd | 14-Apr-2022 |
Tyler Retzlaff <[email protected]> |
eal/windows: set main lcore affinity
Add missing code to affinitize main_lcore from lcore configuration.
Signed-off-by: Tyler Retzlaff <[email protected]> Reviewed-by: David Marchand <da
eal/windows: set main lcore affinity
Add missing code to affinitize main_lcore from lcore configuration.
Signed-off-by: Tyler Retzlaff <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|