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
e10c0c08
Commit
e10c0c08
authored
Oct 30, 2017
by
David Price
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Crashes due to clearing out the wrong info from subframe buffer
parent
2ac91f05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
27 deletions
+97
-27
open-nfapi.oai.patch
open-nfapi.oai.patch
+97
-27
No files found.
open-nfapi.oai.patch
View file @
e10c0c08
...
@@ -289,7 +289,7 @@ index 74f29a0..7310fc0 100644
...
@@ -289,7 +289,7 @@ index 74f29a0..7310fc0 100644
}
}
diff --git a/pnf/src/pnf_p7.c b/pnf/src/pnf_p7.c
diff --git a/pnf/src/pnf_p7.c b/pnf/src/pnf_p7.c
index 0fd7828..
c980086
100644
index 0fd7828..
5a87c6c
100644
--- a/pnf/src/pnf_p7.c
--- a/pnf/src/pnf_p7.c
+++ b/pnf/src/pnf_p7.c
+++ b/pnf/src/pnf_p7.c
@@ -25,12 +25,64 @@
@@ -25,12 +25,64 @@
...
@@ -374,7 +374,14 @@ index 0fd7828..c980086 100644
...
@@ -374,7 +374,14 @@ index 0fd7828..c980086 100644
if(pnf_p7->_public.codec_config.deallocate)
if(pnf_p7->_public.codec_config.deallocate)
{
{
(pnf_p7->_public.codec_config.deallocate)(req->dl_config_request_body.dl_config_pdu_list);
(pnf_p7->_public.codec_config.deallocate)(req->dl_config_request_body.dl_config_pdu_list);
@@ -83,11 +138,14 @@
void deallocate_nfapi_dl_config_request(nfapi_dl_config_request_t* req, pnf_p7_t
@@ -77,17 +132,21 @@
void deallocate_nfapi_dl_config_request(nfapi_dl_config_request_t* req, pnf_p7_t
{
free(req->dl_config_request_body.dl_config_pdu_list);
}
+ req->dl_config_request_body.dl_config_pdu_list=0;
pnf_p7_free(pnf_p7, req);
}
nfapi_ul_config_request_t* allocate_nfapi_ul_config_request(pnf_p7_t* pnf_p7)
nfapi_ul_config_request_t* allocate_nfapi_ul_config_request(pnf_p7_t* pnf_p7)
{
{
...
@@ -390,7 +397,15 @@ index 0fd7828..c980086 100644
...
@@ -390,7 +397,15 @@ index 0fd7828..c980086 100644
if(pnf_p7->_public.codec_config.deallocate)
if(pnf_p7->_public.codec_config.deallocate)
{
{
(pnf_p7->_public.codec_config.deallocate)(req->ul_config_request_body.ul_config_pdu_list);
(pnf_p7->_public.codec_config.deallocate)(req->ul_config_request_body.ul_config_pdu_list);
@@ -107,6 +165,7 @@
nfapi_hi_dci0_request_t* allocate_nfapi_hi_dci0_request(pnf_p7_t* pnf_p7)
@@ -96,6 +155,7 @@
void deallocate_nfapi_ul_config_request(nfapi_ul_config_request_t* req, pnf_p7_t
{
free(req->ul_config_request_body.ul_config_pdu_list);
}
+ req->ul_config_request_body.ul_config_pdu_list=0;
pnf_p7_free(pnf_p7, req);
}
@@ -107,6 +167,7 @@
nfapi_hi_dci0_request_t* allocate_nfapi_hi_dci0_request(pnf_p7_t* pnf_p7)
void deallocate_nfapi_hi_dci0_request(nfapi_hi_dci0_request_t* req, pnf_p7_t* pnf_p7)
void deallocate_nfapi_hi_dci0_request(nfapi_hi_dci0_request_t* req, pnf_p7_t* pnf_p7)
{
{
...
@@ -398,7 +413,15 @@ index 0fd7828..c980086 100644
...
@@ -398,7 +413,15 @@ index 0fd7828..c980086 100644
if(pnf_p7->_public.codec_config.deallocate)
if(pnf_p7->_public.codec_config.deallocate)
{
{
(pnf_p7->_public.codec_config.deallocate)(req->hi_dci0_request_body.hi_dci0_pdu_list);
(pnf_p7->_public.codec_config.deallocate)(req->hi_dci0_request_body.hi_dci0_pdu_list);
@@ -127,6 +186,9 @@
nfapi_tx_request_t* allocate_nfapi_tx_request(pnf_p7_t* pnf_p7)
@@ -115,6 +176,7 @@
void deallocate_nfapi_hi_dci0_request(nfapi_hi_dci0_request_t* req, pnf_p7_t* pn
{
free(req->hi_dci0_request_body.hi_dci0_pdu_list);
}
+ req->hi_dci0_request_body.hi_dci0_pdu_list=0;
pnf_p7_free(pnf_p7, req);
}
@@ -127,6 +189,9 @@
nfapi_tx_request_t* allocate_nfapi_tx_request(pnf_p7_t* pnf_p7)
void deallocate_nfapi_tx_request(nfapi_tx_request_t* req, pnf_p7_t* pnf_p7)
void deallocate_nfapi_tx_request(nfapi_tx_request_t* req, pnf_p7_t* pnf_p7)
{
{
int i = 0;
int i = 0;
...
@@ -408,7 +431,31 @@ index 0fd7828..c980086 100644
...
@@ -408,7 +431,31 @@ index 0fd7828..c980086 100644
for(i = 0; i < req->tx_request_body.number_of_pdus; ++i)
for(i = 0; i < req->tx_request_body.number_of_pdus; ++i)
{
{
void* data = req->tx_request_body.tx_pdu_list[i].segments[0].segment_data;
void* data = req->tx_request_body.tx_pdu_list[i].segments[0].segment_data;
@@ -307,11 +369,11 @@
void pnf_p7_rx_reassembly_queue_remove_old_msgs(pnf_p7_t* pnf_p7, pnf_p7_rx_reas
@@ -139,6 +204,7 @@
void deallocate_nfapi_tx_request(nfapi_tx_request_t* req, pnf_p7_t* pnf_p7)
{
free(data);
}
+ data=0;
}
@@ -150,6 +216,7 @@
void deallocate_nfapi_tx_request(nfapi_tx_request_t* req, pnf_p7_t* pnf_p7)
{
free(req->tx_request_body.tx_pdu_list);
}
+ req->tx_request_body.tx_pdu_list=0;
pnf_p7_free(pnf_p7, req);
}
@@ -169,6 +236,7 @@
void deallocate_nfapi_lbt_dl_config_request(nfapi_lbt_dl_config_request_t* req,
{
free(req->lbt_dl_config_request_body.lbt_dl_config_req_pdu_list);
}
+ req->lbt_dl_config_request_body.lbt_dl_config_req_pdu_list=0;
pnf_p7_free(pnf_p7, req);
}
@@ -307,11 +375,11 @@
void pnf_p7_rx_reassembly_queue_remove_old_msgs(pnf_p7_t* pnf_p7, pnf_p7_rx_reas
}
}
...
@@ -422,7 +469,7 @@ index 0fd7828..c980086 100644
...
@@ -422,7 +469,7 @@ index 0fd7828..c980086 100644
return 0;
return 0;
}
}
else
else
@@ -482,29 +5
44
,41 @@
void pnf_pack_and_send_timing_info(pnf_p7_t* pnf_p7)
@@ -482,29 +5
50
,41 @@
void pnf_pack_and_send_timing_info(pnf_p7_t* pnf_p7)
void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf)
void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf)
{
{
...
@@ -469,7 +516,7 @@ index 0fd7828..c980086 100644
...
@@ -469,7 +516,7 @@ index 0fd7828..c980086 100644
(pnf_p7->_public.lbt_dl_config_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.lbt_dl_config_req);
(pnf_p7->_public.lbt_dl_config_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.lbt_dl_config_req);
}
}
}
}
@@ -526,10 +60
0
,14 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -526,10 +60
6
,14 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
return -1;
return -1;
}
}
...
@@ -485,7 +532,7 @@ index 0fd7828..c980086 100644
...
@@ -485,7 +532,7 @@ index 0fd7828..c980086 100644
// If the subframe_buffer has been configured
// If the subframe_buffer has been configured
if(pnf_p7->_public.subframe_buffer_size != 0)
if(pnf_p7->_public.subframe_buffer_size != 0)
{
{
@@ -550,6 +6
28
,10 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -550,6 +6
34
,10 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
NFAPI_TRACE(NFAPI_TRACE_INFO, "Applying shift %d to sfn/sf (%d -> %d)\n", pnf_p7->sfn_sf_shift, NFAPI_SFNSF2DEC(sfn_sf), shifted_sfn_sf);
NFAPI_TRACE(NFAPI_TRACE_INFO, "Applying shift %d to sfn/sf (%d -> %d)\n", pnf_p7->sfn_sf_shift, NFAPI_SFNSF2DEC(sfn_sf), shifted_sfn_sf);
sfn_sf = shifted_sfn_sf;
sfn_sf = shifted_sfn_sf;
...
@@ -496,7 +543,7 @@ index 0fd7828..c980086 100644
...
@@ -496,7 +543,7 @@ index 0fd7828..c980086 100644
pnf_p7->sfn_sf_shift = 0;
pnf_p7->sfn_sf_shift = 0;
}
}
@@ -558,77 +64
0,104
@@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -558,77 +64
6,113
@@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
nfapi_pnf_p7_subframe_buffer_t* subframe_buffer = &(pnf_p7->subframe_buffer[buffer_index]);
nfapi_pnf_p7_subframe_buffer_t* subframe_buffer = &(pnf_p7->subframe_buffer[buffer_index]);
...
@@ -595,11 +642,20 @@ index 0fd7828..c980086 100644
...
@@ -595,11 +642,20 @@ index 0fd7828..c980086 100644
- if(subframe_buffer->tx_req != 0)
- if(subframe_buffer->tx_req != 0)
+ if(tx_subframe_buffer->dl_config_req != 0)
+ if(tx_subframe_buffer->dl_config_req != 0)
+ {
+ deallocate_nfapi_dl_config_request(tx_subframe_buffer->dl_config_req, pnf_p7);
+ deallocate_nfapi_dl_config_request(tx_subframe_buffer->dl_config_req, pnf_p7);
+ tx_subframe_buffer->dl_config_req = 0;
+ }
+ if(tx_subframe_buffer->tx_req != 0)
+ if(tx_subframe_buffer->tx_req != 0)
+ {
+ deallocate_nfapi_tx_request(tx_subframe_buffer->tx_req, pnf_p7);
+ deallocate_nfapi_tx_request(tx_subframe_buffer->tx_req, pnf_p7);
+ tx_subframe_buffer->tx_req = 0;
+ }
+ if(tx_subframe_buffer->hi_dci0_req != 0)
+ if(tx_subframe_buffer->hi_dci0_req != 0)
+ {
+ deallocate_nfapi_hi_dci0_request(tx_subframe_buffer->hi_dci0_req, pnf_p7);
+ deallocate_nfapi_hi_dci0_request(tx_subframe_buffer->hi_dci0_req, pnf_p7);
+ tx_subframe_buffer->hi_dci0_req = 0;
+ }
+ }
+ }
+ else if(subframe_buffer->sfn_sf == sfn_sf)
+ else if(subframe_buffer->sfn_sf == sfn_sf)
+ {
+ {
...
@@ -627,7 +683,7 @@ index 0fd7828..c980086 100644
...
@@ -627,7 +683,7 @@ index 0fd7828..c980086 100644
}
}
}
}
@@ -637,7 +7
46
,7 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -637,7 +7
61
,7 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.lbt_dl_config_req)
if(pnf_p7->_public.lbt_dl_config_req)
(pnf_p7->_public.lbt_dl_config_req)(&(pnf_p7->_public), subframe_buffer->lbt_dl_config_req);
(pnf_p7->_public.lbt_dl_config_req)(&(pnf_p7->_public), subframe_buffer->lbt_dl_config_req);
...
@@ -636,24 +692,31 @@ index 0fd7828..c980086 100644
...
@@ -636,24 +692,31 @@ index 0fd7828..c980086 100644
}
}
else
else
{
{
@@ -650,14 +7
59,31
@@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -650,14 +7
74,42
@@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
}
}
- memset(&(pnf_p7->subframe_buffer[buffer_index]), 0, sizeof(nfapi_pnf_p7_subframe_buffer_t));
- pnf_p7->subframe_buffer[buffer_index].sfn_sf = -1;
- }
+ //if(subframe_buffer->dl_config_req != 0)
+ //if(subframe_buffer->dl_config_req != 0)
+ //deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
+ //deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
+ //if(subframe_buffer->tx_req != 0)
+ //if(subframe_buffer->tx_req != 0)
+ //deallocate_nfapi_tx_request(subframe_buffer->tx_req, pnf_p7);
+ //deallocate_nfapi_tx_request(subframe_buffer->tx_req, pnf_p7);
+ if(subframe_buffer->ul_config_req != 0)
+ if(subframe_buffer->ul_config_req != 0)
+ {
+ deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
+ deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
+ subframe_buffer->ul_config_req = 0;
+
+ }
+ //if(subframe_buffer->hi_dci0_req != 0)
+ //if(subframe_buffer->hi_dci0_req != 0)
+ //deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
+ //deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
+ if(subframe_buffer->lbt_dl_config_req != 0)
+ if(subframe_buffer->lbt_dl_config_req != 0)
+ {
+ deallocate_nfapi_lbt_dl_config_request(subframe_buffer->lbt_dl_config_req, pnf_p7);
+ deallocate_nfapi_lbt_dl_config_request(subframe_buffer->lbt_dl_config_req, pnf_p7);
+
+ subframe_buffer->lbt_dl_config_req = 0;
memset(&(pnf_p7->subframe_buffer[buffer_index]), 0, sizeof(nfapi_pnf_p7_subframe_buffer_t));
+ }
pnf_p7->subframe_buffer[buffer_index].sfn_sf = -1;
+ } // sfn_sf match
}
else
else
{
{
- send_dummy_subframe(pnf_p7, sfn_sf);
- send_dummy_subframe(pnf_p7, sfn_sf);
...
@@ -662,6 +725,13 @@ index 0fd7828..c980086 100644
...
@@ -662,6 +725,13 @@ index 0fd7828..c980086 100644
+ send_dummy_subframe(pnf_p7, sfn_sf_tx);
+ send_dummy_subframe(pnf_p7, sfn_sf_tx);
}
}
+
+ if (subframe_buffer->dl_config_req == 0 && subframe_buffer->tx_req == 0 && subframe_buffer->ul_config_req == 0 && subframe_buffer->lbt_dl_config_req == 0)
+ {
+ memset(&(pnf_p7->subframe_buffer[buffer_index]), 0, sizeof(nfapi_pnf_p7_subframe_buffer_t));
+ pnf_p7->subframe_buffer[buffer_index].sfn_sf = -1;
+ }
+
+ //printf("pnf_p7->_public.timing_info_mode_periodic:%d pnf_p7->timing_info_period_counter:%d pnf_p7->_public.timing_info_period:%d\n", pnf_p7->_public.timing_info_mode_periodic, pnf_p7->timing_info_period_counter, pnf_p7->_public.timing_info_period);
+ //printf("pnf_p7->_public.timing_info_mode_periodic:%d pnf_p7->timing_info_period_counter:%d pnf_p7->_public.timing_info_period:%d\n", pnf_p7->_public.timing_info_mode_periodic, pnf_p7->timing_info_period_counter, pnf_p7->_public.timing_info_period);
+ //printf("pnf_p7->_public.timing_info_mode_aperiodic:%d pnf_p7->timing_info_aperiodic_send:%d\n", pnf_p7->_public.timing_info_mode_aperiodic, pnf_p7->timing_info_aperiodic_send);
+ //printf("pnf_p7->_public.timing_info_mode_aperiodic:%d pnf_p7->timing_info_aperiodic_send:%d\n", pnf_p7->_public.timing_info_mode_aperiodic, pnf_p7->timing_info_aperiodic_send);
+ //printf("pnf_p7->timing_info_ms_counter:%d\n", pnf_p7->timing_info_ms_counter);
+ //printf("pnf_p7->timing_info_ms_counter:%d\n", pnf_p7->timing_info_ms_counter);
...
@@ -669,7 +739,7 @@ index 0fd7828..c980086 100644
...
@@ -669,7 +739,7 @@ index 0fd7828..c980086 100644
// send the periodic timing info if configured
// send the periodic timing info if configured
if(pnf_p7->_public.timing_info_mode_periodic && (pnf_p7->timing_info_period_counter++) == pnf_p7->_public.timing_info_period)
if(pnf_p7->_public.timing_info_mode_periodic && (pnf_p7->timing_info_period_counter++) == pnf_p7->_public.timing_info_period)
{
{
@@ -678,14 +8
04
,15 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -678,14 +8
30
,15 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
}
}
else
else
{
{
...
@@ -687,7 +757,7 @@ index 0fd7828..c980086 100644
...
@@ -687,7 +757,7 @@ index 0fd7828..c980086 100644
pnf_p7->stats.dl_conf_ontime, pnf_p7->stats.dl_conf_late,
pnf_p7->stats.dl_conf_ontime, pnf_p7->stats.dl_conf_late,
pnf_p7->stats.ul_conf_ontime, pnf_p7->stats.ul_conf_late,
pnf_p7->stats.ul_conf_ontime, pnf_p7->stats.ul_conf_late,
pnf_p7->stats.hi_dci0_ontime, pnf_p7->stats.hi_dci0_late,
pnf_p7->stats.hi_dci0_ontime, pnf_p7->stats.hi_dci0_late,
@@ -694,6 +8
21
,7 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
@@ -694,6 +8
47
,7 @@
int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
memset(&pnf_p7->stats, 0, sizeof(pnf_p7->stats));
memset(&pnf_p7->stats, 0, sizeof(pnf_p7->stats));
}
}
pnf_p7->tick++;
pnf_p7->tick++;
...
@@ -695,7 +765,7 @@ index 0fd7828..c980086 100644
...
@@ -695,7 +765,7 @@ index 0fd7828..c980086 100644
if(pthread_mutex_unlock(&(pnf_p7->mutex)) != 0)
if(pthread_mutex_unlock(&(pnf_p7->mutex)) != 0)
{
{
@@ -724,7 +8
52
,7 @@
uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
@@ -724,7 +8
78
,7 @@
uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
if(recv_sfn_sf_dec > ((current_sfn_sf_dec + timing_window) % NFAPI_MAX_SFNSFDEC))
if(recv_sfn_sf_dec > ((current_sfn_sf_dec + timing_window) % NFAPI_MAX_SFNSFDEC))
{
{
// out of window
// out of window
...
@@ -704,7 +774,7 @@ index 0fd7828..c980086 100644
...
@@ -704,7 +774,7 @@ index 0fd7828..c980086 100644
}
}
else
else
{
{
@@ -736,7 +8
64
,7 @@
uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
@@ -736,7 +8
90
,7 @@
uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
else
else
{
{
// too late
// too late
...
@@ -713,7 +783,7 @@ index 0fd7828..c980086 100644
...
@@ -713,7 +783,7 @@ index 0fd7828..c980086 100644
}
}
}
}
@@ -751,8 +
879
,8 @@
uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
@@ -751,8 +
905
,8 @@
uint8_t is_p7_request_in_window(uint16_t sfnsf, const char* name, pnf_p7_t* phy)
}
}
else
else
{
{
...
@@ -724,7 +794,7 @@ index 0fd7828..c980086 100644
...
@@ -724,7 +794,7 @@ index 0fd7828..c980086 100644
}
}
}
}
@@ -785,15 +9
13
,32 @@
void pnf_handle_dl_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_
@@ -785,15 +9
39
,32 @@
void pnf_handle_dl_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_
return;
return;
}
}
...
@@ -762,7 +832,7 @@ index 0fd7828..c980086 100644
...
@@ -762,7 +832,7 @@ index 0fd7828..c980086 100644
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing dl_config_req at index %d (%d/%d)",
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing dl_config_req at index %d (%d/%d)",
// pMyPhyInfo->sfnSf, bufferIdx,
// pMyPhyInfo->sfnSf, bufferIdx,
// SFNSF2SFN(dreq->sfn_sf), SFNSF2SF(dreq->sfn_sf));
// SFNSF2SFN(dreq->sfn_sf), SFNSF2SF(dreq->sfn_sf));
@@ -994,6 +11
39
,16 @@
void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7)
@@ -994,6 +11
65
,16 @@
void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7)
uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf);
uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf);
uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size;
uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size;
...
@@ -779,7 +849,7 @@ index 0fd7828..c980086 100644
...
@@ -779,7 +849,7 @@ index 0fd7828..c980086 100644
if(pnf_p7->subframe_buffer[buffer_index].tx_req != 0)
if(pnf_p7->subframe_buffer[buffer_index].tx_req != 0)
{
{
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing tx_req at index %d (%d/%d)",
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing tx_req at index %d (%d/%d)",
@@ -1010,6 +11
65
,8 @@
void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7)
@@ -1010,6 +11
91
,8 @@
void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7)
}
}
else
else
{
{
...
@@ -788,7 +858,7 @@ index 0fd7828..c980086 100644
...
@@ -788,7 +858,7 @@ index 0fd7828..c980086 100644
deallocate_nfapi_tx_request(req, pnf_p7);
deallocate_nfapi_tx_request(req, pnf_p7);
if(pnf_p7->_public.timing_info_mode_aperiodic)
if(pnf_p7->_public.timing_info_mode_aperiodic)
@@ -1126,12 +1
283
,27 @@
uint32_t calculate_t2(uint32_t now_time_hr, uint16_t sfn_sf, uint32_t sf_start_t
@@ -1126,12 +1
309
,27 @@
uint32_t calculate_t2(uint32_t now_time_hr, uint16_t sfn_sf, uint32_t sf_start_t
uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr);
uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr);
uint32_t t2 = (NFAPI_SFNSF2DEC(sfn_sf) * 1000) + sf_time_us;
uint32_t t2 = (NFAPI_SFNSF2DEC(sfn_sf) * 1000) + sf_time_us;
...
@@ -817,7 +887,7 @@ index 0fd7828..c980086 100644
...
@@ -817,7 +887,7 @@ index 0fd7828..c980086 100644
uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr);
uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr);
@@ -1391,6 +15
63
,8 @@
void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time)
@@ -1391,6 +15
89
,8 @@
void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time)
// read the segment
// read the segment
recvfrom_result = recvfrom(pnf_p7->p7_sock, pnf_p7->rx_message_buffer, header.message_length, MSG_DONTWAIT, (struct sockaddr*)&remote_addr, &remote_addr_size);
recvfrom_result = recvfrom(pnf_p7->p7_sock, pnf_p7->rx_message_buffer, header.message_length, MSG_DONTWAIT, (struct sockaddr*)&remote_addr, &remote_addr_size);
...
@@ -826,7 +896,7 @@ index 0fd7828..c980086 100644
...
@@ -826,7 +896,7 @@ index 0fd7828..c980086 100644
if(recvfrom_result > 0)
if(recvfrom_result > 0)
{
{
pnf_handle_p7_message(pnf_p7->rx_message_buffer, recvfrom_result, pnf_p7, now_hr_time);
pnf_handle_p7_message(pnf_p7->rx_message_buffer, recvfrom_result, pnf_p7, now_hr_time);
@@ -1417,7 +1
591
,10 @@
void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time)
@@ -1417,7 +1
617
,10 @@
void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time)
// need to update the time as we would only use the value from the
// need to update the time as we would only use the value from the
// select
// select
...
@@ -838,7 +908,7 @@ index 0fd7828..c980086 100644
...
@@ -838,7 +908,7 @@ index 0fd7828..c980086 100644
}
}
while(recvfrom_result > 0);
while(recvfrom_result > 0);
}
}
@@ -1512,7 +1
689
,7 @@
int pnf_p7_message_pump(pnf_p7_t* pnf_p7)
@@ -1512,7 +1
715
,7 @@
int pnf_p7_message_pump(pnf_p7_t* pnf_p7)
selectRetval = select(pnf_p7->p7_sock+1, &rfds, NULL, NULL, &timeout);
selectRetval = select(pnf_p7->p7_sock+1, &rfds, NULL, NULL, &timeout);
...
...
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