mirror of https://github.com/PentHertz/srsLTE.git
nr,gnb,mac: account for header space larger than 2 when packing PDSCH
This commit is contained in:
parent
f7dd327d08
commit
f427a25a30
|
@ -198,8 +198,9 @@ public:
|
|||
|
||||
void to_string(fmt::memory_buffer& buffer);
|
||||
|
||||
private:
|
||||
uint32_t size_header_sdu(const uint32_t lcid_, const uint32_t nbytes);
|
||||
|
||||
private:
|
||||
/// Private helper that adds a subPDU to the MAC PDU
|
||||
uint32_t add_sudpdu(mac_sch_subpdu_nr& subpdu);
|
||||
|
||||
|
|
|
@ -423,13 +423,8 @@ uint32_t mac_sch_pdu_nr::size_header_sdu(const uint32_t lcid, const uint32_t nby
|
|||
{
|
||||
if (ulsch && (lcid == mac_sch_subpdu_nr::CCCH_SIZE_48 || lcid == mac_sch_subpdu_nr::CCCH_SIZE_64)) {
|
||||
return 1;
|
||||
} else {
|
||||
if (nbytes < 256) {
|
||||
return 2;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
return nbytes < 256 ? 2 : 3;
|
||||
}
|
||||
|
||||
uint32_t mac_sch_pdu_nr::get_remaing_len()
|
||||
|
|
|
@ -146,8 +146,9 @@ int ue_nr::generate_pdu(srsran::byte_buffer_t* pdu, uint32_t grant_size)
|
|||
|
||||
// read RLC PDU
|
||||
ue_rlc_buffer->clear();
|
||||
int lcid = 4;
|
||||
int pdu_len = rlc->read_pdu(rnti, lcid, ue_rlc_buffer->msg, grant_size - 2);
|
||||
int lcid = 4;
|
||||
int pdu_len =
|
||||
rlc->read_pdu(rnti, lcid, ue_rlc_buffer->msg, grant_size - mac_pdu_dl.size_header_sdu(lcid, grant_size));
|
||||
|
||||
// Only create PDU if RLC has something to tx
|
||||
if (pdu_len > 0) {
|
||||
|
|
Loading…
Reference in New Issue