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 33945C07E94 for ; Fri, 4 Jun 2021 08:43:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18F316140F for ; Fri, 4 Jun 2021 08:43:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbhFDIpN (ORCPT ); Fri, 4 Jun 2021 04:45:13 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:41840 "EHLO mail-wr1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbhFDIpN (ORCPT ); Fri, 4 Jun 2021 04:45:13 -0400 Received: by mail-wr1-f42.google.com with SMTP id h8so8432743wrz.8 for ; Fri, 04 Jun 2021 01:43:27 -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=NeOlog73AYhS8C5Eh+RyQ1KtBdc01igK1eNCB2KuGal+oxskqBwI9qTxLIJAUuMCh9 UiCrBpgaBp2Z6hEJDYB6rwMslanCOq1YwJR2XF0fGfZqT41yKoOJKuJyqtX/hnRNElOZ S4pknE1IaFnb8ZBWNcxY0NEc24iDNF7DNy73QaQFXIIFBCJqsvx5CecTj7LosdXcWTGu K1m5pfP6CfLT9VpA8ZKKYQ/+Dw3FQBFvfYM3CcXNTq+y5GbG/aQ2FGwVtVoUlc83ffx2 Ixp5UuMK8Ra+6UCjG0xjs0cC7Ba/J/+M4CU+uauhVhYdXofJ7GtyyYOZJwj3KPrkbtEr CYDQ== X-Gm-Message-State: AOAM530r1RUM5LoihV0q77TJpTqzuCbwUarbry9VNKXXwAasqDhyYUHQ GQCnkOfIyo7bBkTSS5e1PjXmOQ== 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: Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org [...] > > + /* 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); >