xdp: Refactor devmap allocation code for reuse
authorToke Høiland-Jørgensen <toke@redhat.com>
Fri, 26 Jul 2019 16:06:53 +0000 (18:06 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 29 Jul 2019 20:50:48 +0000 (13:50 -0700)
commitfca16e51078e8e5c0af839426b3d2dcd2bede135
tree8bf50cb542d34a730874a6bbd4230f5389366b37
parent6dbff13ca8a2ad2fddd904c2e789dd5e59a8644c
xdp: Refactor devmap allocation code for reuse

The subsequent patch to add a new devmap sub-type can re-use much of the
initialisation and allocation code, so refactor it into separate functions.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/devmap.c