Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to odp v1.35.0.0 level #278

Merged
merged 20 commits into from
May 17, 2022

Conversation

JereLeppanen
Copy link
Contributor

@JereLeppanen JereLeppanen commented Apr 26, 2022

  • Handle deprecations
  • Fix a bunch of gcc-10 and other warnings
  • Add missing term calls to tests

v2:

  • Add commit Update ODP repository links (Matias)
  • Add commit timer: Use odp_timer_pool_param_init() instead of memset() (Matias)
  • Add commit readme: Remove references to travis-ci
  • Add commit ipsec: If op mode is async, check whether scheduled queues are supported (Janne)
  • Add commit Remove ThunderX specific documentation

v3:

  • Add review tags.

@bogdanPricope
Copy link
Contributor

Cool.
What about:

  • moving all those globals to shared memory (for multi-process scenarios)
  • moving all odp_init_xxx()/odp_term_xxx() under ofp_init_xxx()/ofp_term_xxx() calls (to simplify the code)

@JereLeppanen
Copy link
Contributor Author

@bogdanPricope Possible improvements, but probably not in this PR. ODP and OFP init and term functions have always been separate, and calling the ODP init functions from OFP init functions would probably necessitate passing the parameters through, which would be a bit awkward.

@bogdanPricope
Copy link
Contributor

@JereLeppanen I agree that those improvements are not for this PR. I did those and many others in 200+ commits on top OFP (including DHCP and now DNS support).
For ODP/OFP init functions my approach was hybrid: caller either provides an ODP instance (configured with ODP init functions, etc.) or a NFP_ODP_INSTANCE_INVALID value (btw ODP_INSTANCE_INVALID is not defined) and ofp will create and manage the ODP instance with some default params.

Btw, what are your plans with OFP? As far I can tell, for whatever you are using it, I can give you a better version with a richer feature set and it will cost less then develop it yourself.

src/ofp_timer.c Show resolved Hide resolved
README.md Show resolved Hide resolved
@JannePeltonen
Copy link
Contributor

Now that ODP does not necessarily support scheduled queues as IPsec destination queues, ofp_ipsec_init_global() should probably set max_num_sa to zero if inbound_op_mode or outbound_op_mode is async and the queue_type_sched ipsec capability is not set in ODP.

Remove an unused global variable in ofp_udp_usrreq.c and define
ofp_packet_pool as extern in test/cunit/ofp_test_syscalls.c to avoid
duplicate definition errors.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Zero is not a valid packet length in odp_packet_alloc().

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Don't call odp_cpu_id() in OFP_ERR, OFP_WARN, etc. This avoids
segfault when these are called while odp local init has not been done.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Add missing odp and ofp global and local term calls to tests. This is
needed mainly to free shared memory.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Update ODP repository links to point to github.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
- use odph_thread* instead of odph_odpthread*

- don't use deprecated odp_pktio_stats_t::in_unknown_protos

- use odp_schedule_default_prio() instead of deprecated
  ODP_SCHED_PRIO_DEFAULT

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Define some header structs as packed, and use a pointer to an
unaligned type in _ofp_in6_cksum_pseudo, to avoid
address-of-packed-member warnings.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Set pktout mode as ODP_PKTOUT_MODE_DIRECT instead of
ODP_PKTIN_MODE_DIRECT.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Cast some enum values explicitly in order to avoid enum-conversion
warnings.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
The icmp6 code uses the ofp_icmp6_data8 array to refer to data that
comes after the array. Change these to refer to the icmp6 header
struct itself, in order to avoid array-bounds warnings.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Set -std=c11 in OFP_CFLAGS.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Copy checkpatch files from odp v1.35.0.0.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
For every failing test, show the log file.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Use odp-dpdk v1.35.0.0 and dpdk v20.11.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Don't define _GNU_SOURCE if already defined.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Check string length before copying to sat or spt name, in order to
avoid stringop-truncation warning. Since we explicitly check the
length, we actually don't need strncpy() anymore and can just use
strcpy().

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Use odp_timer_pool_param_init() instead of memset() to initialize
timer pool parameters.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Travis-ci is not used anymore. Remove references to it.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
If ipsec inbound or outbound mode is async, and scheduled queues are
not supported, then set the max number of SAs to zero.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
The ThunderX ODP implementation is based on a long obsolete API
version. Remove the consequently obsolete instructions.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants