BPF List
 help / color / mirror / Atom feed
* [QUESTION] BPF_SK_SKB_STREAM_PARSER cannot observe strparser orig_offset?
@ 2026-05-11 14:49 Cristian Morales Vega (cmorve)
  2026-05-11 15:53 ` Jiayuan Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Cristian Morales Vega (cmorve) @ 2026-05-11 14:49 UTC (permalink / raw)
  To: bpf@vger.kernel.org

I am trying to use BPF_SK_SKB_STREAM_VERDICT in an old kernel (I don't have control over the version), so I need to also use BPF_SK_SKB_STREAM_PARSER. I though to just do "return skb->len;" in it, as a no-op, since I don't really have an use for the parser.

So far so good. But I can see that, from time to time, __strp_recv() receives a non-zero orig_offset as "first skb" (i.e. strp->skb_head is null). In such a case, I should not be returning skb->len but "skb->len - orig_offset" (i.e. orig_len), right? Otherwise I would enter

		extra = (ssize_t)(stm->accum_len + cand_len) -
			stm->strp.full_len;

		if (extra < 0) {
			/* Message not complete yet. */

But AFAICT BPF_SK_SKB_STREAM_PARSER doesn't have access to that offset. It seems it had it until e0dc3b93bd7bcff8c3813d1df43e0908499c7cf0 (which was backported), but not any more?

Is my understanding correct? If not, what am I missing? And, if yes, there is any solution?

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

end of thread, other threads:[~2026-05-12  2:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 14:49 [QUESTION] BPF_SK_SKB_STREAM_PARSER cannot observe strparser orig_offset? Cristian Morales Vega (cmorve)
2026-05-11 15:53 ` Jiayuan Chen
2026-05-11 16:18   ` Cristian Morales Vega (cmorve)
2026-05-12  2:05     ` Jiayuan Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox