[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211116163159.56e1c957@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 16 Nov 2021 16:31:59 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
lorenzo.bianconi@...hat.com, davem@...emloft.net, ast@...nel.org,
daniel@...earbox.net, shayagr@...zon.com, john.fastabend@...il.com,
dsahern@...nel.org, brouer@...hat.com, echaudro@...hat.com,
jasowang@...hat.com, alexander.duyck@...il.com, saeed@...nel.org,
maciej.fijalkowski@...el.com, magnus.karlsson@...el.com,
tirthendu.sarkar@...el.com, toke@...hat.com
Subject: Re: [PATCH v18 bpf-next 20/23] net: xdp: introduce bpf_xdp_pointer
utility routine
On Wed, 17 Nov 2021 01:12:41 +0100 Lorenzo Bianconi wrote:
> ack, you are right. Sorry for the issue.
> I did not trigger the problem with xdp-mb self-tests since we will not run
> bpf_xdp_copy_buf() in this specific case, but just the memcpy()
> (but what you reported is a bug and must be fixed). I will add more
> self-tests.
> Moreover, reviewing the code I guess we can just update bpf_xdp_copy() for our case.
> Something like:
Seems reasonable. We could probably play some tricks with double
pointers to avoid the ternary operator being re-evaluated for each
chunk. But even if it's faster it is probably not worth the ugliness
of the code.
Powered by blists - more mailing lists