From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH bpf] bpf: Support sk lookup in netns with id 0 Date: Mon, 26 Nov 2018 15:08:07 -0700 Message-ID: <1394aecf-1493-9af6-c6f2-b6ed36cfa7b3@gmail.com> References: <20181126212732.30936-1-joe@wand.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, nicolas.dichtel@6wind.com To: Joe Stringer , daniel@iogearbox.net, ast@kernel.org Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:34279 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbeK0JDo (ORCPT ); Tue, 27 Nov 2018 04:03:44 -0500 Received: by mail-pl1-f194.google.com with SMTP id f12-v6so14546460plo.1 for ; Mon, 26 Nov 2018 14:08:10 -0800 (PST) In-Reply-To: <20181126212732.30936-1-joe@wand.net.nz> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/26/18 2:27 PM, Joe Stringer wrote: > @@ -2405,6 +2407,9 @@ enum bpf_func_id { > /* BPF_FUNC_perf_event_output for sk_buff input context. */ > #define BPF_F_CTXLEN_MASK (0xfffffULL << 32) > > +/* BPF_FUNC_sk_lookup_tcp and BPF_FUNC_sk_lookup_udp flags. */ > +#define BPF_F_SK_CURRENT_NS 0x80000000 /* For netns field */ > + I went down the nsid road because it will be needed for other use cases (e.g., device lookups), and we should have a general API for network namespaces. Given that, I think the _SK should be dropped from the name.