Skip to content

Conversation

@rsarwad
Copy link
Owner

@rsarwad rsarwad commented Dec 16, 2022

Summary

fix(agw): Modified code to port s_plus_p_gw_eps_bearer_context_information_t to protobuf structure in spgw task

Test Plan

Executed unit test cases and s1ap integ_tests

@github-actions
Copy link

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

pco_req.protocol_or_container_ids[0].id =
PCO_CI_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING;
magma::lte::oai::PcoProtocol* pco_protocol = pco_req.add_pco_protocol();
pco_protocol->set_id(PCO_CI_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING);

Choose a reason for hiding this comment

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

[misspell] reported by reviewdog 🐶
"SIGNALLING" is a misspelling of "SIGNALING"

@github-actions
Copy link

github-actions bot commented Dec 16, 2022

Oops! Looks like you failed the AGW Build & Format Python.

Howto

♻️ Updated: ✅ The check is passing the AGW Build & Format Python after the last commit.

#define RPC_CLIENT_H

#include "stdint.h"
#include <string>

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Found C++ system header after other header. Should be: MobilityClientAPI.h, c system, c++ system, other. [build/include_order] [4]

log_proto_t module,
magma::lte::oai::S11BearerContext* sgw_context_information)
//-----------------------------------------------------------------------------
{

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
{ should almost always be at the end of the previous line [whitespace/braces] [4]

sgw_context_p->set_mme_teid_s11(session_req_pP->sender_fteid_for_cp.teid);
sgw_context_p->set_sgw_teid_s11_s4(new_endpoint_p->local_teid);
if (session_req_pP->trxn) {
sgw_context_p->set_trxn((char*)session_req_pP->trxn);

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<char*>(...) instead [readability/casting] [4]

create_session_response_p->peer_ip.s_addr =
new_bearer_ctxt_info_p->sgw_eps_bearer_context_information
.mme_ip_address_S11.address.ipv4_address.s_addr;
(void*)new_bearer_ctxt_info_p->sgw_eps_bearer_context().trxn().c_str();

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]

memcpy(imsi.digit,
new_bearer_ctxt_info_p->sgw_eps_bearer_context().imsi().c_str(),
new_bearer_ctxt_info_p->sgw_eps_bearer_context().imsi().size());
char* apn = (char*)new_bearer_ctxt_info_p->sgw_eps_bearer_context()

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<char*>(...) instead [readability/casting] [4]

if (procedures != nullptr) {
pgw_base_proc_t* base_proc = nullptr;
if (session_request->trxn != nullptr) {
proto->set_trxn((char*)session_request->trxn);

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<char*>(...) instead [readability/casting] [4]

}
}
proto->set_teid(session_request->teid);
proto->set_imsi((char*)session_request->imsi.digit);

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<char*>(...) instead [readability/casting] [4]

eps_bearer_ctxt->s_gw_teid_S5_S8_up);
}

// TODO Need to add handling on failing to delete s1-u tunnel rules from

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Missing username in TODO; it should look like "// TODO(my_username): Stuff." [readability/todo] [2]

if ((eps_bearer_ctxt->paa.pdn_type == IPv6) ||
(eps_bearer_ctxt->paa.pdn_type == IPv4_AND_v6)) {
char ip6_str[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, (void*)&eps_bearer_ctxt->paa.ipv6_address, ip6_str,

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]

void sgw_s8_free_pdn_connection(sgw_pdn_connection_t* pdn_connection_p) {
if (pdn_connection_p) {
if (pdn_connection_p->apn_in_use) {
free_wrapper((void**)&pdn_connection_p->apn_in_use);

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<void**>(...) instead [readability/casting] [4]

@rsarwad rsarwad force-pushed the 11191_spgw_teid_ctxt_changes branch from b931239 to bc721b4 Compare December 20, 2022 09:56
@rsarwad rsarwad force-pushed the 11191_spgw_teid_ctxt_changes branch 2 times, most recently from cf5ec0b to d1cd375 Compare December 22, 2022 09:14
##### libgtpnl
# review https://github.com/OPENAIRINTERFACE/openair-cn/blob/master/build/tools/build_helper.gtpnl
RUN git clone https://git.osmocom.org/libgtpnl && \
RUN git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \

Choose a reason for hiding this comment

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

⚠️ [hadolint] <DL3003> reported by reviewdog 🐶
Use WORKDIR to switch to a directory

@github-actions
Copy link

github-actions bot commented Dec 22, 2022

Oops! Looks like you failed the PR Check DCO. Be sure to sign all your commits.

Howto

♻️ Updated: ✅ The check is passing the PR Check DCO after the last commit.

while [ $i -lt 60 ]
do
val=$(docker-compose -f docker-compose-e2e.yml logs magmalte 2>&1 | grep 'Production server started on port 8081' | wc -l)
val=$(docker compose -f docker-compose-e2e.yml logs magmalte 2>&1 | grep 'Production server started on port 8081' | wc -l)
Copy link

Choose a reason for hiding this comment

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

[shellcheck] reported by reviewdog 🐶
Consider using grep -c instead of grep|wc -l. SC2126

```

Then register each gateway:
```console
Copy link

Choose a reason for hiding this comment

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

[markdownlint-fix] reported by reviewdog 🐶

Suggested change
```console
```console

docker compose exec magmalte yarn setAdminPassword host ADMIN_USER_EMAIL ADMIN_USER_PASSWORD
```

Access the `host` (http://host.localhost:8081/host) portal to create your first organization.
Copy link

Choose a reason for hiding this comment

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

[markdownlint-fix] reported by reviewdog 🐶

Suggested change
Access the `host` (http://host.localhost:8081/host) portal to create your first organization.
Access the `host` (<http://host.localhost:8081/host>) portal to create your first organization.

@rsarwad rsarwad force-pushed the 11191_spgw_teid_ctxt_changes branch from e55295a to 348dd09 Compare January 4, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants