Unipisa / Simu5G

Simu5G - 5G NR and LTE/LTE-A user-plane simulation model for OMNeT++ & INET
https://simu5g.org
Other
142 stars 81 forks source link

Question about DRB mapping #134

Closed dekaio closed 1 year ago

dekaio commented 1 year ago

As referenced in [1], I understand that the MAC layer runs periodically every TTI, checks available CCs, and schedules resources to the UEs on every CC based on the scheduling algorithm, and that in DL, after scheduling, the MAC layer builds a TB based on the allocated RBs and the CQI.
However, how exactly the different flow types in Conversational, Streaming, Interactive, and Background classes are mapped to different DRBs is not clear to me. Is CC equivalent to a DRB?

[1] "Simu5G: a system-level simulator for 5G networks"

Thank you.

giovanninardini commented 1 year ago

Each flow is mapped to one Logical Connection Identifier (LCID) - this is not the same as a bearer, although it is something that might be similar. The scheduler at the MAC layer, then, will allocate RBs to each LCID.

In the current version of Simu5G, there is no difference between Conversational, Streaming, Interactive, and Background classes. Each flow just gets a different LCID and it is scheduled alongside the other ones.

dekaio commented 1 year ago

Thank you.
I understand from the source code that LCID parameter is assigned in PDCP and CC in MAC.
May I know the difference between LCID, CID and CC?
How is a CBR application data packet assigned to CC after it gets assigned a specific LCID and CID in PDCP?

giovanninardini commented 1 year ago

They are completely different concepts.

The LCID identifies a data flow in the NR protocol stack (one flow is defined as all the data that shares same IP source and destination addresses and port numbers). The CC is a set of frequencies that a gNB can allocate to users. See, e.g., https://www.3gpp.org/technologies/101-carrier-aggregation-explained

It is the gNB scheduler's responsibility to allocate RBs from one CC to each flow (i.e., to each LCID).

dekaio commented 1 year ago

Thank you very much for your reply.

I understand that MAC CID is a unique identifier <UE ID, LCID>.

What is the role of CID in identifying or scheduling a flow/LCID?

giovanninardini commented 1 year ago

The LCID is local to a UE. This means that multiple UEs may have flows with the same LCID. The CID is instead a global identifier for a flow and is unique in the network. Indeed, it is formed by concatenating the UE ID and the LCID

dekaio commented 1 year ago

I do not understand how multiple UEs may have flows with the same LCID.

LCID has the format <sourceAddr, destAddr, sourcePort, destPort>.

Since destAddr is unique to a UE, isn't LCID unique as well?

Thank you very much.

giovanninardini commented 1 year ago

LCID is just a sequential number, starting from 1 for each UE.

The <sourceAddr, destAddr, sourcePort, destPort> is only used for recognizing if that flow has an LCID assigned already or not.

dekaio commented 1 year ago

Ah, I see. Thank you for the clarification.