-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
network drivers create directly TxToken / RxToken for smoltcp
For this purpose, it was necessary to avoid the creation of dynamic objects of the driver. This means that during compilation it must be defined which network interface is used. If the feature `rtl8139` is activated, the driver for Realtek 8139 will be used. Otherwise the Virtio network interface will be used. using a exponential backoff to check the network device if exponential backoff has completed, the task will be blocked and waits for an network interrupt poll device before the device checks the future remove obsolete code network drivers create directly TxToken / RxToken for smoltcp For this purpose, it was necessary to avoid the creation of dynamic objects of the driver. This means that during compilation it must be defined which network interface is used. If the feature `rtl8139` is activated, the driver for Realtek 8139 will be used. Otherwise the Virtio network interface will be used. build Virtio network driver only if the feature `tcp` is set feature `tcp` must be activated to support any network interface remove compiler warnings remove compiler warnings remove compiler warnings use polling mode for read / write operations on a socket idle task enables network interrupt, while the read function disable it enable network interrupts, if a socket is blocking add missing import check device driver only, if the device is available remove compiler warnings add mmio support add dummy network interface for aarch64 add missing file for mmio support add check if the feature tcp is available revert block_on to the original version revise CI workflow to support the feature rtl8139
- Loading branch information
Showing
28 changed files
with
298 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
use hermit_sync::InterruptTicketMutex; | ||
|
||
use crate::drivers::net::NetworkInterface; | ||
use crate::drivers::net::virtio_net::VirtioNetDriver; | ||
|
||
pub fn get_network_driver() -> Option<&'static InterruptTicketMutex<dyn NetworkInterface>> { | ||
pub(crate) fn get_network_driver() -> Option<&'static InterruptTicketMutex<VirtioNetDriver>> { | ||
None | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[cfg(feature = "tcp")] | ||
pub(crate) use crate::arch::kernel::mmio::get_network_driver; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.