Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
10a764c4
Commit
10a764c4
authored
9 years ago
by
gauthier
Browse files
Options
Downloads
Patches
Plain Diff
Traces + shift timing bug
parent
83e48d39
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair3/TEST/EPC_TEST/play_scenario.c
+25
-20
25 additions, 20 deletions
openair3/TEST/EPC_TEST/play_scenario.c
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
+9
-3
9 additions, 3 deletions
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
with
34 additions
and
23 deletions
openair3/TEST/EPC_TEST/play_scenario.c
+
25
−
20
View file @
10a764c4
...
...
@@ -141,10 +141,14 @@ void et_get_shift_arg( char * line_argument, shift_packet_t * const shift)
while
((
line_argument
[
i
]
!=
':'
)
&&
(
i
<
len
))
{
my_num
[
i
]
=
line_argument
[
i
];
if
(
isdigit
(
line_argument
[
i
]))
{
// may occur '\"'
my_num
[
j
++
]
=
line_argument
[
i
];
}
i
+=
1
;
}
my_num
[
i
++
]
=
'\0'
;
AssertFatal
(
':'
==
line_argument
[
i
],
"Bad format"
);
i
+=
1
;
// ':'
my_num
[
j
++
]
=
'\0'
;
shift
->
frame_number
=
atoi
(
my_num
);
AssertFatal
(
i
<
len
,
"Shift argument %s bad format"
,
line_argument
);
...
...
@@ -155,6 +159,7 @@ void et_get_shift_arg( char * line_argument, shift_packet_t * const shift)
i
+=
1
;
}
AssertFatal
(
i
<
len
,
"Shift argument %s bad format"
,
line_argument
);
j
=
0
;
while
((
line_argument
[
i
]
!=
'.'
)
&&
(
i
<
len
))
{
my_num
[
j
++
]
=
line_argument
[
i
++
];
}
...
...
@@ -830,13 +835,13 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
while
(
shift
)
{
packet
=
scenario
->
list_packet
;
while
(
packet
)
{
//
fprintf(stdout, "*shift: %p\n", shift);
//
fprintf(stdout, "\tframe_number: %
p
\n", shift->frame_number);
//
fprintf(stdout, "\tshift_seconds: %ld\n", shift->shift_seconds);
//
fprintf(stdout, "\tshift_microseconds: %ld\n", shift->shift_microseconds);
//
fprintf(stdout, "\tsingle: %d\n\n", shift->single);
//
fprintf(stdout, "\tshift_all_packets_seconds: %ld\n", shift_all_packets.tv_sec);
//
fprintf(stdout, "\tshift_all_packets_microseconds: %ld\n", shift_all_packets.tv_usec);
fprintf
(
stdout
,
"*shift: %p
\n
"
,
shift
);
fprintf
(
stdout
,
"
\t
frame_number: %
d
\n
"
,
shift
->
frame_number
);
fprintf
(
stdout
,
"
\t
shift_seconds: %ld
\n
"
,
shift
->
shift_seconds
);
fprintf
(
stdout
,
"
\t
shift_microseconds: %ld
\n
"
,
shift
->
shift_microseconds
);
fprintf
(
stdout
,
"
\t
single: %d
\n\n
"
,
shift
->
single
);
fprintf
(
stdout
,
"
\t
shift_all_packets_seconds: %ld
\n
"
,
shift_all_packets
.
tv_sec
);
fprintf
(
stdout
,
"
\t
shift_all_packets_microseconds: %ld
\n
"
,
shift_all_packets
.
tv_usec
);
AssertFatal
((
packet
->
time_relative_to_first_packet
.
tv_sec
>=
0
)
&&
(
packet
->
time_relative_to_first_packet
.
tv_usec
>=
0
),
"Bad timing result time_relative_to_first_packet=%d.%d packet num %u, original frame number %u"
,
...
...
@@ -891,11 +896,11 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
shift_all_packets
.
tv_sec
=
shift
->
shift_seconds
;
shift_all_packets
.
tv_usec
=
shift
->
shift_microseconds
;
timeval_add
(
&
packet
->
time_relative_to_first_packet
,
&
packet
->
time_relative_to_first_packet
,
&
shift_all_packets
);
//
fprintf(stdout, "\tpacket num %u, now original frame number %u time_relative_to_first_packet=%d.%d\n",
//
packet->packet_number,
//
packet->original_frame_number,
//
packet->time_relative_to_first_packet.tv_sec,
//
packet->time_relative_to_first_packet.tv_usec);
fprintf
(
stdout
,
"
\t
packet num %u, now original frame number %u time_relative_to_first_packet=%d.%d
\n
"
,
packet
->
packet_number
,
packet
->
original_frame_number
,
packet
->
time_relative_to_first_packet
.
tv_sec
,
packet
->
time_relative_to_first_packet
.
tv_usec
);
AssertFatal
((
packet
->
time_relative_to_first_packet
.
tv_sec
>=
0
)
&&
(
packet
->
time_relative_to_first_packet
.
tv_usec
>=
0
),
"Bad timing result time_relative_to_first_packet=%d.%d packet num %u, original frame number %u"
,
packet
->
time_relative_to_first_packet
.
tv_sec
,
...
...
@@ -904,11 +909,11 @@ int et_play_scenario(et_scenario_t* const scenario, const struct shift_packet_s
packet
->
original_frame_number
);
}
else
if
((
0
==
shift
->
single
)
&&
(
shift
->
frame_number
<
packet
->
original_frame_number
))
{
timeval_add
(
&
packet
->
time_relative_to_first_packet
,
&
packet
->
time_relative_to_first_packet
,
&
shift_all_packets
);
//
fprintf(stdout, "\tpacket num %u, now original frame number %u time_relative_to_first_packet=%d.%d\n",
//
packet->packet_number,
//
packet->original_frame_number,
//
packet->time_relative_to_first_packet.tv_sec,
//
packet->time_relative_to_first_packet.tv_usec);
fprintf
(
stdout
,
"
\t
packet num %u, now original frame number %u time_relative_to_first_packet=%d.%d
\n
"
,
packet
->
packet_number
,
packet
->
original_frame_number
,
packet
->
time_relative_to_first_packet
.
tv_sec
,
packet
->
time_relative_to_first_packet
.
tv_usec
);
AssertFatal
((
packet
->
time_relative_to_first_packet
.
tv_sec
>=
0
)
&&
(
packet
->
time_relative_to_first_packet
.
tv_usec
>=
0
),
"Bad timing result time_relative_to_first_packet=%d.%d packet num %u, original frame number %u"
,
packet
->
time_relative_to_first_packet
.
tv_sec
,
...
...
@@ -1107,8 +1112,8 @@ et_config_parse_opt_line (
shift
=
shift
->
next
;
}
shift
->
single
=
1
;
et_get_shift_arg
(
optarg
,
shift
);
printf
(
"Arg Shift packet %s
\n
"
,
optarg
);
et_get_shift_arg
(
optarg
,
shift
);
}
break
;
...
...
This diff is collapsed.
Click to expand it.
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
+
9
−
3
View file @
10a764c4
...
...
@@ -467,7 +467,7 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
int
size
=
0
;
int
pos
=
0
;
int
go_deeper_in_tree
=
1
;
S1AP_
DEBUG
(
"%s() mme_ue_s1ap_id %u
\n
"
,
__FUNCTION__
,
new_id
);
S1AP_
INFO
(
"%s() mme_ue_s1ap_id %u
\n
"
,
__FUNCTION__
,
new_id
);
// modify
for
(
cur_node
=
(
xmlNode
*
)
node
;
cur_node
;
cur_node
=
cur_node
->
next
)
{
...
...
@@ -527,7 +527,7 @@ void update_xpath_node_mme_ue_s1ap_id(et_s1ap_t * const s1ap, xmlNode *node, con
}
while
(
pos2
<
(
2
*
5
));
// update ASN1
et_decode_s1ap
(
s1ap
);
S1AP_
DEBUG
(
"Updated ASN1 for %s
\n
"
,
showname
);
S1AP_
INFO
(
"Updated ASN1 for %s
\n
"
,
showname
);
}
}
}
...
...
@@ -553,6 +553,7 @@ void update_xpath_nodes_mme_ue_s1ap_id(et_s1ap_t * const s1ap_payload, xmlNodeSe
xmlNode
*
s1ap_node
=
NULL
;
size
=
(
nodes
)
?
nodes
->
nodeNr
:
0
;
S1AP_DEBUG
(
"%s() num nodes %u
\n
"
,
__FUNCTION__
,
size
);
/*
* NOTE: the nodes are processed in reverse order, i.e. reverse document
...
...
@@ -614,14 +615,19 @@ int et_s1ap_update_mme_ue_s1ap_id(et_packet_t * const packet, const S1ap_MME_UE_
// Evaluate xpath expression
xpath_obj
=
xmlXPathEvalExpression
(
xpath_expression
,
xpath_ctx
);
xmlXPathFreeContext
(
xpath_ctx
);
AssertFatal
(
xpath_obj
!=
NULL
,
"Unable to evaluate XPATH expression
\"
%s
\"\n
"
,
xpath_expression
);
if
(
xmlXPathNodeSetIsEmpty
(
xpath_obj
->
nodesetval
)){
xmlXPathFreeObject
(
xpath_obj
);
S1AP_DEBUG
(
"%s() No match packet num %u original frame number %u, mme_ue_s1ap_id %u -> %u
\n
"
,
__FUNCTION__
,
packet
->
packet_number
,
packet
->
original_frame_number
,
old_id
,
new_id
);
return
-
1
;
}
// update selected nodes
update_xpath_nodes_mme_ue_s1ap_id
(
&
packet
->
sctp_hdr
.
u
.
data_hdr
.
payload
,
xpath_obj
->
nodesetval
,
new_id
);
// Cleanup of XPath data
xmlXPathFreeObject
(
xpath_obj
);
xmlXPathFreeContext
(
xpath_ctx
);
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment