Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
0ab7abf5
Commit
0ab7abf5
authored
Dec 20, 2022
by
mir
Committed by
Teodora
Jun 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Packet segmentation bug. Branch created for documentation purposes
parent
9dc5255c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
5 deletions
+71
-5
CMakeLists.txt
CMakeLists.txt
+1
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+5
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+44
-0
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
+20
-2
No files found.
CMakeLists.txt
View file @
0ab7abf5
...
...
@@ -659,7 +659,7 @@ add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)"
##########################
# RRC LAYER OPTIONS
##########################
add_boolean_option
(
RRC_DEFAULT_RAB_IS_AM True
"set the RLC mode to AM for the default bearer, otherwise it is UM."
ON
)
add_boolean_option
(
RRC_DEFAULT_RAB_IS_AM True
"set the RLC mode to AM for the default bearer, otherwise it is UM."
)
##########################
...
...
openair2/GNB_APP/gnb_config.c
View file @
0ab7abf5
...
...
@@ -1186,7 +1186,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
rrc
->
nr_cellid
=
(
uint64_t
)
*
(
GNBParamList
.
paramarray
[
i
][
GNB_NRCELLID_IDX
].
u64ptr
);
rrc
->
um_on_default_drb
=
*
(
GNBParamList
.
paramarray
[
i
][
GNB_UMONDEFAULTDRB_IDX
].
uptr
);
rrc
->
um_on_default_drb
=
1
;
//
*(GNBParamList.paramarray[i][GNB_UMONDEFAULTDRB_IDX].uptr);
if
(
strcmp
(
*
(
GNBParamList
.
paramarray
[
i
][
GNB_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"local_mac"
)
==
0
)
{
}
else
if
(
strcmp
(
*
(
GNBParamList
.
paramarray
[
i
][
GNB_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"cudu"
)
==
0
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0ab7abf5
...
...
@@ -626,7 +626,11 @@ static void pf_dl(module_id_t module_id,
/* Calculate coeff */
const
NR_bler_options_t
*
bo
=
&
mac
->
dl_bler
;
const
int
max_mcs_table
=
current_BWP
->
mcsTableIdx
==
1
?
27
:
28
;
const
int
max_mcs
=
min
(
sched_ctrl
->
dl_max_mcs
,
max_mcs_table
);
int
max_mcs
=
min
(
sched_ctrl
->
dl_max_mcs
,
max_mcs_table
);
if
(
max_mcs
>
10
)
max_mcs
=
10
;
if
(
bo
->
harq_round_max
==
1
)
sched_pdsch
->
mcs
=
max_mcs
;
else
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
0ab7abf5
...
...
@@ -32,6 +32,14 @@
#include "openair2/RRC/NR/nr_rrc_proto.h"
#include <stdint.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
/* from OAI */
#include "oai_asn1.h"
#include "nr_pdcp_oai_api.h"
...
...
@@ -1108,6 +1116,42 @@ bool nr_pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
return
0
;
}
//printf("[mir]: PDCP pkt size %d \n", sdu_buffer_size);
// struct iphdr* hdr = (struct iphdr*)sdu_buffer;
//if(hdr->protocol == IPPROTO_TCP) {
// struct tcphdr* tcp = (struct tcphdr*)((uint32_t*)hdr + hdr->ihl);
// struct in_addr paddr;
// paddr.s_addr = hdr->saddr;
// char *strAdd2 = inet_ntoa(paddr);
// printf("PDCP: IP source address %s \n", strAdd2 );
// paddr.s_addr = hdr->daddr;
// strAdd2 = inet_ntoa(paddr);
// printf("PDCP: IP dst address %s \n", strAdd2 );
// uint16_t const sport = ntohs(tcp->source);
// uint16_t const dport = ntohs(tcp->dest);
// printf("PDCP Ingress TCP seq_number %u src %d dst %d \n", ntohl(tcp->seq), sport, dport);
// }
//printf("[mir]: PDCP pkt size %d \n", sdu_buffer_size);
// struct iphdr* hdr = (struct iphdr*)sdu_buffer;
//if(hdr->protocol == IPPROTO_TCP) {
// struct tcphdr* tcp = (struct tcphdr*)((uint32_t*)hdr + hdr->ihl);
// struct in_addr paddr;
// paddr.s_addr = hdr->saddr;
// char *strAdd2 = inet_ntoa(paddr);
// printf("PDCP: IP source address %s \n", strAdd2 );
// paddr.s_addr = hdr->daddr;
// strAdd2 = inet_ntoa(paddr);
// printf("PDCP: IP dst address %s \n", strAdd2 );
// uint16_t const sport = ntohs(tcp->source);
// uint16_t const dport = ntohs(tcp->dest);
// printf("PDCP Ingress TCP seq_number %u src %d dst %d \n", ntohl(tcp->seq), sport, dport);
// }
int
max_size
=
sdu_buffer_size
+
3
+
4
;
// 3: max header, 4: max integrity
char
pdu_buf
[
max_size
];
int
pdu_size
=
rb
->
process_sdu
(
rb
,
(
char
*
)
sdu_buffer
,
sdu_buffer_size
,
muiP
,
pdu_buf
,
max_size
);
...
...
openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c
View file @
0ab7abf5
...
...
@@ -480,6 +480,12 @@ static int generate_tx_pdu(nr_rlc_entity_um_t *entity, char *buffer, int size)
if
(
pdu_header_size
+
1
>
size
)
return
0
;
// mir Save BW when using TCP Cubic
if
(
pdu_header_size
+
sdu
->
size
>
size
){
return
0
;
}
entity
->
tx_list
=
entity
->
tx_list
->
next
;
if
(
entity
->
tx_list
==
NULL
)
entity
->
tx_end
=
NULL
;
...
...
@@ -496,8 +502,11 @@ static int generate_tx_pdu(nr_rlc_entity_um_t *entity, char *buffer, int size)
if
(
pdu_size
>
size
)
{
nr_rlc_sdu_segment_t
*
next_sdu
;
next_sdu
=
resegment
(
sdu
,
entity
,
size
);
if
(
next_sdu
==
NULL
)
printf
(
"resegmenting
\n
"
);
if
(
next_sdu
==
NULL
){
printf
(
"next_sdu == NULL
\n
"
);
return
0
;
}
/* put the second SDU back at the head of the TX list */
next_sdu
->
next
=
entity
->
tx_list
;
entity
->
tx_list
=
next_sdu
;
...
...
@@ -511,11 +520,20 @@ static int generate_tx_pdu(nr_rlc_entity_um_t *entity, char *buffer, int size)
}
/* update tx_next if the SDU is an SDU segment and is the last */
if
(
!
sdu
->
is_first
&&
sdu
->
is_last
)
if
(
!
sdu
->
is_first
&&
sdu
->
is_last
){
printf
(
"Updating the SN
\n
"
);
entity
->
tx_next
=
(
entity
->
tx_next
+
1
)
%
entity
->
sn_modulus
;
}
ret
=
serialize_sdu
(
entity
,
sdu
,
buffer
,
size
);
//uint8_t* a = (uint8_t*) buffer;
//uint8_t* b = (uint8_t*)(buffer+1);
//uint8_t* c = (uint8_t*)(buffer+2);
//uint8_t* d = (uint8_t*)(buffer+3);
//printf("a %u b %u c %u d %u \n",*a, *b, *c, *d);
entity
->
tx_size
-=
sdu
->
size
;
entity
->
common
.
stats
.
txpdu_pkts
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment