|
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 ...
|
| #
985571b6 |
| 03-Feb-2022 |
David Marchand <[email protected]> |
test/mbuf: fix mbuf data content check
When allocating a mbuf, its data content is most of the time zero'd but nothing ensures this. This is especially wrong when building with RTE_MALLOC_DEBUG, whe
test/mbuf: fix mbuf data content check
When allocating a mbuf, its data content is most of the time zero'd but nothing ensures this. This is especially wrong when building with RTE_MALLOC_DEBUG, where data is poisoned to 0x6b on free.
This test reserves MBUF_TEST_DATA_LEN2 bytes in the mbuf data segment, and sets this data to 0xcc. Calling strlen(), the test may try to read more than MBUF_TEST_DATA_LEN2 which has been noticed when memory had been poisoned.
The mbuf data content is checked right after, so we can simply remove strlen().
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| #
3c60274c |
| 26-Jan-2022 |
Jie Zhou <[email protected]> |
test: skip unsupported tests on Windows
Skip tests which are not yet supported for Windows: - The libraries that tests depend on are not enabled on Windows yet - The tests can compile but with issue
test: skip unsupported tests on Windows
Skip tests which are not yet supported for Windows: - The libraries that tests depend on are not enabled on Windows yet - The tests can compile but with issue still under investigation * test_func_reentrancy: Windows EAL has no protection against repeated calls. * test_lcores: Execution enters an infinite loops, requires investigation. * test_rcu_qsbr_perf: Execution hangs on Windows, requires investigation.
Signed-off-by: Jie Zhou <[email protected]> Signed-off-by: Dmitry Kozlyuk <[email protected]> Acked-by: Tyler Retzlaff <[email protected]>
show more ...
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3 |
|
| #
1f8cc1a3 |
| 17-Nov-2021 |
Joyce Kong <[email protected]> |
app: remove unneeded atomic header include
Remove the unnecessary rte_atomic.h included in app modules.
Signed-off-by: Joyce Kong <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]
app: remove unneeded atomic header include
Remove the unnecessary rte_atomic.h included in app modules.
Signed-off-by: Joyce Kong <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]>
show more ...
|
| #
4a6672c2 |
| 12-Nov-2021 |
Stephen Hemminger <[email protected]> |
fix spelling in comments and doxygen
Fix spelling errors in comments including doxygen found using codespell.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Konstantin Anan
fix spelling in comments and doxygen
Fix spelling errors in comments including doxygen found using codespell.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Vladimir Medvedkin <[email protected]> Reviewed-by: Honnappa Nagarahalli <[email protected]> Acked-by: Ray Kinsella <[email protected]> Acked-by: Cristian Dumitrescu <[email protected]> Acked-by: Chenbo Xia <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc2 |
|
| #
7dc62742 |
| 29-Oct-2021 |
Olivier Matz <[email protected]> |
test/mbuf: fix access to freed memory
Seen by ASan.
In the external buffer mbuf test, we check that the buffer is freed by checking that its refcount is 0. This is not a valid condition, because it
test/mbuf: fix access to freed memory
Seen by ASan.
In the external buffer mbuf test, we check that the buffer is freed by checking that its refcount is 0. This is not a valid condition, because it accesses to an already freed area.
Fix this by setting a boolean flag in the callback when rte_free() is actually called, and check this flag instead.
Bugzilla ID: 867 Fixes: 7b295dceea07 ("test/mbuf: add unit test cases") Cc: [email protected]
Reported-by: David Marchand <[email protected]> Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc1 |
|
| #
daa02b5c |
| 15-Oct-2021 |
Olivier Matz <[email protected]> |
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Sign
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]>
show more ...
|
| #
efc6f910 |
| 29-Sep-2021 |
Olivier Matz <[email protected]> |
mbuf: fix reset on mbuf free
m->nb_seg must be reset on mbuf free whatever the value of m->next, because it can happen that m->nb_seg is != 1. For instance in this case:
m1 = rte_pktmbuf_alloc(mp
mbuf: fix reset on mbuf free
m->nb_seg must be reset on mbuf free whatever the value of m->next, because it can happen that m->nb_seg is != 1. For instance in this case:
m1 = rte_pktmbuf_alloc(mp); rte_pktmbuf_append(m1, 500); m2 = rte_pktmbuf_alloc(mp); rte_pktmbuf_append(m2, 500); rte_pktmbuf_chain(m1, m2); m0 = rte_pktmbuf_alloc(mp); rte_pktmbuf_append(m0, 500); rte_pktmbuf_chain(m0, m1);
As rte_pktmbuf_chain() does not reset nb_seg in the initial m1 segment (this is not required), after this code the mbuf chain have 3 segments: - m0: next=m1, nb_seg=3 - m1: next=m2, nb_seg=2 - m2: next=NULL, nb_seg=1
Then split this chain between m1 and m2, it would result in 2 packets: - first packet - m0: next=m1, nb_seg=2 - m1: next=NULL, nb_seg=2 - second packet - m2: next=NULL, nb_seg=1
Freeing the first packet will not restore nb_seg=1 in the second segment. This is an issue because it is expected that mbufs stored in pool have their nb_seg field set to 1.
Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool") Cc: [email protected]
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Tested-by: Ali Alnubani <[email protected]>
show more ...
|
| #
e9123c46 |
| 12-Oct-2021 |
David Marchand <[email protected]> |
mbuf: enforce no option for dynamic fields and flags
As stated in the API, dynamic field and flags should be created with no additional flag (simply in the API for future changes).
Fix the dynamic
mbuf: enforce no option for dynamic fields and flags
As stated in the API, dynamic field and flags should be created with no additional flag (simply in the API for future changes).
Fix the dynamic flag register helper which was not enforcing it and add unit tests.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Signed-off-by: David Marchand <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ray Kinsella <[email protected]>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1 |
|
| #
eb3fea3c |
| 05-Jul-2021 |
Olivier Matz <[email protected]> |
test/mbuf: fix virtual address conversion
Seen with address sanitizer.
rte_mempool_virt2iova() can only be used on mempool elements. In this case, it is incorrect, and rte_mem_virt2iova() has to be
test/mbuf: fix virtual address conversion
Seen with address sanitizer.
rte_mempool_virt2iova() can only be used on mempool elements. In this case, it is incorrect, and rte_mem_virt2iova() has to be used.
Bugzilla ID: 737 Fixes: 7b295dceea07 ("test/mbuf: add unit test cases") Cc: [email protected]
Reported-by: Zhihong Peng <[email protected]> Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
|
Revision tags: v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1 |
|
| #
e8a419d6 |
| 25-Feb-2021 |
Lance Richardson <[email protected]> |
mbuf: rename outer IP checksum macro
Rename PKT_RX_EIP_CKSUM_BAD to PKT_RX_OUTER_IP_CKSUM_BAD and deprecate the original name. The new name is better aligned with existing PKT_RX_OUTER_* flags, whic
mbuf: rename outer IP checksum macro
Rename PKT_RX_EIP_CKSUM_BAD to PKT_RX_OUTER_IP_CKSUM_BAD and deprecate the original name. The new name is better aligned with existing PKT_RX_OUTER_* flags, which should help reduce confusion about its use.
Suggested-by: Ferruh Yigit <[email protected]> Signed-off-by: Lance Richardson <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ferruh Yigit <[email protected]> Acked-by: Ajit Khaparde <[email protected]>
show more ...
|
|
Revision tags: v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2 |
|
| #
3cd7290c |
| 25-Jan-2021 |
David Marchand <[email protected]> |
ci: catch coredumps
Parts of the unit tests code rely on forked/secondary processes (expectedly) failing. A crash in those situations could be missed so add a check on coredumps presence after unit
ci: catch coredumps
Parts of the unit tests code rely on forked/secondary processes (expectedly) failing. A crash in those situations could be missed so add a check on coredumps presence after unit tests have run. When unit tests fail, it can also help checking for coredumps as it could give more insights on what happened.
In some situations (like explicit call to rte_panic), coredump generation must be disabled to avoid false positives.
Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Acked-by: Luca Boccassi <[email protected]> Acked-by: Aaron Conole <[email protected]>
show more ...
|
|
Revision tags: v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2 |
|
| #
c7e857e1 |
| 28-Oct-2020 |
Thomas Monjalon <[email protected]> |
mbuf: remove deprecated timestamp field
As announced in the deprecation note, the field timestamp is removed to give more space to the dynamic fields. The related offload flag PKT_RX_TIMESTAMP is al
mbuf: remove deprecated timestamp field
As announced in the deprecation note, the field timestamp is removed to give more space to the dynamic fields. The related offload flag PKT_RX_TIMESTAMP is also removed.
This is how the mbuf layout looks like (pahole-style):
word type name byte size 0 void * buf_addr; /* 0 + 8 */ 1 rte_iova_t buf_iova /* 8 + 8 */ /* --- RTE_MARKER64 rearm_data; */ 2 uint16_t data_off; /* 16 + 2 */ uint16_t refcnt; /* 18 + 2 */ uint16_t nb_segs; /* 20 + 2 */ uint16_t port; /* 22 + 2 */ 3 uint64_t ol_flags; /* 24 + 8 */ /* --- RTE_MARKER rx_descriptor_fields1; */ 4 uint32_t union packet_type; /* 32 + 4 */ uint32_t pkt_len; /* 36 + 4 */ 5 uint16_t data_len; /* 40 + 2 */ uint16_t vlan_tci; /* 42 + 2 */ 5.5 uint64_t union hash; /* 44 + 8 */ 6.5 uint16_t vlan_tci_outer; /* 52 + 2 */ uint16_t buf_len; /* 54 + 2 */ 7 uint64_t dynfield0[1]; /* 56 + 8 */ /* --- RTE_MARKER cacheline1; */ 8 struct rte_mempool * pool; /* 64 + 8 */ 9 struct rte_mbuf * next; /* 72 + 8 */ 10 uint64_t union tx_offload; /* 80 + 8 */ 11 struct rte_mbuf_ext_shared_info * shinfo; /* 88 + 8 */ 12 uint16_t priv_size; /* 96 + 2 */ uint16_t timesync; /* 98 + 2 */ 12.5 uint32_t dynfield1[7]; /* 100 + 28 */ 16 /* --- END 128 */
Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Ray Kinsella <[email protected]> Acked-by: David Marchand <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| #
530de86a |
| 31-Oct-2020 |
Thomas Monjalon <[email protected]> |
test/mbuf: skip field registration at busy offset
There is a test for dynamic field registration at a specific offset. Depending on which driver is probed, some dynamic fields may be already registe
test/mbuf: skip field registration at busy offset
There is a test for dynamic field registration at a specific offset. Depending on which driver is probed, some dynamic fields may be already registered at this offset. This failure is skipped with a warning.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") Cc: [email protected]
Reported-by: David Marchand <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
|
Revision tags: v20.11-rc1 |
|
| #
cb056611 |
| 15-Oct-2020 |
Stephen Hemminger <[email protected]> |
eal: rename lcore master and slave
Replace master lcore with main lcore and replace slave lcore with worker lcore.
Keep the old functions and macros but mark them as deprecated for this release.
T
eal: rename lcore master and slave
Replace master lcore with main lcore and replace slave lcore with worker lcore.
Keep the old functions and macros but mark them as deprecated for this release.
The "--master-lcore" command line option is also deprecated and any usage will print a warning and use "--main-lcore" as replacement.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Anatoly Burakov <[email protected]>
show more ...
|
|
Revision tags: v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1 |
|
| #
72ea8d40 |
| 09-Jun-2020 |
Xiaolong Ye <[email protected]> |
test/mbuf: fix a dynamic flag log
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags") Cc: [email protected]
Signed-off-by: Xiaolong Ye <[email protected]>
|
|
Revision tags: v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1 |
|
| #
611faa5f |
| 29-Feb-2020 |
Luca Boccassi <[email protected]> |
fix various typos found by Lintian
Cc: [email protected]
Signed-off-by: Luca Boccassi <[email protected]>
|
|
Revision tags: v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2 |
|
| #
5d3e7176 |
| 06-Feb-2020 |
Viacheslav Ovsiienko <[email protected]> |
test/mbuf: check pinned external buffer
This patch adds unit test for the mbufs allocated from the special pool with pinned external data buffers.
The pinned buffer mbufs are tested in the same way
test/mbuf: check pinned external buffer
This patch adds unit test for the mbufs allocated from the special pool with pinned external data buffers.
The pinned buffer mbufs are tested in the same way as regular ones with taking into account some specifics of cloning/attaching.
Signed-off-by: Viacheslav Ovsiienko <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
|
Revision tags: v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2 |
|
| #
9bf26e13 |
| 05-Nov-2019 |
Viacheslav Ovsiienko <[email protected]> |
ethdev: move egress metadata to dynamic field
The dynamic mbuf fields were introduced by [1]. The egress metadata is good candidate to be moved from statically allocated field tx_metadata to dynamic
ethdev: move egress metadata to dynamic field
The dynamic mbuf fields were introduced by [1]. The egress metadata is good candidate to be moved from statically allocated field tx_metadata to dynamic one. Because mbufs are used in half-duplex fashion only, it is safe to share this dynamic field with ingress metadata.
The shared dynamic field contains either egress (if application going to transmit mbuf with tx_burst) or ingress (if mbuf is received with rx_burst) metadata and can be accessed by RTE_FLOW_DYNF_METADATA() macro or with rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper routines. PKT_TX_DYNF_METADATA/PKT_RX_DYNF_METADATA flag will be set along with the data.
The mbuf dynamic field must be registered by calling rte_flow_dynf_metadata_register() prior accessing the data.
The availability of dynamic mbuf metadata field can be checked with rte_flow_dynf_metadata_avail() routine.
DEV_TX_OFFLOAD_MATCH_METADATA offload and configuration flag is removed. The metadata support in PMDs is engaged on dynamic field registration.
Metadata feature is getting complex. We might have some set of actions and items that might be supported by PMDs in multiple combinations, the supported values and masks are the subjects to query by perfroming trials (with rte_flow_validate).
[1] http://patches.dpdk.org/patch/62040/
Signed-off-by: Viacheslav Ovsiienko <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Olivier Matz <[email protected]> Acked-by: Ori Kam <[email protected]>
show more ...
|
|
Revision tags: v19.11-rc1 |
|
| #
4958ca3a |
| 26-Oct-2019 |
Olivier Matz <[email protected]> |
mbuf: support dynamic fields and flags
Many features require to store data inside the mbuf. As the room in mbuf structure is limited, it is not possible to have a field for each feature. Also, chang
mbuf: support dynamic fields and flags
Many features require to store data inside the mbuf. As the room in mbuf structure is limited, it is not possible to have a field for each feature. Also, changing fields in the mbuf structure can break the API or ABI.
This commit addresses these issues, by enabling the dynamic registration of fields or flags:
- a dynamic field is a named area in the rte_mbuf structure, with a given size (>= 1 byte) and alignment constraint. - a dynamic flag is a named bit in the rte_mbuf structure.
The typical use case is a PMD that registers space for an offload feature, when the application requests to enable this feature. As the space in mbuf is limited, the space should only be reserved if it is going to be used (i.e when the application explicitly asks for it).
The registration can be done at any moment, but it is not possible to unregister fields or flags.
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Thomas Monjalon <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
show more ...
|
| #
b364bc9e |
| 30-Aug-2019 |
Pallantla Poornima <[email protected]> |
test/mbuf: add unit test on mbuf flag names
Added UT for the below functions: - rte_get_rx_ol_flag_list, - rte_get_tx_ol_flag_list, - rte_get_rx_ol_flag_name, - rte_get_tx_ol_flag_name
Signed-off-b
test/mbuf: add unit test on mbuf flag names
Added UT for the below functions: - rte_get_rx_ol_flag_list, - rte_get_tx_ol_flag_list, - rte_get_rx_ol_flag_name, - rte_get_tx_ol_flag_name
Signed-off-by: Pallantla Poornima <[email protected]> Reviewed-by: Reshma Pattan <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| #
7b295dce |
| 30-Aug-2019 |
Lavanya Govindarajan <[email protected]> |
test/mbuf: add unit test cases
Added new unit test cases to cover the below functions: - rte_validate_tx_offload, - rte_pktmbuf_alloc_bulk, - rte_pktmbuf_read, - rte_pktmbuf_ext_shinfo_init_helper,
test/mbuf: add unit test cases
Added new unit test cases to cover the below functions: - rte_validate_tx_offload, - rte_pktmbuf_alloc_bulk, - rte_pktmbuf_read, - rte_pktmbuf_ext_shinfo_init_helper, - rte_pktmbuf_attach_extbuf, - rte_mbuf_ext_refcnt_read, - rte_mbuf_ext_refcnt_update, - rte_mbuf_ext_refcnt_set, - rte_pktmbuf_detach_extbuf
Signed-off-by: Lavanya Govindarajan <[email protected]> Reviewed-by: Reshma Pattan <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| #
824b67c2 |
| 23-Oct-2019 |
Morten Brørup <[email protected]> |
test/mbuf: add case for bulk alloc/free functions
Add unit test for functions for allocating and freeing a bulk of mbufs.
Signed-off-by: Morten Brørup <[email protected]> Acked-by: Olivier M
test/mbuf: add case for bulk alloc/free functions
Add unit test for functions for allocating and freeing a bulk of mbufs.
Signed-off-by: Morten Brørup <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| #
c3a90c38 |
| 08-Oct-2019 |
Stephen Hemminger <[email protected]> |
mbuf: add a copy routine
This is a commonly used operation that surprisingly the DPDK has not supported. The new rte_pktmbuf_copy does a deep copy of packet. This is a complete copy including meta-d
mbuf: add a copy routine
This is a commonly used operation that surprisingly the DPDK has not supported. The new rte_pktmbuf_copy does a deep copy of packet. This is a complete copy including meta-data.
It handles the case where the source mbuf comes from a pool with larger data area than the destination pool. The routine also has options for skipping data, or truncating at a fixed length.
This patch also introduces internal inline to copy the metadata fields of mbuf.
Add a test for this new function, based of the clone tests.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| #
16367754 |
| 08-Oct-2019 |
Stephen Hemminger <[email protected]> |
test/mbuf: fix forged mbuf in clone test
The test for cloning changed mbuf would generate an mbuf whose length and segments count were invalid. This would cause a crash if test was run with mbuf deb
test/mbuf: fix forged mbuf in clone test
The test for cloning changed mbuf would generate an mbuf whose length and segments count were invalid. This would cause a crash if test was run with mbuf debugging enabled.
Fixes: 4ccd2bb3a9e2 ("app/test: enhance mbuf refcnt check") Fixes: af75078fece3 ("first public release") Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|