From e45eca76b6252f1ceecf4eb15c1cea5c18f7fd65 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 26 Jan 2024 19:06:34 +0100 Subject: [PATCH] [SMF,MME] Gn: Set Maximum SDU Size QoS field to 1500 Before this patch, it was set as 0, which is Reserved in Network to MS direction. (cherry picked from commit 88a77f7bc538e68f2c8fb5ab2c516be891c856c4) --- src/mme/mme-gn-build.c | 3 +++ src/smf/gn-build.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/src/mme/mme-gn-build.c b/src/mme/mme-gn-build.c index 50727f9d0..85d7cb563 100644 --- a/src/mme/mme-gn-build.c +++ b/src/mme/mme-gn-build.c @@ -78,6 +78,9 @@ static void build_qos_profile_from_session(ogs_gtp1_qos_profile_decoded_t *qos_p qos_pdec->qos_profile.data.delivery_erroneous_sdu = OGS_GTP1_DELIVERY_ERR_SDU_NO; + /* Maximum SDU Size: Encode it as 1500, the maximum for IP 3GPP TS 23.107 Table 4, Note 4) */ + qos_pdec->qos_profile.data.max_sdu_size = 0x96; + /* 3GPP TS 23.401 Annex E table Table E.3 */ /* Also take into account table 7 in 3GPP TS 23.107 9.1.2.2 */ switch (session->qos.index) { /* QCI */ diff --git a/src/smf/gn-build.c b/src/smf/gn-build.c index 2cc557b1c..d8be2e564 100644 --- a/src/smf/gn-build.c +++ b/src/smf/gn-build.c @@ -41,6 +41,14 @@ static void build_qos_profile_from_session(ogs_gtp1_qos_profile_decoded_t *qos_p qos_pdec->qos_profile.data.delivery_erroneous_sdu = OGS_GTP1_DELIVERY_ERR_SDU_NO; + /* Maximum SDU Size: If value is set to a valid value, reuse it: */ + if (sess->gtp.v1.qos_pdec.qos_profile.data.max_sdu_size >= 0x01 && + sess->gtp.v1.qos_pdec.qos_profile.data.max_sdu_size <= 0x99) { + qos_pdec->qos_profile.data.max_sdu_size = sess->gtp.v1.qos_pdec.qos_profile.data.max_sdu_size; + } else { /* Encode it as 1500, the maximum for IP 3GPP TS 23.107 Table 4, Note 4) */ + qos_pdec->qos_profile.data.max_sdu_size = 0x96; + } + /* 3GPP TS 23.401 Annex E table Table E.3 */ /* Also take into account table 7 in 3GPP TS 23.107 9.1.2.2 */ switch (sess->session.qos.index) { /* QCI */