-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kernel] High speed serial driver and slip networking fixes #664
Conversation
CSLIP still not working well, generates bad TCP checksums. Use SLIP. Rewrite ktcp start options for ease of operation and testing:
Set default MTU to 1024 to match serial ring buffer size |
Again, thanks @ghaerr -
So many small (and big) pieces/fixes that not only improve useability, but ease debugging (such as command line MTU & kill -HUP).
The PR crashes with some of my ne2k-work, that's manageable.
…--M
1. jul. 2020 kl. 03:47 skrev Gregory Haerr ***@***.***>:
CSLIP still not working well, generates bad TCP checksums. Use SLIP.
Rewrite ktcp start options for ease of operation and testing:
Add ktcp -p [slip|cslip|eth]
Add ktcp -l device (default /dev/ttyS0 @ 57600 baud)
Add ktcp -m MTU
Usage: ktcp [-b] [-d] [-p eth|slip|cslip] [-m mtu] [-s baud] [-l device] [localip] [interface] [gateway] [netmask]
Examples:
ktcp -p slip -s 19200 -l /dev/ttyS1
ktcp -b -p cslip (starts cslip in background)
ktcp -b (starts ethernet in background)
ktcp -p slip -m 512 (sets MTU)
Preferably use "net start" command documented above.
Set default MTU to 1024 to match serial ring buffer size
Ignore menuconfig CONFIG_CSLIP option, CSLIP always compiled in, set with "ktcp -p cslip" or "net start cslip"
Exit ktcp on SIGHUP or SIGINT (for coming "net stop")
Can restart ktcp without reboot after kill -1 PID
Repair miniterm from first commit
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Just quick observation before I started testing it:
the
|
|
Hello @pawosm-arm, You have a keen eye, I added the -m MTU option without testing it, and forgot the getopt() parameters for it. Did you fix the -m MTU prior to your testing? Without it, it is possible your Linux box was sending packets larger than 1024, which would overrun the ring buffer and cause checksum errors. Thank you! |
Fixes all outstanding serial port speed and reliability issues, including #454, #515, and some issues brought up in #539.
Fixes and improvements made to SLIP networking now allow speeds up to 115200 baud between Linux and ELKS.
Adds "net start" script for starting networking on SLIP and ethernet.
Adds "slattach.sh" script to setup SLIP to ELKS link.
Tested on Compaq 386 Portable with working miniterm and SLIP up to 57600 baud.
ktcp
networking now working quickly with telnet in both direction simultaneously over serial but many networking problems remain.Details:
Fix serial receive ring buffer corruption bug due to no cli/sti protection on serial received characters.
Wrote fast optional asm com1/com2 interrupt driver; runs without any ELKS interrupt stack and processing overhead, uses timer interrupt for process wakeup.
Set via CONFIG_FAST_IRQ4 (default) and CONFIG_FAST_IRQ3 in include/arch/ports.h. No ISIG tty line signal handling, for use in CSLIP/SLIP networking or very fast terminal emulation access. Original serial port driver now runs well up to 19200 baud.
Speed up serial transmit to use transmitter holding buffer empty rather than transmitter empty.
Fix serial receiver buffer size not a power-of-two bug which lost characters.
Remove inb_p/outb_p 1us pause after all serial I/O, move to INB/OUTB macros.
Add SLIP packet write buffering for speed.
Fix SLIP packet overflow bug.
Fix ktcp deveth_process perror message bug.
Fix miniterm ^C exit son slip/hex dump mode, dump mode still broken.
Testing SLIP now, CSLIP coming.
Change NE2K driver non-probe to compilation printk
Add "net start" script for starting (and eventually stopping) networking. Exists as shell script in /bin/net. Add "net start" to /etc/rc.d/rc.sys for network startup at boot.
Default no network startup at boot for time being.
Default single user mode (init 1) for now (init 3 for serial gettys)