From: Cong Wang <xiyou.wangcong@gmail.com>
To: His Shadow <shadowpilot34@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: eBPF sockhash datastructure and stream_parser/stream_verdict programs
Date: Mon, 3 Jan 2022 16:44:54 -0800 [thread overview]
Message-ID: <YdOYhsVwGu1p/SSu@pop-os.localdomain> (raw)
In-Reply-To: <CAK7W0xe9VVbyVykzTK8X8ieg4UgRJEtrvEyKgLjBO+iVFV41+A@mail.gmail.com>
Hi, His
On Mon, Jan 03, 2022 at 03:53:12PM +0300, His Shadow wrote:
> Greeetings. Here's the problem. I've written a simple program, that,
> when a connection is established, it establishes a connection to a
> predetermined target and starts routing traffic between a user
> connection and a new connection.
> I've tried to use ebpf stream_parser/verdict programs for this,
> however there's a problem: when a connection to my program is
> established, client sends the data immediately, however there's a
> delay, while I establish a connection to the target. So stream_verdict
> never gets called, because the data is already in the socket receive
> queue(or maybe I'm misunderstanding something). Is there a way around
> this? Should I use something else, like skb_msg verdict?
Are you saying the packets arrived before you put the socket
into the sockmap? If so, you can consider
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB.
Hope this helps.
Thanks.
next prev parent reply other threads:[~2022-01-04 0:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 12:53 eBPF sockhash datastructure and stream_parser/stream_verdict programs His Shadow
2022-01-04 0:44 ` Cong Wang [this message]
[not found] ` <CAK7W0xezGaA1TZcsxkt_hf+b0LU+396CmetejFBEXjqtvbmDkA@mail.gmail.com>
2022-01-04 10:24 ` Fwd: " His Shadow
2022-01-04 21:09 ` John Fastabend
2022-01-06 7:47 ` His Shadow
2022-01-10 16:20 ` His Shadow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YdOYhsVwGu1p/SSu@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=shadowpilot34@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox