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=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 0A0C3C4320E for ; Sat, 14 Aug 2021 04:31:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4DE560E96 for ; Sat, 14 Aug 2021 04:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236821AbhHNEb6 (ORCPT ); Sat, 14 Aug 2021 00:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235780AbhHNEb4 (ORCPT ); Sat, 14 Aug 2021 00:31:56 -0400 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31848C0617AE for ; Fri, 13 Aug 2021 21:31:29 -0700 (PDT) Received: by mail-oi1-x22e.google.com with SMTP id o20so19020224oiw.12 for ; Fri, 13 Aug 2021 21:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=trxdMVQ5KE2YP5yvnKScVszVE8SqzwdPTILRnQVaJ1M=; b=x+GsK8bZhrM8+HG13n9myn7KnqIiZb/1gyMo3qxT0NXvFF9VbPvZO+jHrzNma4FKNQ lJUplLjqKCMVgc6QwobPe4rO/CMM1tbGBrdLYAsfFVrGenpg02EXuTyZKZTJtnqUmnrg FaMLNhOnmiW3En09myBUVftmG1BN/me920b36emrrIYl3kUubfnmWlfa6kTyuAPkoOTx vLeiWhP+fbDfYfEAopKDGm0yCMsG2aifnPGOkrqeGLJp1+aV/5JpqoXZgd1dFvf8o8bb lNNs6o/spzjxLH2TUf8EhMgAPG72DCgaQInEgbFTpKPaQIZz4S5eurCbSYTBT7Z4Oues x6PQ== 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; bh=trxdMVQ5KE2YP5yvnKScVszVE8SqzwdPTILRnQVaJ1M=; b=gacrnS5BNUEbL3XRHhhqkAmZxdjps/TaO7tYGcMTpaDVGBfZnu/Xh0ZsBTPrGDPv8K XbZv7eSAPFrSyplw6HGKRhZDOpEDpnWSUmY5u5smf/GKdCBCJCBdgruUKhzhujAvDZX3 lhdzD0q4lp7vWPgA4UO9dpGoxfq5CrjQGGzuUQiHEOzGJqO7yLCrYCTOonS7R0Av7STQ /cwLXJzsrC3Vi+8dn95kXVV72zetIJXqPSgFIEtij1+smjtbMqtlz3uIn6bs+Zu0SBbI 06SUOf0ATjyknWb0i59osbupk37lOYLClGhkjMqCu59+fhjEnzhZ0rD1SFnu9burooU1 lRYg== X-Gm-Message-State: AOAM531CHTARi8N7Dxrn/srfbr+0eYjjwYJKWmQf1LNf39XeZY3IL/0i ur7RpmgSeJdPJyaAq4xkR4M1PF9EbAdyZSYiJ162MA== X-Google-Smtp-Source: ABdhPJwuR6+OhKaj+GqaApCHNsCgP1mRsAlEzLHwTrD7XiTtYCLV3kD2z1qF54HbnlGRtk0To9oPd1A/Oj1PNZu492M= X-Received: by 2002:aca:2403:: with SMTP id n3mr4581565oic.109.1628915488554; Fri, 13 Aug 2021 21:31:28 -0700 (PDT) MIME-Version: 1.0 References: <20210809194742.1489985-1-jiang.wang@bytedance.com> In-Reply-To: From: "Jiang Wang ." Date: Fri, 13 Aug 2021 21:31:17 -0700 Message-ID: Subject: Re: Re: [PATCH bpf-next v6 0/5] sockmap: add sockmap support for unix stream socket To: Andrii Nakryiko Cc: Networking , Cong Wang , Xiongchun Duan , Yongji Xie , =?UTF-8?B?5p+056iz?= , "David S. Miller" , Jakub Kicinski , John Fastabend , Daniel Borkmann , Jakub Sitnicki , Lorenz Bauer , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Shuah Khan , Al Viro , Christian Brauner , Johan Almbladh , open list , bpf , "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Aug 13, 2021 at 3:42 PM Andrii Nakryiko wrote: > > On Mon, Aug 9, 2021 at 12:47 PM Jiang Wang wrote: > > > > This patch series add support for unix stream type > > for sockmap. Sockmap already supports TCP, UDP, > > unix dgram types. The unix stream support is similar > > to unix dgram. > > > > Also add selftests for unix stream type in sockmap tests. > > > > Hey Jiang, > > This patch doesn't apply cleanly to bpf-next anymore ([0]), can you > please rebase and resubmit, adding John's and Jakub's acks along the > way? Thanks! > Sure, I just rebased, added ack and sent the patch again with the same title. Let me know if there is any problem. Thanks. > [0] https://github.com/kernel-patches/bpf/pull/1563#issuecomment-896128082 > > > > > Jiang Wang (5): > > af_unix: add read_sock for stream socket types > > af_unix: add unix_stream_proto for sockmap > > selftest/bpf: add tests for sockmap with unix stream type. > > selftest/bpf: change udp to inet in some function names > > selftest/bpf: add new tests in sockmap for unix stream to tcp. > > > > include/net/af_unix.h | 8 +- > > net/unix/af_unix.c | 91 +++++++++++++++--- > > net/unix/unix_bpf.c | 93 ++++++++++++++----- > > .../selftests/bpf/prog_tests/sockmap_listen.c | 48 ++++++---- > > 4 files changed, 187 insertions(+), 53 deletions(-) > > > > v1 -> v2 : > > - Call unhash in shutdown. > > - Clean up unix_create1 a bit. > > - Return -ENOTCONN if socket is not connected. > > > > v2 -> v3 : > > - check for stream type in update_proto > > - remove intermediate variable in __unix_stream_recvmsg > > - fix compile warning in unix_stream_recvmsg > > > > v3 -> v4 : > > - remove sk_is_unix_stream, just check TCP_ESTABLISHED for UNIX sockets. > > - add READ_ONCE in unix_dgram_recvmsg > > - remove type check in unix_stream_bpf_update_proto > > > > v4 -> v5 : > > - add two missing READ_ONCE for sk_prot. > > > > v5 -> v6 : > > - fix READ_ONCE by reading to a local variable first. > > > > -- > > 2.20.1 > >