Commit 39f07d7a authored by Andrew Burger's avatar Andrew Burger

Set scheduler priorty to 1

To match emane.

Checked with:
```
ps ax -o pid,class,priority,comm |grep RR
```
parent 6dd80ffd
...@@ -1220,7 +1220,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) ...@@ -1220,7 +1220,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
tx_req->header.message_id = NFAPI_TX_REQUEST; tx_req->header.message_id = NFAPI_TX_REQUEST;
LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus); LOG_I(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
int retval = nfapi_vnf_p7_tx_req(p7_config, tx_req); int retval = nfapi_vnf_p7_tx_req(p7_config, tx_req);
if (retval!=0) { if (retval!=0) {
......
...@@ -160,7 +160,6 @@ void ue_init_mac(module_id_t module_idP) { ...@@ -160,7 +160,6 @@ void ue_init_mac(module_id_t module_idP) {
UE_mac_inst[module_idP].SI_Decoded = 0; UE_mac_inst[module_idP].SI_Decoded = 0;
next_ra_frame = 0; next_ra_frame = 0;
next_Mod_id = 0; next_Mod_id = 0;
tx_req_num_elems = 0;
} }
} }
...@@ -414,7 +413,7 @@ ue_send_sdu(module_id_t module_idP, ...@@ -414,7 +413,7 @@ ue_send_sdu(module_id_t module_idP,
if (payload_ptr != NULL) { if (payload_ptr != NULL) {
for (i = 0; i < num_ce; i++) { for (i = 0; i < num_ce; i++) {
LOG_D(MAC, "ce %d : %d\n",i,rx_ces[i]); LOG_I(MAC, "ce %d : %d\n",i,rx_ces[i]);
switch (rx_ces[i]) { switch (rx_ces[i]) {
case UE_CONT_RES: case UE_CONT_RES:
LOG_I(MAC, LOG_I(MAC,
......
This diff is collapsed.
...@@ -29,8 +29,6 @@ extern UL_IND_t *UL_INFO; ...@@ -29,8 +29,6 @@ extern UL_IND_t *UL_INFO;
/// Pointers to config_request types. Used from nfapi callback functions. /// Pointers to config_request types. Used from nfapi callback functions.
//below 3 difinitions move to phy_stub_UE.c to add initialization when difinition. //below 3 difinitions move to phy_stub_UE.c to add initialization when difinition.
int tx_req_num_elems;
//below 2 difinitions move to lte-ue.c to add initialization when difinition. //below 2 difinitions move to lte-ue.c to add initialization when difinition.
//int next_ra_frame; //int next_ra_frame;
//module_id_t next_Mod_id; //module_id_t next_Mod_id;
...@@ -99,12 +97,20 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -99,12 +97,20 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint16_t frame,uint8_t subframe,uint8_t srs_present, int index, uint16_t frame,uint8_t subframe,uint8_t srs_present, int index,
nfapi_ul_config_request_t *ul_config_req); nfapi_ul_config_request_t *ul_config_req);
typedef struct nfapi_tx_req_pdu_list_t
{
int num_pdus; /* number .pdus[] objects */
nfapi_tx_request_pdu_t pdus[]; /* see "struct hack" */
} nfapi_tx_req_pdu_list_t;
void nfapi_free_tx_req_pdu_list(nfapi_tx_req_pdu_list_t *);
void dl_config_req_UE_MAC_dci(int sfn, void dl_config_req_UE_MAC_dci(int sfn,
int sf, int sf,
nfapi_dl_config_request_pdu_t *dci, nfapi_dl_config_request_pdu_t *dci,
nfapi_dl_config_request_pdu_t *dlsch, nfapi_dl_config_request_pdu_t *dlsch,
int num_ue, int num_ue,
nfapi_tx_request_pdu_t *tx_request_pdu_list); nfapi_tx_req_pdu_list_t *);
void dl_config_req_UE_MAC_bch(int sfn, void dl_config_req_UE_MAC_bch(int sfn,
int sf, int sf,
nfapi_dl_config_request_pdu_t *bch, nfapi_dl_config_request_pdu_t *bch,
...@@ -113,7 +119,7 @@ void dl_config_req_UE_MAC_mch(int sfn, ...@@ -113,7 +119,7 @@ void dl_config_req_UE_MAC_mch(int sfn,
int sf, int sf,
nfapi_dl_config_request_pdu_t *bch, nfapi_dl_config_request_pdu_t *bch,
int num_ue, int num_ue,
nfapi_tx_request_pdu_t *tx_request_pdu_list); nfapi_tx_req_pdu_list_t *);
int tx_req_UE_MAC(nfapi_tx_request_t* req); int tx_req_UE_MAC(nfapi_tx_request_t* req);
...@@ -154,9 +160,8 @@ char *nfapi_ul_config_req_to_string(nfapi_ul_config_request_t *req); ...@@ -154,9 +160,8 @@ char *nfapi_ul_config_req_to_string(nfapi_ul_config_request_t *req);
const char *dl_pdu_type_to_string(uint8_t pdu_type); const char *dl_pdu_type_to_string(uint8_t pdu_type);
const char *ul_pdu_type_to_string(uint8_t pdu_type); const char *ul_pdu_type_to_string(uint8_t pdu_type);
extern queue_t dl_config_req_queue; extern queue_t dl_config_req_queue;
extern queue_t tx_req_pdu_queue; extern queue_t tx_req_pdu_queue; /* items in this queue are nfapi_tx_req_pdu_list_t* */
extern queue_t ul_config_req_queue; extern queue_t ul_config_req_queue;
extern queue_t hi_dci0_req_queue; extern queue_t hi_dci0_req_queue;
......
...@@ -1088,9 +1088,9 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1088,9 +1088,9 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
} }
last_sfn_sf = sfn_sf; last_sfn_sf = sfn_sf;
nfapi_tx_request_pdu_t *tx_request_pdu_list = get_queue(&tx_req_pdu_queue); nfapi_tx_req_pdu_list_t *tx_req_pdu_list = get_queue(&tx_req_pdu_queue);
nfapi_dl_config_request_t *dl_config_req = get_queue(&dl_config_req_queue); nfapi_dl_config_request_t *dl_config_req = get_queue(&dl_config_req_queue);
if (tx_request_pdu_list) if (tx_req_pdu_list)
{ {
uint64_t deadline = clock_usec() + 1000; uint64_t deadline = clock_usec() + 1000;
if (!dl_config_req) if (!dl_config_req)
...@@ -1116,7 +1116,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1116,7 +1116,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
nfapi_ul_config_request_t *ul_config_req = get_queue(&ul_config_req_queue); nfapi_ul_config_request_t *ul_config_req = get_queue(&ul_config_req_queue);
nfapi_hi_dci0_request_t *hi_dci0_req = get_queue(&hi_dci0_req_queue); nfapi_hi_dci0_request_t *hi_dci0_req = get_queue(&hi_dci0_req_queue);
LOG_D(MAC, "received from proxy frame %d subframe %d\n", LOG_I(MAC, "received from proxy frame %d subframe %d\n",
NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf)); NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf));
if (dl_config_req != NULL) { if (dl_config_req != NULL) {
uint16_t dl_num_pdus = dl_config_req->dl_config_request_body.number_pdu; uint16_t dl_num_pdus = dl_config_req->dl_config_request_body.number_pdu;
...@@ -1126,19 +1126,18 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1126,19 +1126,18 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
dl_num_pdus); dl_num_pdus);
if (dl_num_pdus > 0) { if (dl_num_pdus > 0) {
char *dl_str = nfapi_dl_config_req_to_string(dl_config_req); char *dl_str = nfapi_dl_config_req_to_string(dl_config_req);
LOG_D(MAC, "dl_config_req: %s\n", dl_str); LOG_I(MAC, "dl_config_req: %s\n", dl_str);
free(dl_str); free(dl_str);
} }
} }
if (tx_request_pdu_list != NULL) { if (tx_req_pdu_list != NULL) {
LOG_D(MAC, "tx_req segments: %u\n", LOG_D(MAC, "tx_req pdus: %d\n", tx_req_pdu_list->num_pdus);
tx_request_pdu_list->num_segments);
} }
if (ul_config_req != NULL) { if (ul_config_req != NULL) {
uint8_t ul_num_pdus = ul_config_req->ul_config_request_body.number_of_pdus; uint8_t ul_num_pdus = ul_config_req->ul_config_request_body.number_of_pdus;
if (ul_num_pdus > 0) { if (ul_num_pdus > 0) {
char *ul_str = nfapi_ul_config_req_to_string(ul_config_req); char *ul_str = nfapi_ul_config_req_to_string(ul_config_req);
LOG_D(MAC, "ul_config_req: %s\n", ul_str); LOG_I(MAC, "ul_config_req: %s\n", ul_str);
free(ul_str); free(ul_str);
} }
} }
...@@ -1148,13 +1147,13 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1148,13 +1147,13 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf)); NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf));
} }
if ((dl_config_req != NULL) != (tx_request_pdu_list != NULL)) { if ((dl_config_req != NULL) != (tx_req_pdu_list != NULL)) {
num_lone++; num_lone++;
} else { } else {
num_pairs++; num_pairs++;
} }
if (dl_config_req && tx_request_pdu_list) { if (dl_config_req && tx_req_pdu_list) {
if ((num_pairs % 1000) == 0) { if ((num_pairs % 1000) == 0) {
LOG_I(MAC, "num_pairs:%d, num_lone:%d\n", num_pairs, num_lone); LOG_I(MAC, "num_pairs:%d, num_lone:%d\n", num_pairs, num_lone);
} }
...@@ -1176,7 +1175,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1176,7 +1175,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
pdu, pdu,
dlsch, dlsch,
ue_num, ue_num,
tx_request_pdu_list); tx_req_pdu_list);
} else if (pdu->pdu_type == NFAPI_DL_CONFIG_BCH_PDU_TYPE) { } else if (pdu->pdu_type == NFAPI_DL_CONFIG_BCH_PDU_TYPE) {
dl_config_req_UE_MAC_bch(NFAPI_SFNSF2SFN(dl_config_req->sfn_sf), dl_config_req_UE_MAC_bch(NFAPI_SFNSF2SFN(dl_config_req->sfn_sf),
NFAPI_SFNSF2SF(dl_config_req->sfn_sf), NFAPI_SFNSF2SF(dl_config_req->sfn_sf),
...@@ -1187,7 +1186,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1187,7 +1186,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
NFAPI_SFNSF2SF(dl_config_req->sfn_sf), NFAPI_SFNSF2SF(dl_config_req->sfn_sf),
pdu, pdu,
ue_num, ue_num,
tx_request_pdu_list); tx_req_pdu_list);
} }
} }
} }
...@@ -1361,16 +1360,9 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1361,16 +1360,9 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
dl_config_req = NULL; dl_config_req = NULL;
} }
if (tx_request_pdu_list != NULL) { if (tx_req_pdu_list != NULL) {
for (int i = 0; i < tx_req_num_elems; i++) { nfapi_free_tx_req_pdu_list(tx_req_pdu_list);
for (int j = 0; j < tx_request_pdu_list[i].num_segments; j++) { tx_req_pdu_list = NULL;
free(tx_request_pdu_list[i].segments[j].segment_data);
tx_request_pdu_list[i].segments[j].segment_data = NULL;
}
}
tx_req_num_elems = 0;
free(tx_request_pdu_list);
tx_request_pdu_list = NULL;
} }
if (ul_config_req != NULL) { if (ul_config_req != NULL) {
...@@ -1475,7 +1467,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) ...@@ -1475,7 +1467,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
dl_config_req = NULL; dl_config_req = NULL;
ul_config_req = NULL; ul_config_req = NULL;
hi_dci0_req = NULL; hi_dci0_req = NULL;
tx_request_pdu_list = NULL; tx_req_pdu_list = NULL;
// waiting for all UE's threads set phy_stub_ticking->num_single_thread[ue_thread_id] = -1. // waiting for all UE's threads set phy_stub_ticking->num_single_thread[ue_thread_id] = -1.
do { do {
...@@ -1571,7 +1563,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) ...@@ -1571,7 +1563,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
} }
} }
if (dl_config_req && tx_request_pdu_list) { if (dl_config_req && tx_req_pdu_list) {
nfapi_dl_config_request_body_t* dl_config_req_body = &dl_config_req->dl_config_request_body; nfapi_dl_config_request_body_t* dl_config_req_body = &dl_config_req->dl_config_request_body;
for (int i = 0; i < dl_config_req_body->number_pdu; ++i) { for (int i = 0; i < dl_config_req_body->number_pdu; ++i) {
nfapi_dl_config_request_pdu_t* pdu = &dl_config_req_body->dl_config_pdu_list[i]; nfapi_dl_config_request_pdu_t* pdu = &dl_config_req_body->dl_config_pdu_list[i];
...@@ -1785,16 +1777,16 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) ...@@ -1785,16 +1777,16 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
dl_config_req = NULL; dl_config_req = NULL;
} }
if(tx_request_pdu_list!=NULL) { if(tx_req_pdu_list!=NULL) {
for (int i = 0; i < tx_req_num_elems; i++) { for (int i = 0; i < tx_req_num_elems; i++) {
for (int j = 0; j < tx_request_pdu_list[i].num_segments; j++) { for (int j = 0; j < tx_req_pdu_list[i].num_segments; j++) {
free(tx_request_pdu_list[i].segments[j].segment_data); free(tx_req_pdu_list[i].segments[j].segment_data);
tx_request_pdu_list[i].segments[j].segment_data = NULL; tx_req_pdu_list[i].segments[j].segment_data = NULL;
} }
} }
tx_req_num_elems = 0; tx_req_num_elems = 0;
free(tx_request_pdu_list); free(tx_req_pdu_list);
tx_request_pdu_list = NULL; tx_req_pdu_list = NULL;
} }
if(ul_config_req!=NULL) { if(ul_config_req!=NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment