-
Notifications
You must be signed in to change notification settings - Fork 21
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
porting lwip #123
porting lwip #123
Conversation
Makefile
Outdated
else ifeq ($(ARCH), aarch64) | ||
ACCEL ?= n | ||
PLATFORM_NAME ?= aarch64-qemu-virt | ||
TARGET := aarch64-unknown-none-softfloat | ||
TARGET_CFLAGS := -mgeneral-regs-only |
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.
This flag should be reconsidered.
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.
This flag is not correct. If this flag is enabled, the compiler will only be allowed to use general registers, which prevents the access to float registers or SIMD registers.
Makefile
Outdated
else ifeq ($(ARCH), aarch64) | ||
ACCEL ?= n | ||
PLATFORM_NAME ?= aarch64-qemu-virt | ||
TARGET := aarch64-unknown-none-softfloat | ||
TARGET_CFLAGS := -mgeneral-regs-only |
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.
This flag is not correct. If this flag is enabled, the compiler will only be allowed to use general registers, which prevents the access to float registers or SIMD registers.
api/ruxos_posix_api/src/imp/net.rs
Outdated
@@ -123,14 +123,14 @@ impl Socket { | |||
fn shutdown(&self) -> LinuxResult { | |||
match self { | |||
Socket::Udp(udpsocket) => { | |||
let udpsocket = udpsocket.lock(); | |||
let mut udpsocket = udpsocket.lock(); |
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.
why mut?
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.
Becuase in modules/axnet/src/lwip_impl/udp.rs
line 306 self.pcb.0 = null_mut();
, it directly changes self.pcb.0, so param self
of fn shutdown
must be mut. Now I will add mutex on self.pcb so it can chenge without mut and replace it by self.pcb.set()
use core::net::{IpAddr, Ipv4Addr, SocketAddr}; | ||
use driver_9p::_9pDriverOps; | ||
use driver_common::{BaseDriverOps, DeviceType}; | ||
use log::*; | ||
|
||
pub struct Net9pDev { | ||
socket: TcpSocket, | ||
socket: Mutex<TcpSocket>, |
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.
Why should this be wrapped with Mutex
.
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.
Because lwip TcpSocket has member converted from c , so it cannot be shared between threads safely
9443d05
to
ef35a96
Compare
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.
x86_64 and riscv64 should check fp_simd
feature as well.
index.html
Outdated
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.
remove this?
index.html.1
Outdated
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.
remove this.
change license and rollback smoltcp version rewrite lwip addr Ipv4Addr rewrite lwip addr Ipv4Addr delete index
No description provided.