From: "Valentín Gutierrez" <vgutierrez@wikimedia.org>
To: xdp-newbies@vger.kernel.org
Subject: MSS clamping with XDP/eBPF
Date: Mon, 6 Nov 2023 10:57:22 +0100 [thread overview]
Message-ID: <CALQkE9a0VWPZs3cXmWCyd4TWp2uDzghfhd8-VAAAb2Gtc-5CgA@mail.gmail.com> (raw)
Hi,
I'm trying to perform some basic TCP MSS clamping with eBPF and it's
being harder than expected:
* Parsing TCP options can be challenging for the eBPF verifier as it's
been shown in [1] by Christian Deacon.
* bpf_store_hdr_opt() introduced in [2] doesn't seem to be useful here
cause it refuses to overwrite an existing TCP option and MSS is
already set when BPF_SOCK_OPS_WRITE_HDR_OPT_CB is triggered.
* bpf_setsockopt() isn't able to set TCP_MAXSEG per [3].
Am I missing something?
Thanks,
Valentin Gutierrez
[1] https://github.com/gamemann/XDP-TCP-Header-Options/
[2] https://lore.kernel.org/bpf/20200730205748.3354954-1-kafai@fb.com/T/
[3] https://github.com/torvalds/linux/blob/d2f51b3516dade79269ff45eae2a7668ae711b25/net/core/filter.c#L5151
next reply other threads:[~2023-11-06 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 9:57 Valentín Gutierrez [this message]
2023-11-07 11:02 ` MSS clamping with XDP/eBPF Valentín Gutierrez
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=CALQkE9a0VWPZs3cXmWCyd4TWp2uDzghfhd8-VAAAb2Gtc-5CgA@mail.gmail.com \
--to=vgutierrez@wikimedia.org \
--cc=xdp-newbies@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).