mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
sdap: rename pdcp_entity to drb_id
In nr_sdap_rx_entity, the RX callback receives the DRB identity from PDCP (drb-Identity). Rename pdcp_entity to drb_id to be aligned with TS 37.324 terminology. Changes: - Rename the RX callback argument through the full SDAP RX surface: sdap_data_ind(), the rx_entity function pointer table, and nr_sdap_rx_entity(). Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
This commit is contained in:
@@ -162,7 +162,7 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p,
|
|||||||
rqi);
|
rqi);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size)
|
void sdap_data_ind(int drb_id, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size)
|
||||||
{
|
{
|
||||||
nr_sdap_entity_t *sdap_entity;
|
nr_sdap_entity_t *sdap_entity;
|
||||||
sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
||||||
@@ -172,13 +172,7 @@ void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sdap_entity->rx_entity(sdap_entity,
|
sdap_entity->rx_entity(sdap_entity, drb_id, is_gnb, pdusession_id, ue_id, buf, size);
|
||||||
pdcp_entity,
|
|
||||||
is_gnb,
|
|
||||||
pdusession_id,
|
|
||||||
ue_id,
|
|
||||||
buf,
|
|
||||||
size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *sdap_tun_read_thread(void *arg)
|
static void *sdap_tun_read_thread(void *arg)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p,
|
|||||||
* Uplink - gNB
|
* Uplink - gNB
|
||||||
* Downlink - nrUE
|
* Downlink - nrUE
|
||||||
*/
|
*/
|
||||||
void sdap_data_ind(int pdcp_entity, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size);
|
void sdap_data_ind(int drb_id, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size);
|
||||||
|
|
||||||
void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id, int pdu_session_id);
|
void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id, int pdu_session_id);
|
||||||
void create_ue_ip_if(const char *ipv4, const char *ipv6, int ue_id, int pdu_session_id, bool is_default);
|
void create_ue_ip_if(const char *ipv4, const char *ipv6, int ue_id, int pdu_session_id, bool is_default);
|
||||||
|
|||||||
@@ -214,18 +214,13 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
static void
|
||||||
int pdcp_entity,
|
nr_sdap_rx_entity(nr_sdap_entity_t *entity, int drb_id, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size)
|
||||||
int is_gnb,
|
|
||||||
int pdusession_id,
|
|
||||||
ue_id_t ue_id,
|
|
||||||
char *buf,
|
|
||||||
int size)
|
|
||||||
{
|
{
|
||||||
int qfi = -1;
|
int qfi = -1;
|
||||||
const qfi2drb_t *map = nr_sdap_drb_lookup(entity, pdcp_entity);
|
const qfi2drb_t *map = nr_sdap_drb_lookup(entity, drb_id);
|
||||||
if (!map) {
|
if (!map) {
|
||||||
LOG_W(SDAP, "Dropping RX payload: DRB %d has no qfi2drb_table entry (ue=%ld, pdu_session=%d)\n", pdcp_entity, ue_id, pdusession_id);
|
LOG_W(SDAP, "Dropping RX payload: DRB %d has no qfi2drb_table entry (ue=%ld, pdu_session=%d)\n", drb_id, ue_id, pdusession_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const int drb_role = map->entity_role;
|
const int drb_role = map->entity_role;
|
||||||
@@ -247,14 +242,14 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
|||||||
* TS 38.331: default DRB always has a UL SDAP header
|
* TS 38.331: default DRB always has a UL SDAP header
|
||||||
* Drop only when neither a stored rule nor default DRB applies to this QFI */
|
* Drop only when neither a stored rule nor default DRB applies to this QFI */
|
||||||
const qfi2drb_t *qfi_map = entity->qfi2drb_map(entity, qfi);
|
const qfi2drb_t *qfi_map = entity->qfi2drb_map(entity, qfi);
|
||||||
if (!qfi_map || qfi_map->drb_id != pdcp_entity) {
|
if (!qfi_map || qfi_map->drb_id != drb_id) {
|
||||||
LOG_W(SDAP,
|
LOG_W(SDAP,
|
||||||
"Dropping UL PDU: QFI=%d %s (ue=%ld, pdu_session=%d, receiving_drb=%d)\n",
|
"Dropping UL PDU: QFI=%d %s (ue=%ld, pdu_session=%d, receiving_drb=%d)\n",
|
||||||
qfi,
|
qfi,
|
||||||
!qfi_map ? "no rule/default DRB" : "wrong DRB",
|
!qfi_map ? "no rule/default DRB" : "wrong DRB",
|
||||||
ue_id,
|
ue_id,
|
||||||
pdusession_id,
|
pdusession_id,
|
||||||
pdcp_entity);
|
drb_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +332,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
|||||||
* the DRB according to the stored QoS flow to DRB mapping rule is configured by RRC
|
* the DRB according to the stored QoS flow to DRB mapping rule is configured by RRC
|
||||||
* with the presence of UL SDAP header
|
* with the presence of UL SDAP header
|
||||||
*/
|
*/
|
||||||
if (pdcp_entity != entity->qfi2drb_table[sdap_hdr->QFI].drb_id) {
|
if (drb_id != entity->qfi2drb_table[sdap_hdr->QFI].drb_id) {
|
||||||
nr_sdap_ul_hdr_t sdap_ctrl_pdu = entity->sdap_construct_ctrl_pdu(sdap_hdr->QFI);
|
nr_sdap_ul_hdr_t sdap_ctrl_pdu = entity->sdap_construct_ctrl_pdu(sdap_hdr->QFI);
|
||||||
int sdap_ctrl_pdu_drb = entity->sdap_map_ctrl_pdu(entity, SDAP_CTRL_PDU_MAP_RULE_DRB, sdap_hdr->QFI);
|
int sdap_ctrl_pdu_drb = entity->sdap_map_ctrl_pdu(entity, SDAP_CTRL_PDU_MAP_RULE_DRB, sdap_hdr->QFI);
|
||||||
entity->sdap_submit_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
entity->sdap_submit_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||||
@@ -348,7 +343,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
|||||||
* as the UL mapping rule. sdap-HeaderUL/DL are per DRB: copy the
|
* as the UL mapping rule. sdap-HeaderUL/DL are per DRB: copy the
|
||||||
* receiving DRB role onto the QFI row together with drb_id.
|
* receiving DRB role onto the QFI row together with drb_id.
|
||||||
*/
|
*/
|
||||||
entity->qfi2drb_table[sdap_hdr->QFI].drb_id = pdcp_entity;
|
entity->qfi2drb_table[sdap_hdr->QFI].drb_id = drb_id;
|
||||||
entity->qfi2drb_table[sdap_hdr->QFI].entity_role = drb_role;
|
entity->qfi2drb_table[sdap_hdr->QFI].entity_role = drb_role;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,13 +114,7 @@ typedef struct nr_sdap_entity_s {
|
|||||||
const uint8_t qfi,
|
const uint8_t qfi,
|
||||||
const bool rqi);
|
const bool rqi);
|
||||||
|
|
||||||
void (*rx_entity)(struct nr_sdap_entity_s *entity,
|
void (*rx_entity)(struct nr_sdap_entity_s *entity, int drb_id, int is_gnb, int pdusession_id, ue_id_t ue_id, char *buf, int size);
|
||||||
int pdcp_entity,
|
|
||||||
int is_gnb,
|
|
||||||
int pdusession_id,
|
|
||||||
ue_id_t ue_id,
|
|
||||||
char *buf,
|
|
||||||
int size);
|
|
||||||
|
|
||||||
/* List of entities */
|
/* List of entities */
|
||||||
struct nr_sdap_entity_s *next_entity;
|
struct nr_sdap_entity_s *next_entity;
|
||||||
|
|||||||
Reference in New Issue
Block a user