[lkml]   [2020]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH net] veth: xdp: use head instead of hard_start
Hi Mao & Jesper
(Resending with plain text...)

On 2020/03/30 20:34, Jesper Dangaard Brouer wrote:
> On Mon, 30 Mar 2020 18:26:31 +0800
> Mao Wenan <> wrote:
>> xdp.data_hard_start is mapped to the first
>> address of xdp_frame, but the pointer hard_start
>> is the offset(sizeof(struct xdp_frame)) of xdp_frame,
>> it should use head instead of hard_start to
>> set xdp.data_hard_start. Otherwise, if BPF program
>> calls helper_function such as bpf_xdp_adjust_head, it
>> will be confused for xdp_frame_end.
> I have noticed this[1] and have a patch in my current patchset for
> fixing this. IMHO is is not so important fix right now, as the effect
> is that you currently only lose 32 bytes of headroom.
> [1]

You are right, the subtraction is not necessary here.
Thank you for working on this.

Toshiaki Makita

 \ /
  Last update: 2020-03-31 01:36    [W:0.059 / U:5.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site