Skip to content

Conversation

@takehaya
Copy link
Contributor

@takehaya takehaya commented Dec 1, 2025

Summary

Adds BatchSize to RunOptions and plumbs it through to sys.ProgRunAttr.BatchSize, enabling multiple program executions per single BPF_PROG_RUN syscall.

Motivation

In cases where the call overhead is high, such as withBPF_F_TEST_XDP_LIVE_FRAMES, this option becomes desirable.
I am developing my own packet generator, and I found that I need this feature for optimization.
I would be very happy if this could be accepted.

@takehaya takehaya requested a review from a team as a code owner December 1, 2025 16:36
@takehaya takehaya force-pushed the feat/add_batch_size branch from c9124a8 to 684226f Compare December 1, 2025 16:39
@takehaya takehaya requested a review from ti-mo December 2, 2025 12:41
@takehaya takehaya force-pushed the feat/add_batch_size branch 3 times, most recently from 33ddffb to 886a64a Compare December 2, 2025 13:47
@takehaya
Copy link
Contributor Author

takehaya commented Dec 2, 2025

@ti-mo san

I added an example of the behavior!
This shows that arbitrary packets can be sent :)

886a64a

sudo ./xdp_live_frame ens4 1000 10 "192.168.1.1" "192.168.1.2" "<dst mac>"
スクリーンショット 2025-12-02 22 51 23

@takehaya
Copy link
Contributor Author

takehaya commented Dec 4, 2025

It feels like this failing test has nothing to do with mine, and it just looks like a very quirky one....

=== FAIL: asm TestGetSetJumpOp (unknown)

@dylandreimerink
Copy link
Member

It feels like this failing test has nothing to do with mine, and it just looks like a very quirky one....

No, not your fault. Its a persistent flake we have not been able to figure out yet.

@takehaya
Copy link
Contributor Author

takehaya commented Dec 4, 2025

That is a bit of a problem....😫
Thanks for kicking the CI again. Please continue the review 🙏

ti-mo
ti-mo previously approved these changes Dec 4, 2025
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks for taking the time for adding a nice example!

Left one nit. Also, please don't forget to squash your 2nd commit into the 1st. 😄

@takehaya
Copy link
Contributor Author

takehaya commented Dec 4, 2025

@ti-mo san

Thanks for the review. I squashed this commit too. Ready to merge now, please check! 🙏

@takehaya takehaya requested a review from ti-mo December 4, 2025 15:54
@ti-mo ti-mo merged commit f150ced into cilium:main Dec 4, 2025
16 of 18 checks passed
@ti-mo
Copy link
Collaborator

ti-mo commented Dec 4, 2025

@takehaya Thanks, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants