Commit Graph

152 Commits

Author SHA1 Message Date
Jianfeng Jiang 667d29f751 Avoid immediate ephemeral port reuse 2026-06-01 14:23:51 +08:00
Ruihan Li ef1fff3b7c Bind to TCP and UDP ports separately 2026-06-01 10:13:14 +08:00
Ruihan Li 9f39515eb5 Fix large UDP `send()` 2026-06-01 10:13:14 +08:00
Ruihan Li 4e6c941532 Strongly type `NormalizedAddress` 2026-06-01 10:13:14 +08:00
Ruihan Li 4535691a70 Adjust comments and visibility 2026-06-01 10:13:14 +08:00
li041 7712a2c114 Add FUSE protocol definitions 2026-05-27 06:39:55 -07:00
yyda 0557ff9801 Add IPv6 support to network interfaces
Extend the bigtcp network stack to handle IPv6 packets alongside
existing IPv4 support. Key changes include:

- Add IpPacket enum to represent either an IPv4 or IPv6 packet
- Extend IfaceCommon with IPv6 address query and per-address port tracking
- Update phy layer: EtherIface dispatches IPv6 packets, IpIface processes them
- Extend BoundPort to track bound IP address for proper dual-stack lookup
- Update SocketTable to store sockets keyed by full IpEndpoint
- Add smolrtc dependency for IPv6 wire-format support

Currently, outbound IPv6 packets on EtherIface are dropped with a FIXME
until neighbor discovery is implemented.
2026-05-22 01:31:02 -07:00
Ruihan Li acb00a241d Remove explicit `unsafe_op_in_unsafe_fn` 2026-05-17 18:37:38 -07:00
zjp 19ecc2f32a Fix unused_qualifications warnings 2026-05-15 08:46:30 -07:00
zjp f82e212a0e Replace core::result::Result by Result 2026-05-15 07:45:16 -07:00
zjp b617d39df5 Fix redundant_imports warnings 2026-05-15 07:45:16 -07:00
zjp d829094187 Declare prelude Result using default type parameter E 2026-05-15 07:45:16 -07:00
Ruihan Li c4da9d2829 Rename `io_util` to `io-util` 2026-05-14 20:10:58 -07:00
Chen Chengjun 6c3c3ccabf Introduce IoBatch to unify the wait handling for asynchronous I/O 2026-05-13 05:31:32 -07:00
zjp 9c252cc3e2 Remove unused features 2026-05-07 19:36:44 -07:00
Tao Su 7f89654003 Handle wrapped TCP stream I/O with partial iovec copy reporting 2026-04-30 19:18:51 +08:00
Ruihan Li eddadebf69 Add spaces in log messages after `:` 2026-04-27 23:31:48 -07:00
TankTechnology 92ebbcbe10 Extract ring-buffer into standalone crate 2026-04-27 20:59:19 -07:00
jiangjianfeng 72e395b5f1 Bump libflate to 2.3.0 and replace core2 2026-04-15 05:13:42 -07:00
Tate, Hongliang Tian 082965f881 Replace the log crate with OSTD's own logging API 2026-04-08 02:02:48 -07:00
Tate, Hongliang Tian 969be51afc Enforce `alphabetical-attrs` guideline across the codebase
Sort all non-derive outer attributes alphabetically by name,
place `#[derive(...)]` last (before any derive helper attributes
like `#[serde(...)]` and `#[clap(...)]`), and sort traits inside
`#[derive(...)]` alphabetically. This covers 329 files with 704
line changes (all pure reordering, no semantic changes).

Key patterns normalized:
- `#[cfg(...)]` comes first (c), then other attrs alphabetically
- `#[repr(...)]` stays before `#[derive(...)]` (derive is always last)
- `#[padding_struct]` and `#[pod_union]` precede `#[derive(...)]`
- Derive helper attrs like `#[serde(...)]` remain after `#[derive(...)]`
- Derive traits like `Debug, Clone, Copy` become `Clone, Copy, Debug`
- The common set `{Debug, Clone, Copy, Pod, Default}` (59 uses,
  12 prior orderings) is now uniformly `Clone, Copy, Debug, Default, Pod`
2026-04-08 01:08:41 -07:00
Hsy-Intel 1d3a8e5418 Replace the use of `read_volatile` and `write_volatile` with assembly code 2026-04-02 22:17:15 -07:00
Ruihan Li 8dd86fc01a Revise `comps/cmdline` code 2026-03-17 21:32:54 -07:00
Tao Su cc037f09d6 Define and parse kernel command-line parameters 2026-03-17 17:09:44 -07:00
Tate, Hongliang Tian e4bcaabb39 Add `Memcpy`/`Memset` trait framework for typed memory copies
Introduce `Memcpy` and `Memset` traits that generalize the classic C
`memcpy` and `memset` for typed memory categories (`KernelMem`,
`UserMem`). The compiler resolves the correct implementation at
monomorphization time, making it straightforward to add new memory
categories (e.g., `IoMem` for TDX-aware I/O memory in #2958) without
a combinatorial explosion of function names.

Replace the four ad-hoc private functions (`memcpy`, `memcpy_fallible`,
`memset`, `memset_fallible`) in `mm/io/mod.rs` with trait-dispatched
free functions `memcpy::<Dst, Src>()` and `memset::<Dst>()`, and
update all call sites including `io_util` imports across the kernel
crate.
2026-03-17 02:46:32 -07:00
Chaoqun Zheng 56c8176874 Refactor `Metadata`'s fields and fix some issues of `container_dev_id` 2026-03-12 03:08:11 -07:00
Ruihan Li 4c09e07695 Fix `cap{get,set}` syscall behavior 2026-02-27 18:51:09 +08:00
Ruihan Li c9032ad97c Fix `redundant_test_prefix` 2026-02-09 23:47:49 -08:00
jiangjianfeng 4a80f0e5eb Replace Pod with zerocopy-backed Pod 2026-02-08 20:32:24 -08:00
Ruihan Li 413f459e20 Find present pages in xarray 2026-01-07 10:31:57 +08:00
jiangjianfeng 6f54cc56e7 Move int-to-c-enum from kernel/libs to ostd/libs 2026-01-04 10:51:36 -08:00
jiangjianfeng 01cac4268e Manage dependencies at workspace level 2026-01-04 10:51:36 -08:00
jiangjianfeng 34ab63addb Manage package metadata at workspace level 2026-01-04 10:51:36 -08:00
jiangjianfeng 6eb6968716 Fix broken documentation link 2026-01-04 10:47:18 +08:00
jiangjianfeng bc230b24e1 Fix doc warnings 2026-01-02 11:26:43 -08:00
Zhang Junyang 71681dd947 Refactor DMA APIs 2025-12-31 19:40:11 -08:00
Zhang Junyang c7a2c81366 Miscellaneous clippy fixes for Rust 2024 2025-12-09 09:23:58 +08:00
Zhang Junyang 69327eee8d Upgrade to Rust 2024 2025-12-09 09:23:58 +08:00
Zhang Junyang 6d2679852f Fix `if let` chains that can be collapsed 2025-12-09 09:23:58 +08:00
Zhang Junyang fc9f47a019 Fix manual implementations of `.is_multiple_of()` 2025-12-09 09:23:58 +08:00
Zhang Junyang 559ce94aba Fix elided lifetimes in return values 2025-12-09 09:23:58 +08:00
Zhang Junyang dd410444e5 Format with new `rustfmt` 2025-12-09 09:23:58 +08:00
Ruihan Li 4e76ed5fea Migrate to new ioctl infrastructure 2025-12-07 12:01:05 +08:00
jiangjianfeng 9ad7c1855e Check device id in DeviceId::from_encoded_64 2025-12-04 20:55:01 +08:00
jiangjianfeng 188b20eb99 Support SO_BROADCAST for UDP sockets 2025-11-28 10:34:26 +08:00
Qingsong Chen 9e2f5adf9b Add partition support for block device 2025-11-20 10:43:24 +08:00
Qingsong Chen d954e3d006 Move ranged integer to aster-util crate 2025-11-20 10:43:24 +08:00
Qingsong Chen bb48b3814f Move DeviceId to separate device-id crate 2025-11-13 11:04:30 +08:00
Chen Chengjun 2b18c893a8 Implement fixed_point module to replace the usage of fixed crate 2025-10-13 12:34:01 +08:00
Yang Zhichao f869ed508f Move `PerCpuCounter` to `aster-util` to broaden its scope of use,
and add/modify some methods to improve readability.
2025-09-27 21:02:23 +08:00