[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4402804f-bf7b-9ca0-baa9-1415884b0a80@gmail.com>
Date: Thu, 2 Aug 2018 22:17:53 +0900
From: Toshiaki Makita <toshiaki.makita1@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>,
Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
John Fastabend <john.fastabend@...il.com>
Subject: Re: [PATCH v7 bpf-next 05/10] veth: Handle xdp_frames in xdp napi
ring
On 18/08/02 (木) 20:45, Jesper Dangaard Brouer wrote:
> On Thu, 2 Aug 2018 19:55:09 +0900
> Toshiaki Makita <makita.toshiaki@....ntt.co.jp> wrote:
>
>> + headroom = frame->data - delta - (void *)frame;
>
> Your calculation of headroom is still adding an assumption that
> xdp_frame is located in the top of data area, that is unnecessary.
>
> The headroom can be calculated as:
>
> headroom = sizeof(struct xdp_frame) + frame->headroom - delta;
Thanks. But I'm not sure I get what you are requesting.
Supposing xdp_frame is not located in the top of data area, what ensures
that additional sizeof(struct xdp_frame) can be used?
Toshiaki Makita
Powered by blists - more mailing lists