From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH bpf-next v6 0/4] Hash support for sock Date: Tue, 15 May 2018 20:55:53 +0200 Message-ID: <58b2e8fa-87e6-ea7f-b96c-f5be6f48b4be@iogearbox.net> References: <1526317219-7752-1-git-send-email-john.fastabend@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net To: John Fastabend , ast@kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:47214 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751400AbeEOSz4 (ORCPT ); Tue, 15 May 2018 14:55:56 -0400 In-Reply-To: <1526317219-7752-1-git-send-email-john.fastabend@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/14/2018 07:00 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 that need to be referenced using longer keys. > > This series adds support for a sockhash map reusing as much of > the sockmap code as possible. I made the decision to add sockhash > specific helpers vs trying to generalize the existing helpers > because (a) they have sockmap in the name and (b) the keys are > different types. I prefer to be explicit here rather than play > type games or do something else tricky. > > To test this we duplicate all the sockmap testing except swap out > the sockmap with a sockhash. > > v2: fix file stats and add v2 tag > v3: move tool updates into test patch, move bpftool updates into > its own patch, and fixup the test patch stats to catch the > renamed file and provide only diffs +/- on that. > v4: Add documentation to UAPI bpf.h > v5: Add documentation to tools UAPI bpf.h > v6: 'git add' test_sockhash_kern.c which was previously missing > but was not causing issues because of typo in test script, > noticed by Daniel. After this the git format-patch -M option > no longer tracks the rename of the test_sockmap_kern files for > some reason. I guess the diff has exceeded some threshold. > > Just a note I pushed Dave's Acks through v4 into v5 due to small > size of changes. > > John Fastabend (4): > bpf: sockmap, refactor sockmap routines to work with hashmap > bpf: sockmap, add hash map support > bpf: selftest additions for SOCKHASH > bpf: bpftool, support for sockhash Applied to bpf-next, thanks John! Couple of comments in the patches.