[PATCH v1] Merge ODP linux-generic v1.51.0.0 - #268
Conversation
Print SNOW 5G based crypto algorithm capabilities. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]> Acked-by: Tejasree Kondoj <[email protected]>
Add SNOW 5G based algorithms in the test suite so that they get included in the combined encrypt-decrypt tests if supported, even though we do not include actual test vectors for them. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]> Acked-by: Tejasree Kondoj <[email protected]>
Do not explicitly set the output_pool crypto session parameter but rely on the default value set by odp_crypto_session_param_init(). Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]> Acked-by: Tejasree Kondoj <[email protected]>
Use odp_crypto_session_param_init() function to initialize session parameters for better forward compatibility with future ODP API versions. Remove setting of the output_pool parameter and rely on the default value set by the init function. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]> Acked-by: Tejasree Kondoj <[email protected]>
Check that used DPDK version is supported during configure. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Adding '-msse4.2' option to DPDK_CFLAGS manually is no longer necessary. The option was added a long time ago when DPDK did not yet support pkg-config for exporting the necessary compiler flags. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Decrease odp_sched_pktio example packet pool size to reduce memory usage. Fixes out of memory failures in CI process mode test. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Add support for printing new ODP_AUTH_ALG_SNOW5G_NIA4 and ODP_CIPHER_ALG_SNOW5G_NEA4 algorithms in odp_crypto_session_print(). Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Use odp_packet_has_ref() function for checking if packet has references to enable loop pktio code reuse with odp-dpdk. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Add missing CONFIG_CACHE_PAD_LINES value print to odp_sys_config_print() output. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Upgrade to Ubuntu 24.04 Coverity container. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
The flush_in_queues() function did nothing since odp_pktin_recv() only receives packet from devices in PKTIO_STATE_STARTED state. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Check that correct pool type is used with odp_buffer_alloc() and odp_buffer_alloc_multi() functions also from application PoV. odp_dma_compl_alloc() and odp_ml_compl_alloc() functions now use implementation internal _odp_event_alloc() function for allocating their events and check the used pool type. Also, make _odp_event_alloc() function inlined. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Match test results output to API function names also in throughput mode. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Add missing test for odp_schedule_multi_wait() function. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Previously 'min_rx_burst' config file options was actually never used by the implementation and instead the default value DPDK_MIN_RX_BURST was used. Also, check that the given 'min_rx_burst' value does not overflow. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Enable application to define all DPDK pktio config file options per DPDK PMD. Also, document this feature better in the config file. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Clarify pktio validation test code by combining all global data inside common pktio_global_t struct. The data is initialized in pktio_suite_init() function. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Save commonly used pktio capabilities during suite init to enable making per test capability checks simpler. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Use pktio capabilities saved during suite init to simplify capability checks. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
…tions
Enable testing single event odp_buffer_alloc/free() and
odp_packet_alloc/free() functions by setting burst size to zero
('--burst 0'). Also, change default burst size to 32.
Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Tuomas Taipale <[email protected]>
Optimize implementation of internal single event specific _odp_event_free() function, which is used to implement several API functions. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Optimize implementation of internal single event specific _odp_event_alloc() function, which is used to implement several API functions. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Use single event alloc function in odp_buffer_alloc() implementation. Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
Add free_ctrl metadata to test_packet_md_t for better test coverage. When free_ctrl was introduced, it was not added to test_packet_md_t. Remove packet length as it depends on packet data and thus makes test_packet_is_md_equal() more cumbersome to use in contexts where packet lengths vary. The current user of the function does not rely on packet length being included. Add missing include guards to packet_common.h. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Matias Elo <[email protected]>
Set L2 offset to ODP_PACKET_OFFSET_INVALID instead of 0 in packet allocation and metadata reset. ODP API says that odp_packet_l2_offset() returns ODP_PACKET_OFFSET_INVALID when the offset has not been set. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Matias Elo <[email protected]>
Improve testing of the default packet metadata after packet allocation and reset. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Matias Elo <[email protected]>
Move packet pool creation and destroying to their own functions from open_pktios() and close_pktios() to shorten open_pktios() and to ensure that the packet pool gets destroyed when open_pktios() fails. Currently odp_term_global() fails after certain failures of open_pktios(), generating many additional error messages. This commit fixes the problem with respect to the packet pool only. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Matias Elo <[email protected]>
SCTP checksum has its own test function that is nearly identical to the test function for IPv4 and UDP checksums. Combine the functions into one to reduce code duplication. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Matias Elo <[email protected]>
Move setting of has_udp and has_sctp flags in the relevant checksum test prep functions to reduce clutter in the common checksum test function. Signed-off-by: Janne Peltonen <[email protected]> Reviewed-by: Matias Elo <[email protected]>
Verify that the values passed with `odp_timer_pool_param_t::periodic::freq::freq_hz` during timer pool creation time match what is delivered with `odp_timer_pool_info_t`. Signed-off-by: Tuomas Taipale <[email protected]> Reviewed-by: Matias Elo <[email protected]>
Increment API version number to reflect the following changes: Backward incompatible: - ipsec: change per-packet outbound options to be optional by introducing odp_ipsec_capability_t.out_op capability bits Backward compatible: - general: clarify that invalid handles must not be passed to ODP API functions unless explicitly allowed - classifier: clarify that the CoS being destroyed must not be used as pktio error CoS - crypto: add ODP_CIPHER_ALG_ZUC_NEA6 cipher and ODP_AUTH_ALG_ZUC_NIA6 auth algorithms - event vector: remove the default value from odp_event_aggr_config_t.event_type specification - packet: remove the value range from the len parameter descriptions of odp_packet_push_head(), odp_packet_pull_head(), odp_packet_push_tail(), and odp_packet_pull_tail() - packet: relax odp_packet_ref() specification regarding referencing relationship after pull or truncation operations - pktio: clarify that odp_pktio_default_cos_set() may be called multiple times, each call replacing the previous default CoS binding - pktio: clarify that odp_pktio_error_cos_set() may be called multiple times, each call replacing the previous error CoS binding - timer: change odp_timer_pool_param_t.periodic.freq.freq_hz to a pointer to const - timer: clarify odp_timer_pool_info() frequency values for ODP_TIMER_TYPE_PERIODIC_FREQ timer pools - timer: clarify that parameter values unused by the timer pool type are undefined in odp_timer_pool_info() Signed-off-by: Matias Elo <[email protected]> Reviewed-by: Petri Savolainen <[email protected]> Reviewed-by: Janne Peltonen <[email protected]>
Merge ODP linux-generic v1.51.0.0 into linux-dpdk. Signed-off-by: Matias Elo <[email protected]>
…ader file" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…urce file" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…ostic" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…ctory" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…ctions" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…ned" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…nd conversions" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…on ID metadata copying" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. ODP-DPDK packet header layout is different compared to linux-generic, so not all changes have been ported. Signed-off-by: Matias Elo <[email protected]>
…etadata copying" Port original commit from linux-generic. ODP-DPDK packet header layout is different compared to linux-generic, so not all changes have been ported. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
…n pragmas" Port original commit from linux-generic. Signed-off-by: Matias Elo <[email protected]>
Replace _odp_event_free_multi() fast path 'num' parameter check with a debug only check. The 'num' parameter validity is checked before this function is called. Signed-off-by: Matias Elo <[email protected]>
Replace _odp_event_free_sp() fast path 'num' parameter check with a debug only check. The 'num' parameter validity is checked before this function is called. Also, remove unnecessary check of the first event from the debug loop. Signed-off-by: Matias Elo <[email protected]>
| @@ -17,13 +17,11 @@ jobs: | |||
| strategy: | |||
There was a problem hiding this comment.
It appears that the merge of the previous ODP API release (1.50.0) did not go in the usual way. Instead of a merge commit of odp v1.50.0.0 to odp-dpdk master, the commits from odp were cherry-picked/replayed to odp-dpdk. Maybe it was not intentional but due to accidental use of Github's rebase-and-merge button?
Now this PR has the traditional merge commit followed by the port commits. I suppose the merge commit is supposed to stay when this PR is pushed to the master branch. But since the previous API release did not have the merge commit, the latest common ancestor of the merged branches is still odp v1.49.0.0, which means that the odp commits for 1.50 that were already copied to master appear again as the original odp commits in the odp parent branch of the 1.51 merge commit. This makes the history a bit confusing.
I think it might be good (assuming that a merge based approach is still preferred and that 1.50 was an exception) to introduce a merge commit from v1.50.0.0 (i.e. 14db298) to odp-dpdk master before this 1.51 PR. The merge commit would not change anything in the code since the commits are already there but it would make the history more readable as the odp parent branch of the 1.51 merge would then contain only the commits relevant to v1.51.
| snprintf(shm_name, ODP_SHM_NAME_LEN, "%s_freq_hz", | ||
| name ? name : "timer_pool"); | ||
|
|
||
| freq_hz_shm = odp_shm_reserve(shm_name, size, ODP_CACHE_LINE_SIZE, 0); |
There was a problem hiding this comment.
Now with this internal SHM reservation for every periodic timer pool, maybe CONFIG_INTERNAL_SHM_BLOCKS should be adjusted or something? Or could the shm reservation here be avoided e.g. by reserving "large enough" memory area for the freq table at timer init phase? I am not sure how good it is to keep reserving and freeing small shm blocks after ODP init phase.
| } timer_entry_t; | ||
|
|
||
| #pragma GCC diagnostic push | ||
| #pragma GCC diagnostic ignored "-Wpedantic" |
| { | ||
| struct rte_mempool *mp; | ||
|
|
||
| if (odp_unlikely(num <= 0)) |
There was a problem hiding this comment.
I think the commit message is slightly misleading. This change just moves the parameter check from a function to its call sites. Since it is an inline function, I do not think this change changes anything in the generated code. Maybe the real reason for this change is to make the linux-gen and linux-dpdk versions of _odp_event_free_sp() semantically identical?
| @@ -17,13 +17,11 @@ jobs: | |||
| strategy: | |||
There was a problem hiding this comment.
The merged commits include this:
61254bb api: packet: remove len restriction from odp_packet_{push,pull}_{head,tail}
Now I notice that the odp-dpdk code for push head and push tail cast the len parameter to uint16_t without any checking, so too large values would cause the functions to misbehave. So the claim about implementations in the commit message of the original commit is not totally accurate. I suppose a porting commit that adds a range check is needed.
| # ODP_TARGET_OPTIONS | ||
| # ------------------ | ||
| # Configure target-specific options | ||
| AC_DEFUN([ODP_TARGET_OPTIONS], |
There was a problem hiding this comment.
This file is almost identical to the one in linux-generic. I wonder if it could be shared.
One difference is that _ODP_FEAT_ECV, i.e. commit
6ac17ff linux-gen: time: utilize aarch64 cntvctss_el0 register
does not appear to have been ported from linux-generic. I do not see why, so maybe it is an accidental omission? The code that checks _OPD_FEAT_ECV is anyway shared between linux-gen and linux-dpdk.
No description provided.