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

fix(agw): Converted s6a task files to cpp #14089

Merged

Conversation

VinashakAnkitAman
Copy link
Member

@VinashakAnkitAman VinashakAnkitAman commented Oct 5, 2022

Title

fix(agw): Converted s6a task files to cpp [Extension to Github Issue: #13096]

Summary

Migrated all the files related to s6a task in the folders magma/lte/gateway/c/core/oai/tasks/s6a/ and magma/lte/gateway/c/core/oai/include/ to cpp/hpp and fixed all the compilation errors and warnings.

Note: The function fd_msg_browse() is a macro function expanding to fd_msg_browse_internal() in the file /usr/local/include/freeDiameter/libfdproto.h, which passes the 3rd argument of function by casting to (void *), but received as (msg_or_avp **). This is failing with c++ explicit typecasting validation. To fix this all the fd_msg_browse() calls have been shifted to fd_msg_browse_internal() function calls to avoid intermediate type conversion by the macro and the 3rd argument is now passed as typecasted value to (msg_or_avp **)

For reference: https://github.com/Metaswitch/freeDiameter/blob/master/include/freeDiameter/libfdproto.h#:~:text=int%20fd_msg_browse_internal%20(%20msg_or_avp,*)(found)%2C%20(depth)%20)

Also followed the guidelines for order of headers from https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

Test plan

Verified compilation with following:
make clean; make build_oai;
make clean; make test_oai;
make clean; make test_oai BUILD_TYPE=Debug OAI_TESTS=test_amf_app
make clean; bazel build --config=production //lte/gateway/c/core:agw_of
make clean; bazel test //lte/gateway/c/core/oai/test/amf:amf_stateless_test
make clean; make FEATURES=mme_oai build_oai
make clean; export FEATURES=mme_oai; make build_oai

Verified with sanity and in CI

Note: After using FEATURES=mme_oai; flag, make test_oai started failing in spgw module with undefined reference to some config functions. Needed to exit out from the VM and re-login to fix the issue.

Signed-off-by: VinashakAnkitAman ankit.aman@radisys.com

Signed-off-by: Ankit Kumar Aman <ankit.aman@radisys.com>
@pull-request-size pull-request-size bot added the size/L Denotes a Pull Request that changes 100-499 lines. label Oct 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: agw Access gateway-related issue label Oct 5, 2022
lte/gateway/c/core/oai/tasks/s6a/s6a_auth_info.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_auth_info.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_auth_info.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_auth_info.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_error.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_subscription_data.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_subscription_data.cpp Outdated Show resolved Hide resolved
lte/gateway/c/core/oai/tasks/s6a/s6a_subscription_data.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

feg-workflow

    2 files  203 suites   40s ⏱️
374 tests 374 ✔️ 0 💤 0
388 runs  388 ✔️ 0 💤 0

Results for commit 316095a.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

dp-workflow

14 tests   14 ✔️  2m 13s ⏱️
  1 suites    0 💤
  1 files      0

Results for commit 316095a.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

agw-workflow

615 tests   611 ✔️  3m 52s ⏱️
    2 suites      4 💤
    2 files        0

Results for commit 316095a.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@ssanadhya ssanadhya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments.

Please add in summary why you need to use fd_msg_browse_internal and make sure that Magma-OAI-Jenkins CI check is passing with this change.

lte/gateway/c/core/oai/tasks/s6a/s6a_auth_info.cpp Outdated Show resolved Hide resolved
Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
@pull-request-size pull-request-size bot added size/XL Denotes a Pull Request that changes 500-999 lines. and removed size/L Denotes a Pull Request that changes 100-499 lines. labels Oct 10, 2022
Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
@VinashakAnkitAman VinashakAnkitAman marked this pull request as ready for review October 10, 2022 14:47
Copy link
Collaborator

@ssanadhya ssanadhya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, can be merged once @rsarwad approves.

Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
Signed-off-by: VinashakAnkitAman <ankit.aman@radisys.com>
@LKreutzer LKreutzer requested review from LKreutzer and removed request for electronjoe October 11, 2022 07:58
Copy link
Contributor

@LKreutzer LKreutzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel changes lgtm

Signed-off-by: Ankit Kumar Aman <ankit.aman@radisys.com>
Signed-off-by: Ankit Kumar Aman <ankit.aman@radisys.com>
Signed-off-by: Ankit Kumar Aman <ankit.aman@radisys.com>
Copy link
Contributor

@rsarwad rsarwad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rsarwad rsarwad merged commit 64996b6 into magma:master Oct 19, 2022
lucasgonze pushed a commit to lucasgonze/magma that referenced this pull request Feb 29, 2024
* fix(agw): Converted s6a task files to cpp
Signed-off-by: Ankit Kumar Aman <ankit.aman@radisys.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue size/XL Denotes a Pull Request that changes 500-999 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants