From b003f3749081b3c8d214a5589512a14592adbf1c Mon Sep 17 00:00:00 2001 From: Melissa Elkadi Date: Thu, 2 Sep 2021 10:13:44 -0700 Subject: [PATCH] Comment for removed first byte before write to TUN --- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 081bc30d39..1378551cb9 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -454,10 +454,11 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, if (IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN) { LOG_D(PDCP, "IP packet received, to be sent to TUN interface"); - /* We are removing the instance ID from the buffer. TUN interfaces - care about the actual data we are sending. If we do not remove - the instance ID from the buffer, it will start with 00, and the - write will fail with errno = 22 (EINVAL) */ + /* In 5G there is a new layer called SDAP which adds one byte + to the PDU data. TUN interfaces care about the actual data + we are sending. If we do not remove the instance ID from + the buffer, it will start with 00, and the write will fail + with errno = 22 (EINVAL) */ char *data_buffer = buf + 1; int size_to_write = size - 1;