Skip to content

Make pcapgo EthernetHandle use runtime poller#911

Open
WGH- wants to merge 1 commit intogoogle:masterfrom
WGH-:pcapgo-runtime-poller
Open

Make pcapgo EthernetHandle use runtime poller#911
WGH- wants to merge 1 commit intogoogle:masterfrom
WGH-:pcapgo-runtime-poller

Conversation

@WGH-
Copy link
Contributor

@WGH- WGH- commented Sep 25, 2021

As of now, the EthernetHandle fd is kept in the blocking mode. Which means when capturing traffic, entire OS thread is blocked in recvmsg syscall most of the time.

It's possible to use custom fds (i.e. not created by net package) with the runtime poller, so using them will be as efficient as it is with e.g. TCP sockets.

This PR does exactly that.

As of now, the EthernetHandle fd is kept in the blocking mode.
Which means when capturing traffic, entire OS thread is blocked in
recvmsg syscall most of the time.

It's possible to use custom fds (i.e. not created by net package)
with the runtime poller, so using them will be as efficient
as it is with e.g. TCP sockets.

This commit does exactly that.
@WGH- WGH- force-pushed the pcapgo-runtime-poller branch from 9fb6d85 to 03f63b0 Compare September 25, 2021 19:55
@prskr prskr mentioned this pull request May 21, 2022
@mosajjal
Copy link

hey mate. I'm happy to merge this into the gopacket/gopacket fork. feel free to raise a PR over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants