On Mon, Sep 22, 2025 at 11:57 AM Menglong Dong <[email protected]> wrote: > > The "data" in struct bpf_session_run_ctx is always 8-bytes aligned. > Therefore, we can store the "is_return" to the last bit of the "data", > which can make bpf_session_run_ctx 8-bytes aligned and save memory.
Does this really save anything? AFAICT, bpf_session_run_ctx is only allocated on the stack. Therefore, we don't save any memory unless there is potential risk of stack overflow. OTOH, this last-bit logic is confusing and error prone. I would argue against this type of optimization. Thanks, Song
