RLC: _req() accepts max TB size, _ind() not
Previously, the various rlc_*_ind() functions had a parameter to enable the MAC to specify the max TB size that a subsequent call to the corresponding rlc_*_req() (!) function would return. This patch removes this parameter from the rlc_*_ind() functions and makes the parameter working that is already in the rlc_*_req() functions.
This commit is contained in:
@@ -459,7 +459,6 @@ struct mac_status_resp
|
||||
rlc_am_mac_status_indication (
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
void *const rlc_pP,
|
||||
const uint16_t tb_sizeP,
|
||||
struct mac_status_ind tx_statusP,
|
||||
const eNB_flag_t enb_flagP) {
|
||||
struct mac_status_resp status_resp;
|
||||
@@ -491,10 +490,6 @@ rlc_am_mac_status_indication (
|
||||
|
||||
rlc->last_absolute_subframe_status_indication = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP);
|
||||
|
||||
if (tb_sizeP > 0) {
|
||||
rlc->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
}
|
||||
|
||||
status_resp.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, rlc);
|
||||
|
||||
// For eNB scheduler : Add Max RLC header size for new PDU
|
||||
@@ -549,8 +544,7 @@ rlc_am_mac_status_indication (
|
||||
NULL,0,
|
||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS-IND %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc),
|
||||
tb_sizeP);
|
||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc));
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
|
||||
@@ -565,26 +559,14 @@ rlc_am_mac_status_indication (
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_RLC)) {
|
||||
if (tb_sizeP > 0) {
|
||||
LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc),
|
||||
tb_sizeP,
|
||||
status_resp.buffer_occupancy_in_bytes);
|
||||
}
|
||||
LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) -> %d bytes\n",
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc),
|
||||
status_resp.buffer_occupancy_in_bytes);
|
||||
}
|
||||
|
||||
return status_resp;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_am_set_nb_bytes_requested_by_mac (
|
||||
void *const rlc_pP,
|
||||
const tb_size_t tb_sizeP
|
||||
) {
|
||||
((rlc_am_entity_t *) rlc_pP)->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
struct mac_data_req
|
||||
rlc_am_mac_data_request (
|
||||
|
||||
@@ -255,23 +255,15 @@ rlc_am_get_pdus (
|
||||
*/
|
||||
void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);
|
||||
|
||||
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP)
|
||||
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP)
|
||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
||||
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
||||
* \param[in] enb_flagP eNB or UE flag indication.
|
||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||
*/
|
||||
struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
|
||||
|
||||
/*! \fn void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP)
|
||||
* \brief Set available TBS for RLC Tx just before am_mac_data_request. Used for UE only.
|
||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||
* \param[in] tb_sizeP Available Tx Transport Block size in bytes.
|
||||
*/
|
||||
void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP);
|
||||
struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
|
||||
|
||||
/*! \fn struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP)
|
||||
* \brief Gives PDUs to lower layer MAC.
|
||||
|
||||
@@ -151,13 +151,10 @@ struct mac_status_resp
|
||||
rlc_tm_mac_status_indication (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
void * const rlc_pP,
|
||||
const tb_size_t tb_sizeP,
|
||||
struct mac_status_ind tx_statusP)
|
||||
{
|
||||
struct mac_status_resp status_resp;
|
||||
|
||||
((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size = tb_sizeP;
|
||||
|
||||
status_resp.buffer_occupancy_in_bytes = ((rlc_tm_entity_t *) rlc_pP)->buffer_occupancy;
|
||||
status_resp.buffer_occupancy_in_pdus = status_resp.buffer_occupancy_in_bytes / ((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size;
|
||||
status_resp.rlc_info.rlc_protocol_state = ((rlc_tm_entity_t *) rlc_pP)->protocol_state;
|
||||
|
||||
@@ -88,11 +88,10 @@ void rlc_tm_rx (
|
||||
struct mac_data_ind data_indP);
|
||||
|
||||
|
||||
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void * const rlcP, const uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void * const rlcP, struct mac_status_ind tx_statusP)
|
||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
||||
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||
*/
|
||||
@@ -100,7 +99,6 @@ struct mac_status_resp
|
||||
rlc_tm_mac_status_indication (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
void * const rlc_pP,
|
||||
const tb_size_t tb_sizeP,
|
||||
struct mac_status_ind tx_statusP);
|
||||
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
struct mac_status_resp
|
||||
rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP) {
|
||||
rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP) {
|
||||
struct mac_status_resp status_resp;
|
||||
uint16_t sdu_size = 0;
|
||||
uint16_t sdu_remaining_size = 0;
|
||||
@@ -386,7 +386,6 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
|
||||
if (rlc_pP) {
|
||||
status_resp.rlc_info.rlc_protocol_state = rlc_p->protocol_state;
|
||||
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_p);
|
||||
rlc_p->nb_bytes_requested_by_mac = tbs_sizeP;
|
||||
status_resp.buffer_occupancy_in_bytes = rlc_um_get_buffer_occupancy (rlc_p);
|
||||
|
||||
if ((status_resp.buffer_occupancy_in_bytes > 0) && ((mb_p = list_get_head(&rlc_p->input_sdus)) != NULL)) {
|
||||
@@ -416,9 +415,8 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_RLC)) {
|
||||
if (( rlc_p->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
|
||||
LOG_UI(RLC, PROTOCOL_RLC_UM_CTXT_FMT"MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
|
||||
LOG_UI(RLC, PROTOCOL_RLC_UM_CTXT_FMT"MAC_STATUS_INDICATION (DATA) -> %d bytes available\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||
tbs_sizeP,
|
||||
status_resp.buffer_occupancy_in_bytes);
|
||||
|
||||
if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
|
||||
@@ -441,15 +439,6 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
|
||||
return status_resp;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rlc_um_set_nb_bytes_requested_by_mac (
|
||||
void *rlc_pP,
|
||||
const tb_size_t tb_sizeP
|
||||
) {
|
||||
((rlc_um_entity_t *) rlc_pP)->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
struct mac_data_req
|
||||
rlc_um_mac_data_request (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP,const eNB_flag_t enb_flagP) {
|
||||
|
||||
@@ -160,27 +160,15 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP);
|
||||
*/
|
||||
void
|
||||
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP);
|
||||
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_status_ind tx_statusP)
|
||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
||||
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||
*/
|
||||
struct mac_status_resp
|
||||
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
|
||||
|
||||
/*! \fn void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * const rlc_pP, const tb_size_t tb_sizeP)
|
||||
* \brief Set available TBS size for MAC Tx.
|
||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||
* \param[in] tb_sizeP remaining TBS in bytes.
|
||||
*/
|
||||
void
|
||||
rlc_um_set_nb_bytes_requested_by_mac (
|
||||
void * rlc_pP,
|
||||
const tb_size_t tb_sizeP
|
||||
);
|
||||
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
|
||||
|
||||
/*! \fn struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP)
|
||||
* \brief Gives PDUs to lower layer MAC.
|
||||
|
||||
@@ -391,7 +391,7 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
|
||||
* \param [in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
||||
* \param [in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||
* \param [in] rb_idP Radio bearer identifier.
|
||||
* \param [in] tb_sizeP Available Tx TBS in bytes. For UE only.
|
||||
* \param [in] tb_sizeP Requested Tx TBS in bytes.
|
||||
* \param [in,out] bufferP Memory area to fill with the bytes requested by MAC.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
@@ -416,7 +416,7 @@ tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, con
|
||||
void mac_rlc_data_ind (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, char *, tb_size_t, num_tb_t,
|
||||
crc_t * );
|
||||
|
||||
/*! \fn mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, tb_size_t tb_sizeP)
|
||||
/*! \fn mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP)
|
||||
* \brief Interface with MAC layer, request and set the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
|
||||
* \param[in] mod_idP Virtualized module identifier.
|
||||
* \param[in] rntiP UE identifier.
|
||||
@@ -425,10 +425,9 @@ void mac_rlc_data_ind (const module_id_t, const rnti_t, con
|
||||
* \param[in] eNB_flagP Flag to indicate eNB operation (1 true, 0 false)
|
||||
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] tb_sizeP Size of a transport block set in bytes.
|
||||
* \return The maximum number of bytes that the RLC instance can send in the next transmission sequence.
|
||||
*/
|
||||
mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t
|
||||
mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
);
|
||||
|
||||
@@ -191,20 +191,19 @@ tbs_size_t mac_rlc_data_req(
|
||||
case RLC_MODE_AM:
|
||||
rlc_am_mui.rrc_mui_num = 0;
|
||||
|
||||
if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP);
|
||||
|
||||
((rlc_am_entity_t *) &rlc_union_p->rlc.am)->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP);
|
||||
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
|
||||
|
||||
((rlc_um_entity_t *) &rlc_union_p->rlc.um)->nb_bytes_requested_by_mac = tb_sizeP;
|
||||
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
((rlc_tm_entity_t *) &rlc_union_p->rlc.tm)->rlc_pdu_size = tb_sizeP;
|
||||
data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
@@ -317,7 +316,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
const eNB_flag_t enb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const logical_chan_id_t channel_idP,
|
||||
const tb_size_t tb_sizeP,
|
||||
const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
) {
|
||||
@@ -370,7 +368,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
break;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status,enb_flagP);
|
||||
status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tx_status,enb_flagP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
@@ -379,7 +377,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status, enb_flagP);
|
||||
status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tx_status, enb_flagP);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
@@ -389,7 +387,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status);
|
||||
status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tx_status);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
// return mac_rlc_status_resp;
|
||||
|
||||
Reference in New Issue
Block a user