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 92107C4708F for ; Fri, 4 Jun 2021 08:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BEE461411 for ; Fri, 4 Jun 2021 08:42:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbhFDIob (ORCPT ); Fri, 4 Jun 2021 04:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhFDIob (ORCPT ); Fri, 4 Jun 2021 04:44:31 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01767C06174A for ; Fri, 4 Jun 2021 01:42:30 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id c5so8430426wrq.9 for ; Fri, 04 Jun 2021 01:42:29 -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=jvKMHc0jlaqpl0gE0m4pdmFgU6zND9QoLwEPFC1jX7/aIinO2Q5R+O4miuvgd8zZ25 aWuIQ9BxuXnmMdgauli285A0PDfqMllSeOvyGizBatmOY/1PH46F7Z7tyVa/6kKZDmf2 apBASNadb+/1/xghlXp9FCE+aw39t6iIrrlVMwX+lFSYcLMHkU+zL+X3Aq02KuXOe5v1 kzHKlgMeLQQ5a/X3lFdAWaRUuUCM6VgYI98wl0yJb03pEAJYT3QPPsmm1WbQ/MWjjie5 UUfyVaM+pnmi7H513+t7SPf5KtYVUseqge3/URYQ3YFkxQJ+AzYaJMEaY2bPAWdxgPB9 mT2Q== X-Gm-Message-State: AOAM531B4oMTwrxsGAlYEFCtFssXWP+ks9r2Ry9Ymb32pqala+kRO35s GtRzN991TO6K7+WHZIVdOv91dg== 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: linux-rdma@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); >