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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 69A65C07E94 for ; Fri, 4 Jun 2021 08:42:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 06A0561411 for ; Fri, 4 Jun 2021 08:42:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06A0561411 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 601726B0036; Fri, 4 Jun 2021 04:42:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B0BD6B006C; Fri, 4 Jun 2021 04:42:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 403956B006E; Fri, 4 Jun 2021 04:42:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 07C4E6B0036 for ; Fri, 4 Jun 2021 04:42:33 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 86144181AEF00 for ; Fri, 4 Jun 2021 08:42:33 +0000 (UTC) X-FDA: 78215400186.06.5D12858 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by imf08.hostedemail.com (Postfix) with ESMTP id 415CA80198B4 for ; Fri, 4 Jun 2021 08:42:14 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id c5so8430430wrq.9 for ; Fri, 04 Jun 2021 01:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/ME7R43Oz5qvoJp6XLHw2SaFOz7wVkh76dKe7RVe8Kk=; b=jGd6DqWkaAWksWxsZRh6WUWPRk3a2bZZ0wx3zTLf6N7R2y/VxNEItQtvFvN186iMzz nmywnenM+OUbGDr3Z8q10FpW0MbxFJIWqr0pp95rjYzFWyxHaHwbOKwstf5X+fKUowFT AYJwv3pkPMEHFf+veSdWRZQucvLGB5e1nQspXD2rX1C/ZBJCtLbMXEe0CS01R0uWEdq1 DjikTt0KB948De2dwDvddMb/92zDi8WT8yDJi9fOYKKnMzuJ4uk3yYPTWgf/KdBROAwV Qkc+4KqoVQ4RVvlfy3syQt7OouZYgdSziPIYpt39MyoqZA/IUDJWOYoPPs0FgHpM0Xex Tl8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/ME7R43Oz5qvoJp6XLHw2SaFOz7wVkh76dKe7RVe8Kk=; b=HGiYGiJpI4Jw8EnjHNGVJ0UOR2urYQF/TE5NmJbFtlg2jBYNdxu+2QzZ7Y6vCsRPQd k3qxw3H9+2UK5n8ldXHVoF6psTZZgRSp1Q0ur0dVIKxwVJpU6JQpyziHZ7yNbXuILJi3 yl/sOToBxwos6Hk1rtU+3UgrvCecJqUjSWpAKrZkNv51QwEdnBSP8H06KjNC48NuROUv vwjLOj6puGEhDZzUEJd6KqfLPndXBrATVwK1gfQ5H7gpIcKeCPovrZdj576EF/INHSot 2ah2ge9bj9zO1gfsMywZL8oEloG8EOka0oLtKwoJB3pEpCEshuvXstzshxqRMp7uS9J9 F26g== X-Gm-Message-State: AOAM532ZHba8NzIsW4jNZ50M3J/IEMjf/SYah+vEt8nFXd7xGtaxZqVo whdVZEPwrupXjTDp7pjZQkfXeA== X-Google-Smtp-Source: ABdhPJwT0iLGy4GahWXsBrb/ZUXTrcFjw0HS6AjuXuDy33BtBTbeiZ1SKyP9A/rNEyzBpTpFBQ5Alw== X-Received: by 2002:adf:ee52:: with SMTP id w18mr2648602wro.37.1622796146844; Fri, 04 Jun 2021 01:42:26 -0700 (PDT) Received: from iliass-mbp (ppp-2-87-186-192.home.otenet.gr. [2.87.186.192]) by smtp.gmail.com with ESMTPSA id l16sm8290772wmj.47.2021.06.04.01.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 01:42:26 -0700 (PDT) Date: Fri, 4 Jun 2021 11:42:17 +0300 From: Ilias Apalodimas To: Yunsheng Lin Cc: Matteo Croce , netdev@vger.kernel.org, linux-mm@kvack.org, Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" , Jakub Kicinski , Thomas Petazzoni , Marcin Wojtas , Russell King , Mirko Lindner , Stephen Hemminger , Tariq Toukan , Jesper Dangaard Brouer , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Boris Pismenny , Arnd Bergmann , Andrew Morton , "Peter Zijlstra (Intel)" , Vlastimil Babka , Yu Zhao , Will Deacon , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Guillaume Nault , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, Matthew Wilcox , Eric Dumazet , David Ahern , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni , Sven Auhagen Subject: Re: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling Message-ID: References: <20210521161527.34607-1-mcroce@linux.microsoft.com> <20210521161527.34607-4-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=jGd6DqWk; spf=pass (imf08.hostedemail.com: domain of ilias.apalodimas@linaro.org designates 209.85.221.52 as permitted sender) smtp.mailfrom=ilias.apalodimas@linaro.org; dmarc=pass (policy=none) header.from=linaro.org X-Rspamd-Server: rspam03 X-Stat-Signature: exipqh5kp4w7zz7pkuaacw6qtexkob5t X-Rspamd-Queue-Id: 415CA80198B4 X-HE-Tag: 1622796134-849050 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: [...] > > + /* Driver set this to memory recycling info. Reset it on recycle. > > + * This will *not* work for NIC using a split-page memory model. > > + * The page will be returned to the pool here regardless of the > > + * 'flipped' fragment being in use or not. > > + */ > > I am not sure I understand how does the last part of comment related > to the code below, as there is no driver using split-page memory model > will reach here because those driver will not call skb_mark_for_recycle(), > right? > Yes the comment is there to prohibit people (mlx5 only actually) to add the recycling bit on their driver. Because if they do it will *probably* work but they might get random corrupted packets which will be hard to debug. > > + page->pp = NULL; > > + page_pool_put_full_page(pp, virt_to_head_page(data), false); > > + > > + return true; > > +} > > +EXPORT_SYMBOL(page_pool_return_skb_page); >