• Cedric Roux's avatar
    attempt at synchronous PDCP RRC communication in the nr UE · d0a4dde9
    Cedric Roux authored
    When the UE receives several PDCP packets in one MAC PDU, if the
    first is SecurityModeCommand, the following will be ciphered/integrity
    protected. The RRC has to process SecurityModeCommand before PDCP
    processes the following packets. Before this commit, PDCP will
    not wait for RRC to finish and process the following messages, which
    won't make any sense since they are ciphered but ciphering is not
    configured yet.
    
    So let's introduce some synchronous commmunication between PDCP
    and RRC for SRBs in the UE. PDCP sends the data to RRC and waits
    for a return message from RRC to continue its job.
    
    The code is not super satisfying. nr_pdcp_entity_recv_pdu() may queue
    the message and not send it to RRC immediately, so do_pdcp_data_ind()
    may wait for a long time and maybe forever, I did  not analyze things
    properly here. (The queuing is easy to detect, we could AssertFatal()
    if that happens. Then find a proper solution if the case happens for
    real and turns out being super annoying.)
    
    Just an attempt, let's see.
    d0a4dde9
rrc_UE.c 97.4 KB