BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/2] bpf: Add kfunc bpf_strncasecmp()
@ 2026-01-20  7:03 Yuzuki Ishiyama
  2026-01-20  7:03 ` [PATCH bpf-next v3 1/2] bpf: add bpf_strncasecmp kfunc Yuzuki Ishiyama
  2026-01-20  7:03 ` [PATCH bpf-next v3 2/2] selftests/bpf: Test kfunc bpf_strncasecmp Yuzuki Ishiyama
  0 siblings, 2 replies; 9+ messages in thread
From: Yuzuki Ishiyama @ 2026-01-20  7:03 UTC (permalink / raw)
  To: bpf
  Cc: mykyta.yatsenko5, vmalik, andrii, ast, daniel, martin.lau,
	Yuzuki Ishiyama

This patchset introduces bpf_strncasecmp to allow case-insensitive and
limited-length string comparison. This is useful for parsing protocol
headers like HTTP.

---

Changes in v3:
- Use ternary operator to maintain style consistency
- Reverted unnecessary doc comment about XATTR_SIZE_MAX

Changes in v2:
- Compute max_sz upfront and remove len check from the loop body
- Document that @len is limited by XATTR_SIZE_MAX

Yuzuki Ishiyama (2):
  bpf: add bpf_strncasecmp kfunc
  selftests/bpf: Test kfunc bpf_strncasecmp

 kernel/bpf/helpers.c                          | 34 +++++++++++++++----
 .../selftests/bpf/prog_tests/string_kfuncs.c  |  1 +
 .../bpf/progs/string_kfuncs_failure1.c        |  6 ++++
 .../bpf/progs/string_kfuncs_failure2.c        |  1 +
 .../bpf/progs/string_kfuncs_success.c         |  7 ++++
 5 files changed, 43 insertions(+), 6 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-01-20 11:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-20  7:03 [PATCH bpf-next v3 0/2] bpf: Add kfunc bpf_strncasecmp() Yuzuki Ishiyama
2026-01-20  7:03 ` [PATCH bpf-next v3 1/2] bpf: add bpf_strncasecmp kfunc Yuzuki Ishiyama
2026-01-20  7:21   ` bot+bpf-ci
2026-01-20  9:29     ` Viktor Malik
2026-01-20 10:59       ` Yuzuki Ishiyama
2026-01-20 11:02       ` Mykyta Yatsenko
2026-01-20 11:15         ` Viktor Malik
2026-01-20  7:03 ` [PATCH bpf-next v3 2/2] selftests/bpf: Test kfunc bpf_strncasecmp Yuzuki Ishiyama
2026-01-20  9:30   ` Viktor Malik

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