-
Notifications
You must be signed in to change notification settings - Fork 69
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
nvnetdrv v2 part 1 #686
nvnetdrv v2 part 1 #686
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only managed to go through up to and including nvnetdrv: Soft error if framing error only
and left some feedback.
When that is merge-able I'll probably split that off into a separate PR to make this a bit easier to review.
Ive renamed this to part one and dropped the other commits. Will raised another when merged and rebase the other commits |
lib/net/nvnetdrv/nvnetdrv.c
Outdated
static struct descriptor_t *g_rxRing; | ||
static struct descriptor_t *g_txRing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I don't think we can drop the volatile
here as the hw modifies the flags
member. Interestingly this change tests fine even with LTO, probably because nvnetdrv_handle_rx_irq
copies the address into a proper volatile pointer.
Imho the initialization of these should be changed, too, as it's currently casting to a non-volatile pointer, if you want to squeeze that into one of the commits in this PR:
// Setup the TX and RX ring descriptor pointers
g_rxRing = (struct descriptor_t *)descriptors;
g_txRing = (struct descriptor_t *)descriptors + RX_RING_SIZE;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yep gotcha, fixed thanks
Looks good to me, merging |
This is a culmination of work over ~12 months or so.
With nvnetdrv being used in StellarOS, it has seen many hundreds/thousands of people using it through the online updater and FTP server and a few edges cases started arising.
As part of the debugging effort in collaboration with LoveMhz/StellarOS developers, a significant amount of refactoring and optimizations were done.
This has turned into a reasonably big PR (sorry!) so I'm calling it version 2, however the primary changes are
Hopefully I have broken up the commits into logical units.
My stress test involved 8 x parallel iperf connections, 10 parallel FTP connections (with hash check of files after), web server and sntp client at the same time.