On Thu, Nov 21, 2019 at 1:32 PM John Fastabend <john.fastabend@xxxxxxxxx> wrote: > > Toke Høiland-Jørgensen wrote: > > Tetsuo pointed out that it was not only the device unregister hook that was > > broken for devmap_hash types, it was also cleanup on map free. So better > > fix this as well. > > > > While we're add it, there's no reason to allocate the netdev_map array for > ^^^ > at > > DEVMAP_HASH, so skip that and adjust the cost accordingly. > > Beyond saving space without pulling these apart the free would have gotten > fairly ugly. > > > > > Fixes: 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking up devices by hashed index") > > Reported-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> > > Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > > --- > > kernel/bpf/devmap.c | 74 ++++++++++++++++++++++++++++----------------- > > 1 file changed, 46 insertions(+), 28 deletions(-) > > small typo in commit message otherwise > > Acked-by: John Fastabend <john.fastabend@xxxxxxxxx> Fixed the typo and applied to bpf-next. Thanks