[PATCHES] Fix PPP in libbsd and optimize ATSAM console
Christian Mauderer
christian.mauderer at embedded-brains.de
Thu Aug 12 11:41:31 UTC 2021
Hello,
this set of patches fixes PPP. Basically the current implementation in
libbsd can't work with console drivers that can't buffer a lot of
characters. The pppstart() function just assumes that the low level
console write can send an arbitrary number of characters without
checking how many characters are actually send.
In the extreme case of the ATSAM interfaces (only one character can be
send at once) it's not even possible to establish a PPP connection with
that. For UARTS that have some FIFO establishing might work but bigger
packets won't go through. I opened tickets for 6 and 5 here:
https://devel.rtems.org/ticket/4493
https://devel.rtems.org/ticket/4494
I would like to apply the patches to both branches (5 and 6).
The solution I implemented in this patch set is the following: PPP
output processing is done in the line discipline function l_start (or
rather the function where l_start points to: pppstart). Our device
writes don't return how many characters have been sent. Instead, that
feedback is given via rtems_termios_dequeue(). Luckily that's the
function that calls the l_start function.
The RTEMS patch for termios extends the l_start function so that it gets
the number of characters as a second argument. This extension shouldn't
be a problem for existing code. In the worst case it will trigger a
warning that the function doesn't match the pointer type. But in the
linked code, that additional argument will just be ignored.
The libbsd patch extends the pppstart function so that it then handles
that new information.
Patches belonging to this set:
* [PATCH rtems 1/2] bsps/atsam: Improve UART / USART tx performance
* [PATCH rtems 2/2] termios: Pass number of sent chars to l_start
* [PATCH rtems-libbsd] ppp: Fix transmitting data
Best regards
Christian
More information about the devel
mailing list