Files
openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_rx_manager.h
T
Cedric Roux c70e336011 nr rlc: speedup RX path of RLC AM
rx_list is replaced by an array of size 2^(SN size - 1)
which is 131072 for an SN size of 18 bits, leading to
1048576 bytes of memory used. (Less for smaller SN sizes.)

A lot of RX processing was to run through rx_list. When the list was
big (with some non-ideal channel), it can take some time. Removing this
list should improve things. Checking with benchmark_nr_rlc_am_entity
a speedup of more thant x10 is achieved (except for the case 1024 which
is surprisingly faster than the others in the develop branch).

The only thing that may be slower is when looking for cur->next where
the SN is different, in which case we need to look for all SN one by
one until we find something or reach the limit (rx_highest_status).
These are the functions get_first_rx_pdu() and get_next_rx_pdu().
2025-07-03 18:57:32 +02:00

50 lines
2.0 KiB
C

/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _NR_RLC_RX_MANAGER_H_
#define _NR_RLC_RX_MANAGER_H_
#include "nr_rlc_pdu.h"
typedef struct {
/* 'rx_list' is managed as a circular buffer
* starts at rx_list[start] where is stored 'sn_start'
* for an RLC entity with an SN of n bits, its size is 2^(n-1)
* corresponding the the window size
*/
nr_rlc_pdu_t **rx_list;
int size;
int start;
int sn_start;
} nr_rlc_rx_manager_t;
nr_rlc_rx_manager_t *nr_rlc_new_rx_manager(int size);
void nr_rlc_free_rx_manager(nr_rlc_rx_manager_t *m);
void nr_rlc_clear_rx_manager(nr_rlc_rx_manager_t *m);
nr_rlc_pdu_t *nr_rlc_rx_manager_get_pdu_from_sn(nr_rlc_rx_manager_t *m, int sn);
void nr_rlc_rx_manager_clear_pdu(nr_rlc_rx_manager_t *m, int sn);
void nr_rlc_rx_manager_advance(nr_rlc_rx_manager_t *m, int count);
void nr_rlc_rx_manager_set_start(nr_rlc_rx_manager_t *m, int sn_start);
void nr_rlc_rx_manager_add_pdu(nr_rlc_rx_manager_t *m, nr_rlc_pdu_t *pdu);
#endif /* _NR_RLC_RX_MANAGER_H_ */