netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question about BPF sk_skb_stream_verdict redirect and poll/epoll events
@ 2023-09-22 17:32 Farbod Shahinfar
  2023-09-23  9:36 ` Ferenc Fejes
  0 siblings, 1 reply; 3+ messages in thread
From: Farbod Shahinfar @ 2023-09-22 17:32 UTC (permalink / raw)
  To: john.fastabend, netdev

Hello,

I am doing a simple experiment in which I send a message to a TCP server 
and the server echoes the message. I am attaching a BPF sk_skb 
stream_verdict program to the server socket to redirect the message back 
to the client (redirects the SKB on the same socket but to the TX 
queue). In my test, I noticed that the user-space server, which is using 
the poll system call, is woken up, and when it reads the socket, 
receives zero as the number of bytes read.

I first want to ask if this is the intended behavior.
In case this is the intended behavior, my second question is, what 
should I do to prevent the user program from waking up? I hope by not 
waking up the user program I could better use the available resources.

Sincerely,
Farbod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-25 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-22 17:32 question about BPF sk_skb_stream_verdict redirect and poll/epoll events Farbod Shahinfar
2023-09-23  9:36 ` Ferenc Fejes
2023-09-25 18:24   ` John Fastabend

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).