Code Review
/
o-du
/
phy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git]
/
fapi_5g
/
source
/
api
/
fapi2mac
/
nr5g_fapi_fapi2mac_api.c
diff --git
a/fapi_5g/source/api/fapi2mac/nr5g_fapi_fapi2mac_api.c
b/fapi_5g/source/api/fapi2mac/nr5g_fapi_fapi2mac_api.c
index
ca332a2
..
cc7bf1c
100644
(file)
--- a/
fapi_5g/source/api/fapi2mac/nr5g_fapi_fapi2mac_api.c
+++ b/
fapi_5g/source/api/fapi2mac/nr5g_fapi_fapi2mac_api.c
@@
-1,6
+1,6
@@
/******************************************************************************
*
/******************************************************************************
*
-* Copyright (c) 20
19
Intel.
+* Copyright (c) 20
21
Intel.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-24,29
+24,31
@@
#include <stdio.h>
#include "nr5g_fapi_internal.h"
#include <stdio.h>
#include "nr5g_fapi_internal.h"
-#include "gnb_l1_l2_api.h"
#include "nr5g_fapi_fapi2mac_api.h"
#include "nr5g_fapi_fapi2mac_wls.h"
#include "nr5g_fapi_log.h"
static nr5g_fapi_fapi2mac_queue_t fapi2mac_q[FAPI_MAX_PHY_INSTANCES];
#include "nr5g_fapi_fapi2mac_api.h"
#include "nr5g_fapi_fapi2mac_wls.h"
#include "nr5g_fapi_log.h"
static nr5g_fapi_fapi2mac_queue_t fapi2mac_q[FAPI_MAX_PHY_INSTANCES];
+static nr5g_fapi_fapi2mac_queue_t fapi2mac_urllc_q[FAPI_MAX_PHY_INSTANCES];
+
//------------------------------------------------------------------------------
/** @ingroup group_source_api_fapi2phy
*
//------------------------------------------------------------------------------
/** @ingroup group_source_api_fapi2phy
*
- * @param[in] p_list_elem Pointer to the ListElement
+ * @param[in] phy_id Value of phy_id.
+ * @param[in] is_urllc True for urllc, false otherwise.
*
*
- * @return
void
+ * @return
Pointer to fapi2mac api queue.
*
*
- * @description This function adds a ListElement API to a Linked list which will
- * be sent to L1 once all APIs for a TTI are added
+ * @description This function access proper instance of fapi2mac queue.
*
**/
//------------------------------------------------------------------------------
*
**/
//------------------------------------------------------------------------------
-inline p_nr5g_fapi_fapi2mac_queue_t nr5g_fapi_fapi2mac_queue(
- uint8_t phy_id)
+static inline p_nr5g_fapi_fapi2mac_queue_t nr5g_fapi_fapi2mac_queue(
+ uint8_t phy_id,
+ bool is_urllc)
{
{
- return &fapi2mac_q[phy_id];
+ return
is_urllc ? &fapi2mac_urllc_q[phy_id] :
&fapi2mac_q[phy_id];
}
//------------------------------------------------------------------------------
}
//------------------------------------------------------------------------------
@@
-63,7
+65,8
@@
inline p_nr5g_fapi_fapi2mac_queue_t nr5g_fapi_fapi2mac_queue(
//------------------------------------------------------------------------------
void nr5g_fapi_fapi2mac_add_api_to_list(
uint8_t phy_id,
//------------------------------------------------------------------------------
void nr5g_fapi_fapi2mac_add_api_to_list(
uint8_t phy_id,
- p_fapi_api_queue_elem_t p_list_elem)
+ p_fapi_api_queue_elem_t p_list_elem,
+ bool is_urllc)
{
p_nr5g_fapi_fapi2mac_queue_t queue = NULL;
p_fapi_msg_header_t p_fapi_msg_hdr = NULL;
{
p_nr5g_fapi_fapi2mac_queue_t queue = NULL;
p_fapi_msg_header_t p_fapi_msg_hdr = NULL;
@@
-72,7
+75,7
@@
void nr5g_fapi_fapi2mac_add_api_to_list(
return;
}
return;
}
- queue = nr5g_fapi_fapi2mac_queue(phy_id);
+ queue = nr5g_fapi_fapi2mac_queue(phy_id
, is_urllc
);
if (pthread_mutex_lock((pthread_mutex_t *) & queue->lock)) {
NR5G_FAPI_LOG(ERROR_LOG, ("unable to lock fapi2mac aggregate list"
"pthread mutex"));
if (pthread_mutex_lock((pthread_mutex_t *) & queue->lock)) {
NR5G_FAPI_LOG(ERROR_LOG, ("unable to lock fapi2mac aggregate list"
"pthread mutex"));
@@
-105,7
+108,7
@@
void nr5g_fapi_fapi2mac_add_api_to_list(
**/
//------------------------------------------------------------------------------
void nr5g_fapi_fapi2mac_send_api_list(
**/
//------------------------------------------------------------------------------
void nr5g_fapi_fapi2mac_send_api_list(
- )
+
bool is_urllc
)
{
uint8_t phy_id = 0;
p_fapi_msg_header_t p_fapi_msg_hdr = NULL;
{
uint8_t phy_id = 0;
p_fapi_msg_header_t p_fapi_msg_hdr = NULL;
@@
-114,7
+117,7
@@
void nr5g_fapi_fapi2mac_send_api_list(
p_nr5g_fapi_fapi2mac_queue_t queue = NULL;
for (phy_id = 0; phy_id < FAPI_MAX_PHY_INSTANCES; phy_id++) {
p_nr5g_fapi_fapi2mac_queue_t queue = NULL;
for (phy_id = 0; phy_id < FAPI_MAX_PHY_INSTANCES; phy_id++) {
- queue = nr5g_fapi_fapi2mac_queue(phy_id);
+ queue = nr5g_fapi_fapi2mac_queue(phy_id
, is_urllc
);
if (pthread_mutex_lock((pthread_mutex_t *) & queue->lock)) {
NR5G_FAPI_LOG(ERROR_LOG, ("unable to lock fapi2mac aggregate list"
"pthread mutex"));
if (pthread_mutex_lock((pthread_mutex_t *) & queue->lock)) {
NR5G_FAPI_LOG(ERROR_LOG, ("unable to lock fapi2mac aggregate list"
"pthread mutex"));
@@
-145,7
+148,7
@@
void nr5g_fapi_fapi2mac_send_api_list(
}
if (p_commit_list_head)
}
if (p_commit_list_head)
- nr5g_fapi_fapi2mac_wls_send(p_commit_list_head);
+ nr5g_fapi_fapi2mac_wls_send(p_commit_list_head
, is_urllc
);
}
//------------------------------------------------------------------------------
}
//------------------------------------------------------------------------------
@@
-203,7
+206,9
@@
void nr5g_fapi_fapi2mac_init_api_list(
p_nr5g_fapi_fapi2mac_queue_t queue = NULL;
for (phy_id = 0; phy_id < FAPI_MAX_PHY_INSTANCES; phy_id++) {
p_nr5g_fapi_fapi2mac_queue_t queue = NULL;
for (phy_id = 0; phy_id < FAPI_MAX_PHY_INSTANCES; phy_id++) {
- queue = nr5g_fapi_fapi2mac_queue(phy_id);
+ queue = nr5g_fapi_fapi2mac_queue(phy_id, false);
+ pthread_mutex_init((pthread_mutex_t *) & queue->lock, NULL);
+ queue = nr5g_fapi_fapi2mac_queue(phy_id, true);
pthread_mutex_init((pthread_mutex_t *) & queue->lock, NULL);
}
}
pthread_mutex_init((pthread_mutex_t *) & queue->lock, NULL);
}
}