On Mon, Aug 25, 2025 at 3:29 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote: > > On Mon, 25 Aug 2025 15:23:23 -0700 Amery Hung wrote: > > > > + if (!len) > > > > + len = xdp_get_buff_len(xdp); > > > > > > Why not return -EINVAL here for len=0? > > > > > > > I try to mirror the behavior of bpf_skb_pull_data() to reduce confusion here. > > Different question for the same LoC :) > > Why not > > if (!len) > len = buff_len; > ? > Or perhaps: > > len = len ?: buf_len; ... Ope. Thanks for catching this. I will fix it in the next iteration.