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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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-RAN
Commits
10a764c4
Commit
10a764c4
authored
Jan 26, 2016
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Traces + shift timing bug
parent
83e48d39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
+34
-23
openair3/TEST/EPC_TEST/play_scenario.c
openair3/TEST/EPC_TEST/play_scenario.c
+25
-20
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
+9
-3
No files found.
openair3/TEST/EPC_TEST/play_scenario.c
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
;
...
...
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
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
;
}
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