Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
27e26475
Commit
27e26475
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
f8f81aca
Changes
1
Show 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 @
27e26475
...
@@ -59,16 +59,19 @@ typedef struct {
...
@@ -59,16 +59,19 @@ typedef struct {
int
nr_ul_rnti
;
int
nr_ul_rnti
;
int
nr_ul_frame
;
int
nr_ul_frame
;
int
nr_ul_slot
;
int
nr_ul_slot
;
int
nr_ul_harq_pid
;
int
nr_ul_data
;
int
nr_ul_data
;
/* NR dl */
/* NR dl */
int
nr_dl_rnti
;
int
nr_dl_rnti
;
int
nr_dl_frame
;
int
nr_dl_frame
;
int
nr_dl_slot
;
int
nr_dl_slot
;
int
nr_dl_harq_pid
;
int
nr_dl_data
;
int
nr_dl_data
;
/* NR dl retx */
/* NR dl retx */
int
nr_dl_retx_rnti
;
int
nr_dl_retx_rnti
;
int
nr_dl_retx_frame
;
int
nr_dl_retx_frame
;
int
nr_dl_retx_slot
;
int
nr_dl_retx_slot
;
int
nr_dl_retx_harq_pid
;
int
nr_dl_retx_data
;
int
nr_dl_retx_data
;
/* NR mib */
/* NR mib */
int
nr_mib_frame
;
int
nr_mib_frame
;
...
@@ -259,6 +262,7 @@ void sr(void *_d, event e)
...
@@ -259,6 +262,7 @@ void sr(void *_d, event e)
#define MAC_NR_PAYLOAD_TAG 0x01
#define MAC_NR_PAYLOAD_TAG 0x01
#define MAC_NR_RNTI_TAG 0x02
#define MAC_NR_RNTI_TAG 0x02
#define MAC_NR_UEID_TAG 0x03
#define MAC_NR_UEID_TAG 0x03
#define MAC_NR_HARQID 0x06
#define MAC_NR_FRAME_SLOT_TAG 0x07
#define MAC_NR_FRAME_SLOT_TAG 0x07
#define NR_FDD_RADIO 1
#define NR_FDD_RADIO 1
...
@@ -272,7 +276,8 @@ void sr(void *_d, event e)
...
@@ -272,7 +276,8 @@ void sr(void *_d, event e)
#define NR_C_RNTI 3
#define NR_C_RNTI 3
void
trace_nr
(
ev_data
*
d
,
int
direction
,
int
rnti_type
,
int
rnti
,
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
;
ssize_t
ret
;
int
i
;
int
i
;
...
@@ -312,6 +317,8 @@ void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
...
@@ -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
,
frame
&
255
);
PUTC
(
&
d
->
buf
,
(
slot
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
(
slot
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
slot
&
255
);
PUTC
(
&
d
->
buf
,
slot
&
255
);
PUTC
(
&
d
->
buf
,
MAC_NR_HARQID
);
PUTC
(
&
d
->
buf
,
harq_pid
);
#endif
#endif
PUTC
(
&
d
->
buf
,
MAC_NR_PAYLOAD_TAG
);
PUTC
(
&
d
->
buf
,
MAC_NR_PAYLOAD_TAG
);
...
@@ -331,7 +338,8 @@ void nr_ul(void *_d, event e)
...
@@ -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
,
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_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
)
void
nr_dl
(
void
*
_d
,
event
e
)
...
@@ -340,7 +348,8 @@ 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
,
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_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
)
void
nr_dl_retx
(
void
*
_d
,
event
e
)
...
@@ -349,8 +358,8 @@ 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
,
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_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
,
e
.
e
[
d
->
nr_dl_retx_
harq_pid
].
i
,
e
.
e
[
d
->
nr_dl_retx_data
].
b
,
NO_PREAMBLE
);
e
.
e
[
d
->
nr_dl_retx_data
].
bsize
,
NO_PREAMBLE
);
}
}
void
nr_mib
(
void
*
_d
,
event
e
)
void
nr_mib
(
void
*
_d
,
event
e
)
...
@@ -364,7 +373,7 @@ void nr_mib(void *_d, event e)
...
@@ -364,7 +373,7 @@ void nr_mib(void *_d, event e)
d
->
cur_mib
++
;
d
->
cur_mib
++
;
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_NO_RNTI
,
0
,
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
);
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)
...
@@ -373,7 +382,7 @@ void nr_rar(void *_d, event e)
ev_data
*
d
=
_d
;
ev_data
*
d
=
_d
;
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_RA_RNTI
,
e
.
e
[
d
->
nr_rar_rnti
].
i
,
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
);
e
.
e
[
d
->
nr_rar_data
].
b
,
e
.
e
[
d
->
nr_rar_data
].
bsize
,
NO_PREAMBLE
);
}
}
...
@@ -412,14 +421,17 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
...
@@ -412,14 +421,17 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
d
->
nr_ul_rnti
=
-
1
;
d
->
nr_ul_rnti
=
-
1
;
d
->
nr_ul_frame
=
-
1
;
d
->
nr_ul_frame
=
-
1
;
d
->
nr_ul_slot
=
-
1
;
d
->
nr_ul_slot
=
-
1
;
d
->
nr_ul_harq_pid
=
-
1
;
d
->
nr_ul_data
=
-
1
;
d
->
nr_ul_data
=
-
1
;
d
->
nr_dl_rnti
=
-
1
;
d
->
nr_dl_rnti
=
-
1
;
d
->
nr_dl_frame
=
-
1
;
d
->
nr_dl_frame
=
-
1
;
d
->
nr_dl_slot
=
-
1
;
d
->
nr_dl_slot
=
-
1
;
d
->
nr_dl_harq_pid
=
-
1
;
d
->
nr_dl_data
=
-
1
;
d
->
nr_dl_data
=
-
1
;
d
->
nr_dl_retx_rnti
=
-
1
;
d
->
nr_dl_retx_rnti
=
-
1
;
d
->
nr_dl_retx_frame
=
-
1
;
d
->
nr_dl_retx_frame
=
-
1
;
d
->
nr_dl_retx_slot
=
-
1
;
d
->
nr_dl_retx_slot
=
-
1
;
d
->
nr_dl_retx_harq_pid
=
-
1
;
d
->
nr_dl_retx_data
=
-
1
;
d
->
nr_dl_retx_data
=
-
1
;
d
->
nr_mib_frame
=
-
1
;
d
->
nr_mib_frame
=
-
1
;
d
->
nr_mib_slot
=
-
1
;
d
->
nr_mib_slot
=
-
1
;
...
@@ -510,46 +522,50 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
...
@@ -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
)
if
(
d
->
sr_rnti
==
-
1
||
d
->
sr_frame
==
-
1
||
d
->
sr_subframe
==
-
1
)
goto
error
;
goto
error
;
/* NR ul: rnti, frame, slot, data */
/* NR ul: rnti, frame, slot,
harq_pid,
data */
f
=
get_format
(
database
,
nr_ul_id
);
f
=
get_format
(
database
,
nr_ul_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_ul_rnti
);
G
(
"rnti"
,
"int"
,
d
->
nr_ul_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_ul_frame
);
G
(
"frame"
,
"int"
,
d
->
nr_ul_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_ul_slot
);
G
(
"slot"
,
"int"
,
d
->
nr_ul_slot
);
G
(
"harq_pid"
,
"int"
,
d
->
nr_ul_harq_pid
);
G
(
"data"
,
"buffer"
,
d
->
nr_ul_data
);
G
(
"data"
,
"buffer"
,
d
->
nr_ul_data
);
}
}
if
(
d
->
nr_ul_rnti
==
-
1
||
d
->
nr_ul_frame
==
-
1
||
d
->
nr_ul_slot
==
-
1
||
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
;
goto
error
;
/* NR dl: rnti, frame, slot, data */
/* NR dl: rnti, frame, slot,
harq_pid,
data */
f
=
get_format
(
database
,
nr_dl_id
);
f
=
get_format
(
database
,
nr_dl_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_dl_rnti
);
G
(
"rnti"
,
"int"
,
d
->
nr_dl_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_frame
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_slot
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_slot
);
G
(
"harq_pid"
,
"int"
,
d
->
nr_dl_harq_pid
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_data
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_data
);
}
}
if
(
d
->
nr_dl_rnti
==
-
1
||
d
->
nr_dl_frame
==
-
1
||
d
->
nr_dl_slot
==
-
1
||
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
;
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
);
f
=
get_format
(
database
,
nr_dl_retx_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_dl_retx_rnti
);
G
(
"rnti"
,
"int"
,
d
->
nr_dl_retx_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_retx_frame
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_retx_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_retx_slot
);
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
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_retx_data
);
}
}
if
(
d
->
nr_dl_retx_rnti
==
-
1
||
d
->
nr_dl_retx_frame
==
-
1
||
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
;
goto
error
;
/* NR MIB: frame, slot, data */
/* 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