hack: try to avoid "buffer full" problem when pushing DL traffic

This is hack-level development.

With this commit you can do UDP DL traffic of say 100Mb/s over
a 5MHz link with one connected UE and the eNB should not crash
because of memory exhaustion. Of course on the receiver side
you won't get 100Mb/s and many many lost packets. But the system
should not crash. 1Gb/s does not work. So in any case try to
remain within some reasonable limits. There is no reason to
push more than twice the maximum achievable throughput of
the link.

This work is based on a patch proposed by Francesco Gringoli.
This commit is contained in:
Cedric Roux
2018-03-09 10:18:12 +01:00
parent 963805820c
commit 71e7f9713a
4 changed files with 130 additions and 1 deletions
+12 -1
View File
@@ -270,10 +270,21 @@ void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP)
n, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
#endif
if (itti_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) {
/* TODO: this is a hack. Let's accept failures and do nothing when
* it happens. Since itti_send_msg_to_task crashes when the message
* queue is full we wrote itti_try_send_msg_to_task that returns -1
* if the queue is full.
*/
/* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */
//if (itti_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) {
if (itti_try_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) {
#if 0
LOG_I(UDP_, "Failed to send message %d to task %d\n",
UDP_DATA_IND,
udp_sock_pP->task_id);
#endif
itti_free(TASK_UDP, message_p);
itti_free(TASK_UDP, forwarded_buffer);
return;
}
}