From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76B2CC3F2D2 for ; Mon, 2 Mar 2020 08:23:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B24E246B4 for ; Mon, 2 Mar 2020 08:23:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="okqs2mhj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727143AbgCBIXj (ORCPT ); Mon, 2 Mar 2020 03:23:39 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:35454 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbgCBIXj (ORCPT ); Mon, 2 Mar 2020 03:23:39 -0500 Received: by mail-oi1-f193.google.com with SMTP id b18so9505399oie.2; Mon, 02 Mar 2020 00:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=pBpc6wsvkGRBZXRQXOedwVEHxms2DjtLUfW89sueDZk=; b=okqs2mhjiUO8JIivGpHzGNh4pIuPDewCc5jHqCWNk3mXAICeBnBlgyw1pt/TYySTJs Cx3hvd6NaY/B4X5JiEoWRdQUdQqbiXUJmfQEaMPGr56Z0L98VUHaML0+nBxeiqv8L3uM gv1wXxEqjUa2MpkIENLLKCZzGEMKLAFN7XmzH8Nd56Sp3wzjl18T5W4BorZzv9T/ZdHb wZzhO/Us/Ivix09RsrYRZf6qjB27U/C0I1qZ2QnVWT5tyWv76UE9RN7WcpAfjQoPLNbx Rk9wYzYay8QYR6xTDg3+bm5m9foQxDMdcXcJ7fzOxNLVhx7yayVjVX2IomQTDi6G+rnw 4HdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=pBpc6wsvkGRBZXRQXOedwVEHxms2DjtLUfW89sueDZk=; b=L/w2PgaVMiUyHNaltMN5h31Y95QWVHuo2cYjKtIQYA4k7kIkhFNjDQijMv8ncVgdyD cd4KqaiTwiHa0DhA8WhP+2vscbuBboCIKdvhAS4Lx2+dLvZ8pK7wVdvQDYVjEJaPFQfA rFVjvh0LVBqlBbH/NHyCGJNnsflabEgv+oKenVeTkQTMGSKUgeTkrxpqV0pL8rtr7HFK 827wOhfAlYpdManZ3bIaSbQf5EOidvsxUIVTUZEsDZPZ/qMsI09mba0e/+HyoxFz8t9l 8r1uR16tIynq2GudzR1tX+RQEVLgXcoNwfBVuGZYEY3Jf0SDjwqbzCH7d90y9QcYCxqm SxaA== X-Gm-Message-State: ANhLgQ3A62hESsgPwriQa6IGG67BCgi1WfBLHPTtf78oDNovnkvirvqB 3twVwqNEwrMIwuXtfL6MJlGCiNKbuQBf8K5JgVv4OtDr X-Google-Smtp-Source: ADFU+vumIHFWn/QAq65GRphsbc3M4dJy5+RcZogwja8X4eBJdfyeXz6KjxK3bWQwBTrbTcb+aEFPp1fRpnLNQpY2vVc= X-Received: by 2002:aca:5109:: with SMTP id f9mr2280532oib.14.1583137416872; Mon, 02 Mar 2020 00:23:36 -0800 (PST) MIME-Version: 1.0 References: <20200225044538.61889-1-forrest0579@gmail.com> In-Reply-To: <20200225044538.61889-1-forrest0579@gmail.com> From: Forrest Chen Date: Mon, 2 Mar 2020 16:23:24 +0800 Message-ID: Subject: Re: [PATCH v4 bpf-next 0/3] bpf: Add get_netns_id helper for sock_ops To: bpf Cc: Alexei Starovoitov , Daniel Borkmann , John Fastabend , "David S . Miller" , Networking , Petar Penkov , Song Liu , Andrii Nakryiko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Find that all three commits are acked by the maintainer. Could we merge this to the upstream? Or do we have any other comments? Lingpeng Chen =E4=BA=8E2020=E5=B9=B42=E6=9C=8825=E6= =97=A5=E5=91=A8=E4=BA=8C =E4=B8=8B=E5=8D=8812:46=E5=86=99=E9=81=93=EF=BC=9A > > Currently 5-tuple(sip+dip+sport+dport+proto) can't identify a > uniq connection because there may be multi net namespace. > For example, there may be a chance that netns a and netns b all > listen on 127.0.0.1:8080 and the client with same port 40782 > connect to them. Without netns number, sock ops program > can't distinguish them. > Using bpf_get_netns_id helpers to get current connection > netns number to distinguish connections. > > Changes in v4: > - rename get_netns_id_sock_ops to get_getns_id > - rebase from bpf-next > > Changes in v3: > - rename sock_ops_get_netns to get_netns_id > > Changes in v2: > - Return u64 instead of u32 for sock_ops_get_netns > - Fix build bug when CONFIG_NET_NS not set > - Add selftest for sock_ops_get_netns > > Lingpeng Chen (3): > bpf: Add get_netns_id helper function for sock_ops > bpf: Sync uapi bpf.h to tools/ > selftests/bpf: add selftest for get_netns_id helper > > include/uapi/linux/bpf.h | 9 +++- > net/core/filter.c | 20 ++++++++ > tools/include/uapi/linux/bpf.h | 9 +++- > .../selftests/bpf/progs/test_tcpbpf_kern.c | 11 +++++ > .../testing/selftests/bpf/test_tcpbpf_user.c | 46 ++++++++++++++++++- > 5 files changed, 92 insertions(+), 3 deletions(-) > > > base-commit e0360423d020 > ("selftests/bpf: Run SYN cookies with reuseport BPF test only for TCP") > -- > 2.20.1 > --=20 Beijing University of Posts and Telecommunications forrest0579@gmail.com