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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 D143CC433DB for ; Fri, 12 Feb 2021 19:10:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 771A664DAE for ; Fri, 12 Feb 2021 19:10:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232073AbhBLTKM (ORCPT ); Fri, 12 Feb 2021 14:10:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbhBLTJy (ORCPT ); Fri, 12 Feb 2021 14:09:54 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 840F5C061574; Fri, 12 Feb 2021 11:09:14 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d15so354192plh.4; Fri, 12 Feb 2021 11:09:14 -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; bh=XTjy0dgeoHsEd0mGLVX1SE8z/D5vjwKGcESeectcBLc=; b=rj5BszzM2au4AQ+Otsuxp31NRq0tpKkqaTIIJ8y4nPBuWliKAZjLfYi0e2bf2/dQOr 9cdKsKi8f+71jJoe9SBywDimkV8638aEAes7XUH3kNOY/4sbhWlbC48xnM51Pcpj3nGY R5dVuDnhGV9UxrGu6ynm/gslXLXskQ+42dHk6caIm+rYvbiomEkZDp15mA7W0NJXIwV3 8mGNk4jUYu79XasALeGHKvpNw7ZGuno17UsKZZIp/gymRRErPomTEVKoJ7Nvfb9G1jW0 bijnWC5yZriBY/Bj6ED1ZcbCNBRMtzGQbCI6Y0P0vSOU5om+9UV1SMvwHJqOoTwD5Sue WFPg== 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=XTjy0dgeoHsEd0mGLVX1SE8z/D5vjwKGcESeectcBLc=; b=bcrrRqSSsFLqdDX/gbx+RkSJLDCdUERvjR0/Jv4HKj9YDVdBJDIR10klmvz3InNEHD scKbBfb7FyvvWelYgxW2v2eUicG8PK3JRzyu5T58ZjtTzfrKWqYaV8CsZz8Ac6fkebpT BYqwfBiPDadv8OFk1FR5Euf8pLSbgIGxofMig3Q1lDw5ln4LoXluJ+ePM46BGId+05jk 9rnrH/+OHUMgPHOHcTZWui58NDXrNL+e6asXKg1LiSWlenRcH5Wo+WUfT5IWh/25mdYT mTjAC+/JasEW7o4CJI+IKw3ESkiRZ7sGCNUKRRaFmeEc37FN1IuTpCElgZhXBHyY78Qg uAvw== X-Gm-Message-State: AOAM533q1IA6occ1iqNuzfdak7OFhlnhIRwJ2hEeMseaBkA8+x94I3zw HBYfRJ9sG03P3ISvq4tOHXT59U5ZuswW+G+UqG/Aa2Ovv2tGVw== X-Google-Smtp-Source: ABdhPJyxzKOmIQEC+MNX1nqq/ivhjMyrY5qmBW/373VwjwCZRtvvTt2mrOtf5Enq/U9h7jZvFczS/A1mUwD3zCy5/0A= X-Received: by 2002:a17:90a:bc4b:: with SMTP id t11mr2880835pjv.52.1613156954045; Fri, 12 Feb 2021 11:09:14 -0800 (PST) MIME-Version: 1.0 References: <20210210022136.146528-1-xiyou.wangcong@gmail.com> <20210210022136.146528-3-xiyou.wangcong@gmail.com> In-Reply-To: From: Cong Wang Date: Fri, 12 Feb 2021 11:09:03 -0800 Message-ID: Subject: Re: [Patch bpf-next v2 2/5] skmsg: get rid of struct sk_psock_parser To: Lorenz Bauer Cc: Networking , bpf , duanxiongchun@bytedance.com, Dongdong Wang , jiang.wang@bytedance.com, Cong Wang , John Fastabend , Daniel Borkmann , Jakub Sitnicki Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Feb 12, 2021 at 2:56 AM Lorenz Bauer wrote: > > On Wed, 10 Feb 2021 at 02:21, Cong Wang wrote: > > > > From: Cong Wang > > > > struct sk_psock_parser is embedded in sk_psock, it is > > unnecessary as skb verdict also uses ->saved_data_ready. > > We can simply fold these fields into sk_psock, and get rid > > of ->enabled. > > Looks nice, can you use sk_psock_strp_enabled() more? There are a > couple places in sock_map.c which test psock->saved_data_ready > directly. Its name tells it is for stream parser, so not suitable for others. Are you suggesting to rename it to sk_psock_enabled() and use it? Note it still has an additional !psock test, but I think that is fine for slow paths. Thanks.