From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [bpf-next PATCH 0/3] Hash support for sock Date: Fri, 27 Apr 2018 16:15:06 -0700 Message-ID: References: <20180427224752.6861.77895.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Alexei Starovoitov , Daniel Borkmann , Network Development To: Alexei Starovoitov Return-path: Received: from mail-it0-f67.google.com ([209.85.214.67]:51574 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbeD0XPU (ORCPT ); Fri, 27 Apr 2018 19:15:20 -0400 Received: by mail-it0-f67.google.com with SMTP id n202-v6so3134152ita.1 for ; Fri, 27 Apr 2018 16:15:19 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 04/27/2018 03:54 PM, Alexei Starovoitov wrote: > On Fri, Apr 27, 2018 at 10:51 PM, John Fastabend > wrote: >> In the original sockmap implementation we got away with using an >> array similar to devmap. However, unlike devmap where an ifindex >> has a nice 1:1 function into the map we have found some use cases >> with sockets need to be referenced using longer keys. >> >> This series adds support for a sockhash map type which reuses almost >> all the sockmap code except it needed a few special add/remove >> handlers. >> >> To test this we duplicate all the sockmap testing except swap out >> the sockmap with a sockhash. >> >> --- >> >> John Fastabend (3): >> bpf: sockmap, refactor sockmap routines to work with hashmap >> bpf: sockmap, add hash map support >> bpf: selftest additions for SOCKHASH >> >> >> tools/bpf/bpftool/map.c | 1 >> tools/include/uapi/linux/bpf.h | 6 >> tools/testing/selftests/bpf/Makefile | 3 >> tools/testing/selftests/bpf/test_sockhash_kern.c | 4 >> tools/testing/selftests/bpf/test_sockmap.c | 27 +- >> tools/testing/selftests/bpf/test_sockmap_kern.c | 340 ---------------------- >> tools/testing/selftests/bpf/test_sockmap_kern.h | 340 ++++++++++++++++++++++ >> 7 files changed, 374 insertions(+), 347 deletions(-) >> create mode 100644 tools/testing/selftests/bpf/test_sockhash_kern.c >> create mode 100644 tools/testing/selftests/bpf/test_sockmap_kern.h > > something wrong here. > patch 1 changes include/linux/filter.h > but it's not included in the above. > Please fix and resubmit > Strange had to create a new branch to fix it. Anyways thanks and v2 coming with correct stats. .John