]> git.baikalelectronics.ru Git - kernel.git/commit
page_pool: Add callback to init pages when they are allocated
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 3 Jan 2022 15:08:07 +0000 (16:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Jan 2022 03:46:32 +0000 (19:46 -0800)
commit2e654c73f3e69bbfd02af376a780b763d5a1d73a
tree32a1813d431fd1875d576c44eb0f624d05802b5f
parent0fe64b9ac540b813909ceb5e550129c91a081340
page_pool: Add callback to init pages when they are allocated

Add a new callback function to page_pool that, if set, will be called every
time a new page is allocated. This will be used from bpf_test_run() to
initialise the page data with the data provided by userspace when running
XDP programs with redirect turned on.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Link: https://lore.kernel.org/bpf/20220103150812.87914-3-toke@redhat.com
include/net/page_pool.h
net/core/page_pool.c