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

add epoll read #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add epoll read #11

wants to merge 3 commits into from

Conversation

fswang9659
Copy link

@fswang9659 fswang9659 commented Jul 22, 2022

#6 answer may still go wrong when two or more viface read and pcap capture simultaneously. this patch can solve read problem perfectly

@dajose dajose requested a review from carlos-jenkins July 22, 2022 14:41
@madscientist42
Copy link

madscientist42 commented Nov 19, 2024

Necroing this- but with the immediate return of an EMPTY on the call if it would block...what use is epoll-ing this?

I mean...it only has any value if you're...you know...BLOCKING on the call there. You kind of needed to do Socket type semantics there in this code...because it's the far end of a network stack driver.

@fswang9659
Copy link
Author

fswang9659 commented Nov 20, 2024

My test env is, I have created multiple vfiaces, and foreach vifaces, and I want to receive packet if pkt comes from any viface.
so I need a non bolck way to read viface,or I cannot recv from viface,even if anther vfiace has received packet on tun.
Another issue is,as we already know, both two queues on one viface can rx and tx pkt,tx queue is not fixed, depends on selectted by tun driver,I want to epoll two queues on one viface and recv pkt from correct queue.
FYI

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