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
d4c4fdf7
Commit
d4c4fdf7
authored
Nov 25, 2021
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T tracer: add harq pid in nr ul/dl/dl retx traces
parent
b65b0e2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
66 deletions
+82
-66
common/utils/T/tracer/macpdu2wireshark.c
common/utils/T/tracer/macpdu2wireshark.c
+82
-66
No files found.
common/utils/T/tracer/macpdu2wireshark.c
View file @
d4c4fdf7
...
...
@@ -59,16 +59,19 @@ typedef struct {
int
nr_ul_rnti
;
int
nr_ul_frame
;
int
nr_ul_slot
;
int
nr_ul_harq_pid
;
int
nr_ul_data
;
/* NR dl */
int
nr_dl_rnti
;
int
nr_dl_frame
;
int
nr_dl_slot
;
int
nr_dl_harq_pid
;
int
nr_dl_data
;
/* NR dl retx */
int
nr_dl_retx_rnti
;
int
nr_dl_retx_frame
;
int
nr_dl_retx_slot
;
int
nr_dl_retx_harq_pid
;
int
nr_dl_retx_data
;
/* NR mib */
int
nr_mib_frame
;
...
...
@@ -259,6 +262,7 @@ void sr(void *_d, event e)
#define MAC_NR_PAYLOAD_TAG 0x01
#define MAC_NR_RNTI_TAG 0x02
#define MAC_NR_UEID_TAG 0x03
#define MAC_NR_HARQID 0x06
#define MAC_NR_FRAME_SLOT_TAG 0x07
#define NR_FDD_RADIO 1
...
...
@@ -272,7 +276,8 @@ void sr(void *_d, event e)
#define NR_C_RNTI 3
void
trace_nr
(
ev_data
*
d
,
int
direction
,
int
rnti_type
,
int
rnti
,
int
frame
,
int
slot
,
void
*
buf
,
int
bufsize
,
int
preamble
)
int
frame
,
int
slot
,
int
harq_pid
,
void
*
buf
,
int
bufsize
,
int
preamble
)
{
ssize_t
ret
;
int
i
;
...
...
@@ -312,6 +317,8 @@ void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
PUTC
(
&
d
->
buf
,
frame
&
255
);
PUTC
(
&
d
->
buf
,
(
slot
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
slot
&
255
);
PUTC
(
&
d
->
buf
,
MAC_NR_HARQID
);
PUTC
(
&
d
->
buf
,
harq_pid
);
#endif
PUTC
(
&
d
->
buf
,
MAC_NR_PAYLOAD_TAG
);
...
...
@@ -331,7 +338,8 @@ void nr_ul(void *_d, event e)
trace_nr
(
d
,
NR_DIRECTION_UPLINK
,
NR_C_RNTI
,
e
.
e
[
d
->
nr_ul_rnti
].
i
,
e
.
e
[
d
->
nr_ul_frame
].
i
,
e
.
e
[
d
->
nr_ul_slot
].
i
,
e
.
e
[
d
->
nr_ul_data
].
b
,
e
.
e
[
d
->
nr_ul_data
].
bsize
,
NO_PREAMBLE
);
e
.
e
[
d
->
nr_ul_harq_pid
].
i
,
e
.
e
[
d
->
nr_ul_data
].
b
,
e
.
e
[
d
->
nr_ul_data
].
bsize
,
NO_PREAMBLE
);
}
void
nr_dl
(
void
*
_d
,
event
e
)
...
...
@@ -340,7 +348,8 @@ void nr_dl(void *_d, event e)
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_C_RNTI
,
e
.
e
[
d
->
nr_dl_rnti
].
i
,
e
.
e
[
d
->
nr_dl_frame
].
i
,
e
.
e
[
d
->
nr_dl_slot
].
i
,
e
.
e
[
d
->
nr_dl_data
].
b
,
e
.
e
[
d
->
nr_dl_data
].
bsize
,
NO_PREAMBLE
);
e
.
e
[
d
->
nr_dl_harq_pid
].
i
,
e
.
e
[
d
->
nr_dl_data
].
b
,
e
.
e
[
d
->
nr_dl_data
].
bsize
,
NO_PREAMBLE
);
}
void
nr_dl_retx
(
void
*
_d
,
event
e
)
...
...
@@ -349,8 +358,8 @@ void nr_dl_retx(void *_d, event e)
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_C_RNTI
,
e
.
e
[
d
->
nr_dl_retx_rnti
].
i
,
e
.
e
[
d
->
nr_dl_retx_frame
].
i
,
e
.
e
[
d
->
nr_dl_retx_slot
].
i
,
e
.
e
[
d
->
nr_dl_retx_
data
].
b
,
e
.
e
[
d
->
nr_dl_retx_data
].
bsize
,
NO_PREAMBLE
);
e
.
e
[
d
->
nr_dl_retx_
harq_pid
].
i
,
e
.
e
[
d
->
nr_dl_retx_data
].
b
,
e
.
e
[
d
->
nr_dl_retx_data
].
bsize
,
NO_PREAMBLE
);
}
void
nr_mib
(
void
*
_d
,
event
e
)
...
...
@@ -364,7 +373,7 @@ void nr_mib(void *_d, event e)
d
->
cur_mib
++
;
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_NO_RNTI
,
0
,
e
.
e
[
d
->
nr_mib_frame
].
i
,
e
.
e
[
d
->
nr_mib_slot
].
i
,
e
.
e
[
d
->
nr_mib_frame
].
i
,
e
.
e
[
d
->
nr_mib_slot
].
i
,
0
/* harq pid */
,
e
.
e
[
d
->
nr_mib_data
].
b
,
e
.
e
[
d
->
nr_mib_data
].
bsize
,
NO_PREAMBLE
);
}
...
...
@@ -373,7 +382,7 @@ void nr_rar(void *_d, event e)
ev_data
*
d
=
_d
;
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_RA_RNTI
,
e
.
e
[
d
->
nr_rar_rnti
].
i
,
e
.
e
[
d
->
nr_rar_frame
].
i
,
e
.
e
[
d
->
nr_rar_slot
].
i
,
e
.
e
[
d
->
nr_rar_frame
].
i
,
e
.
e
[
d
->
nr_rar_slot
].
i
,
0
/* harq pid */
,
e
.
e
[
d
->
nr_rar_data
].
b
,
e
.
e
[
d
->
nr_rar_data
].
bsize
,
NO_PREAMBLE
);
}
...
...
@@ -387,47 +396,50 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
{
database_event_format
f
;
int
i
;
d
->
ul_rnti
=
-
1
;
d
->
ul_frame
=
-
1
;
d
->
ul_subframe
=
-
1
;
d
->
ul_data
=
-
1
;
d
->
dl_rnti
=
-
1
;
d
->
dl_frame
=
-
1
;
d
->
dl_subframe
=
-
1
;
d
->
dl_data
=
-
1
;
d
->
mib_frame
=
-
1
;
d
->
mib_subframe
=
-
1
;
d
->
mib_data
=
-
1
;
d
->
preamble_frame
=
-
1
;
d
->
preamble_subframe
=
-
1
;
d
->
preamble_preamble
=
-
1
;
d
->
rar_rnti
=
-
1
;
d
->
rar_frame
=
-
1
;
d
->
rar_subframe
=
-
1
;
d
->
rar_data
=
-
1
;
d
->
sr_rnti
=
-
1
;
d
->
sr_frame
=
-
1
;
d
->
sr_subframe
=
-
1
;
d
->
nr_ul_rnti
=
-
1
;
d
->
nr_ul_frame
=
-
1
;
d
->
nr_ul_slot
=
-
1
;
d
->
nr_ul_data
=
-
1
;
d
->
nr_dl_rnti
=
-
1
;
d
->
nr_dl_frame
=
-
1
;
d
->
nr_dl_slot
=
-
1
;
d
->
nr_dl_data
=
-
1
;
d
->
nr_dl_retx_rnti
=
-
1
;
d
->
nr_dl_retx_frame
=
-
1
;
d
->
nr_dl_retx_slot
=
-
1
;
d
->
nr_dl_retx_data
=
-
1
;
d
->
nr_mib_frame
=
-
1
;
d
->
nr_mib_slot
=
-
1
;
d
->
nr_mib_data
=
-
1
;
d
->
nr_rar_rnti
=
-
1
;
d
->
nr_rar_frame
=
-
1
;
d
->
nr_rar_slot
=
-
1
;
d
->
nr_rar_data
=
-
1
;
d
->
ul_rnti
=
-
1
;
d
->
ul_frame
=
-
1
;
d
->
ul_subframe
=
-
1
;
d
->
ul_data
=
-
1
;
d
->
dl_rnti
=
-
1
;
d
->
dl_frame
=
-
1
;
d
->
dl_subframe
=
-
1
;
d
->
dl_data
=
-
1
;
d
->
mib_frame
=
-
1
;
d
->
mib_subframe
=
-
1
;
d
->
mib_data
=
-
1
;
d
->
preamble_frame
=
-
1
;
d
->
preamble_subframe
=
-
1
;
d
->
preamble_preamble
=
-
1
;
d
->
rar_rnti
=
-
1
;
d
->
rar_frame
=
-
1
;
d
->
rar_subframe
=
-
1
;
d
->
rar_data
=
-
1
;
d
->
sr_rnti
=
-
1
;
d
->
sr_frame
=
-
1
;
d
->
sr_subframe
=
-
1
;
d
->
nr_ul_rnti
=
-
1
;
d
->
nr_ul_frame
=
-
1
;
d
->
nr_ul_slot
=
-
1
;
d
->
nr_ul_harq_pid
=
-
1
;
d
->
nr_ul_data
=
-
1
;
d
->
nr_dl_rnti
=
-
1
;
d
->
nr_dl_frame
=
-
1
;
d
->
nr_dl_slot
=
-
1
;
d
->
nr_dl_harq_pid
=
-
1
;
d
->
nr_dl_data
=
-
1
;
d
->
nr_dl_retx_rnti
=
-
1
;
d
->
nr_dl_retx_frame
=
-
1
;
d
->
nr_dl_retx_slot
=
-
1
;
d
->
nr_dl_retx_harq_pid
=
-
1
;
d
->
nr_dl_retx_data
=
-
1
;
d
->
nr_mib_frame
=
-
1
;
d
->
nr_mib_slot
=
-
1
;
d
->
nr_mib_data
=
-
1
;
d
->
nr_rar_rnti
=
-
1
;
d
->
nr_rar_frame
=
-
1
;
d
->
nr_rar_slot
=
-
1
;
d
->
nr_rar_data
=
-
1
;
#define G(var_name, var_type, var) \
if (!strcmp(f.name[i], var_name)) { \
...
...
@@ -510,46 +522,50 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
if
(
d
->
sr_rnti
==
-
1
||
d
->
sr_frame
==
-
1
||
d
->
sr_subframe
==
-
1
)
goto
error
;
/* NR ul: rnti, frame, slot, data */
/* NR ul: rnti, frame, slot,
harq_pid,
data */
f
=
get_format
(
database
,
nr_ul_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_ul_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_ul_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_ul_slot
);
G
(
"data"
,
"buffer"
,
d
->
nr_ul_data
);
G
(
"rnti"
,
"int"
,
d
->
nr_ul_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_ul_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_ul_slot
);
G
(
"harq_pid"
,
"int"
,
d
->
nr_ul_harq_pid
);
G
(
"data"
,
"buffer"
,
d
->
nr_ul_data
);
}
if
(
d
->
nr_ul_rnti
==
-
1
||
d
->
nr_ul_frame
==
-
1
||
d
->
nr_ul_slot
==
-
1
||
d
->
nr_ul_data
==
-
1
)
d
->
nr_ul_
harq_pid
==
-
1
||
d
->
nr_ul_
data
==
-
1
)
goto
error
;
/* NR dl: rnti, frame, slot, data */
/* NR dl: rnti, frame, slot,
harq_pid,
data */
f
=
get_format
(
database
,
nr_dl_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_dl_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_slot
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_data
);
G
(
"rnti"
,
"int"
,
d
->
nr_dl_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_slot
);
G
(
"harq_pid"
,
"int"
,
d
->
nr_dl_harq_pid
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_data
);
}
if
(
d
->
nr_dl_rnti
==
-
1
||
d
->
nr_dl_frame
==
-
1
||
d
->
nr_dl_slot
==
-
1
||
d
->
nr_dl_data
==
-
1
)
d
->
nr_dl_
harq_pid
==
-
1
||
d
->
nr_dl_
data
==
-
1
)
goto
error
;
/* NR dl retx: rnti, frame, slot, data */
/* NR dl retx: rnti, frame, slot,
harq_pid,
data */
f
=
get_format
(
database
,
nr_dl_retx_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_dl_retx_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_retx_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_retx_slot
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_retx_data
);
G
(
"rnti"
,
"int"
,
d
->
nr_dl_retx_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_retx_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_retx_slot
);
G
(
"harq_pid"
,
"int"
,
d
->
nr_dl_retx_harq_pid
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_retx_data
);
}
if
(
d
->
nr_dl_retx_rnti
==
-
1
||
d
->
nr_dl_retx_frame
==
-
1
||
d
->
nr_dl_retx_slot
==
-
1
||
d
->
nr_dl_retx_data
==
-
1
)
d
->
nr_dl_retx_slot
==
-
1
||
d
->
nr_dl_retx_harq_pid
==
-
1
||
d
->
nr_dl_retx_data
==
-
1
)
goto
error
;
/* NR MIB: frame, slot, data */
...
...
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