Skip to content
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

SCM_RIGHTS #146

Merged
merged 55 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
50b7a9b
tty: Switch to tty_ops instead of embedded function pointers
heatd Dec 3, 2024
5eed4ad
apic: Fix acpi LAPIC enumeration on certain systems
heatd Dec 4, 2024
0919987
efi: Fix memory map creation before SVAM
heatd Dec 4, 2024
68c5ef2
cred: Inherit saved uid and gid
heatd Dec 4, 2024
033a677
cred: Fix setgroups crashes when clearing it
heatd Dec 4, 2024
901d48b
nvme: Don't enable MSI
heatd Dec 4, 2024
efd96d0
pagealloc: WARN_ON order > MAX_ORDER
heatd Dec 4, 2024
a3b0c8c
rlimit: Allow lowering the maximum rlimit for unpriv users
heatd Dec 5, 2024
176d3fc
loopback: Stop softirqs from hogging the CPU
heatd Dec 5, 2024
c995cd9
tcp: Add new tcp stack
heatd Dec 7, 2024
2ff1f01
dev: Add dev_printk and bus_printk helpers
heatd Dec 7, 2024
3038880
pci: Add MSI-X support (and revamp irq allocation)
heatd Dec 7, 2024
feb5c29
nvme: Add MSI-X vector support
heatd Dec 7, 2024
2eb5316
irq: Call all IRQ handlers on irq
heatd Dec 7, 2024
b110f4d
cmdline: Remove debug printk
heatd Dec 7, 2024
e3b335c
bio: Fix error code when bio_bounce fails
heatd Dec 7, 2024
12b7878
vfs: Refactor file_ops out into other structs
heatd Dec 14, 2024
140975c
af_unix: Fix un_get_name
heatd Dec 14, 2024
e8387ce
sched: Add sched_getaffinity and sched_setaffinity
heatd Dec 14, 2024
0b3ba0b
signal: Bail if no signal is found on sigtimedwait wakeup
heatd Dec 14, 2024
77d0a6c
ext2: Keep going on getdirent when we find an unused entry
heatd Dec 14, 2024
0bfd167
utimensat: Fix UTIME_NOW
heatd Dec 14, 2024
3d472a9
reclaim: Remove erroneous DCHECK_PAGE on writeback
heatd Dec 14, 2024
ac08bca
tty: Various fixes and write_room support
heatd Dec 14, 2024
6461019
unix: Add SCM_RIGHTS support
heatd Jul 10, 2024
7569312
net_tests: SCM_RIGHTS tests
heatd Jul 10, 2024
4018866
dentry: Fix d_invalidate
heatd Dec 24, 2024
c6e5c3a
vfs: Change inode_operations->stat and ->link's prototypes
heatd Dec 24, 2024
c0867b3
clock: Add extern "C"
heatd Dec 24, 2024
32f9621
iovec_iter: Add extern "C"
heatd Dec 24, 2024
30ee5cc
d_path: Fix going up mounts when mounts are stacked
heatd Dec 24, 2024
ad91596
libfs: Add libfs_put_dots and put_dir definitions
heatd Dec 24, 2024
f21a7ff
sched: Fix sched_lock
heatd Jan 19, 2025
a2df429
madvise: Fix iteration when start != vma start
heatd Jan 21, 2025
6dc28b0
pid: Rework pids and pid management
heatd Jan 21, 2025
2573d2d
mm: Add active_mm and rework mm's
heatd Jan 21, 2025
28ff45c
unix: Fix SCM_RIGHTS fd passing
heatd Jan 21, 2025
b48dda6
namei: Set namedata.dirfd in path_openat
heatd Jan 21, 2025
3107407
futex: Handle FUTEX_WAITs page faulting
heatd Jan 21, 2025
a3d3fe8
tcp: Fix SACK option parsing
heatd Jan 21, 2025
307a77e
proc: Add procfs
heatd Jan 21, 2025
7b581f6
slab: Add /proc/slabinfo
heatd Jan 21, 2025
550b7eb
ci: Install xorriso
heatd Jan 21, 2025
5cca869
musl: Update musl submodule
heatd Jan 21, 2025
fe68dc0
inet: Fix getsockname and getpeername for inet sockets
heatd Jan 25, 2025
4307b5d
slab: Fix ASAN reports on direct map caches
heatd Jan 25, 2025
52ba4a7
ubsan: Make printks pr_err
heatd Jan 25, 2025
ad87218
vector: Dont call ilog2 when size = 0
heatd Jan 25, 2025
a5486b2
tcp: Add sndbuf accounting
heatd Jan 25, 2025
c4b50d9
tcp: Add receive buffer accounting
heatd Jan 27, 2025
a883bd8
github: Install gn from apt
heatd Jan 27, 2025
ae2c219
tcp: Fix initial window handling when listening
heatd Jan 27, 2025
19a6caa
tcp: Fix send window checks
heatd Jan 28, 2025
4098752
tcp: Fix snd_next adjustments
heatd Jan 29, 2025
6838c3a
tcp: Add SIGPIPE on sendmsg for a broken connection
heatd Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
loopback: Stop softirqs from hogging the CPU
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
heatd committed Jan 31, 2025
commit 176d3fcbf566f03edbdcdfc63a3a301a43cc2f56
19 changes: 6 additions & 13 deletions kernel/kernel/net/loopback.cpp
Original file line number Diff line number Diff line change
@@ -58,26 +58,19 @@ int loopback_send_packet(packetbuf *buf, netif *nif)
int loopback_pollrx(netif *nif)
{
// We need to hold the lock around list accesses (pqueue).
DEFINE_LIST(queue);
spin_lock(&pqueue_lock);
while (!list_is_empty(&pqueue))
list_splice_tail_init(&pqueue, &queue);
spin_unlock(&pqueue_lock);

while (!list_is_empty(&queue))
{
auto pbuf = container_of(list_first_element(&pqueue), packetbuf, list_node);
auto pbuf = container_of(list_first_element(&queue), packetbuf, list_node);
list_remove(&pbuf->list_node);

// Unlock. process_pbuf may want to send buffers, which may want to lock pqueue, so we must
// drop this lock while calling netif_process_pbuf.

spin_unlock(&pqueue_lock);

netif_process_pbuf(nif, pbuf);
pbuf->unref();

// Relock for the next run.
spin_lock(&pqueue_lock);
}

spin_unlock(&pqueue_lock);

return 0;
}