Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp43910pxb; Fri, 9 Apr 2021 17:41:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN+dWc8pM4JcOiJnCBK6jd+nUQYNy09Xrzpfw8ckWYmWkKtHci5De2o0MQmwt84S0QqsMn X-Received: by 2002:a05:6402:2208:: with SMTP id cq8mr19799361edb.122.1618015280260; Fri, 09 Apr 2021 17:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618015280; cv=none; d=google.com; s=arc-20160816; b=vHPwHUTOWbnyNlg/kOZeqnowCwTAQeWiqBuMAc2Y2OMhpvg9/8oHhymlgDR8hP3xx2 AA4CSg0RjgY9jJxpabDbiZDe4XnvqQCc4kvt3RxgjlQxCiiVlWlkmdXJkilrtFzdmFFn OqjyhqTvFkA+p+CBthk5AE171YagQ0YV9fUiZZUlw3sMVDQdBuR3o0XX5YnzUwDZwtl8 VR/peCMFE0xb606eGiK3KoRX3dbEIOKJSo3gCoZU4iBmAn9CvssSbxCX5OqHBKtQSfnp nEDRzNPElc07Y62OFFUsirxez5NYQeJnFwetNwWDnPKdGlkd7lqKpiltufAioDH+sEAq Q6ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=JxAWTKu0RsLOn+CtOJNoC1FW0WcD7DLqFKDKm5Tu7xg=; b=X4RM2jLAL9URFanVMz57VCSGb/piM+mGTghcG6zre53w0RabFy7N1tEgcvWKHBC/+Y +kgqLStU+RKEGCXBYir8K612NOzYVnBpgF/2CRe8OKTu4GfHQBMNxencVJLtuKqzCVTr WgUdIbRmYNKJbzARg51zyRavfJN3k51cqrQAN2K46e1V666xweG1hQvOeeHp3Iz8u4P7 0XnpHnlavmNffupe28/b5+D+YuxxdI3H5HTwIrWs/olKuWKnfxh9MWn9TOS3ePVnE1A2 S8r7OY/C9KVp1CfCyCGs9amWWewiY8A4aDK8ieai2ev6zEpByz1F+3ymrOac7AzH0o72 ETmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=oHL6t39Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec10si3168963ejb.386.2021.04.09.17.40.57; Fri, 09 Apr 2021 17:41:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=oHL6t39Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235297AbhDJAkS (ORCPT + 99 others); Fri, 9 Apr 2021 20:40:18 -0400 Received: from linux.microsoft.com ([13.77.154.182]:52614 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235215AbhDJAkR (ORCPT ); Fri, 9 Apr 2021 20:40:17 -0400 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by linux.microsoft.com (Postfix) with ESMTPSA id A584220B5683; Fri, 9 Apr 2021 17:40:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A584220B5683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1618015203; bh=JxAWTKu0RsLOn+CtOJNoC1FW0WcD7DLqFKDKm5Tu7xg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oHL6t39YonTW38B5zIyWMIxXPFYAXsrJ1LA+xAxog1i3nr6opzclHK9FMNwuSJPjp G+O74GkXOPZ6fYtvi5mj7L2gjH2mejD4EkEumfzzh21qpKtYX+e8olGqz8gfjD3Hz+ Z1/3PwXzhgpo+Uh1MrFjw71nPxqY5i2+/NOUWl6k= Received: by mail-pj1-f42.google.com with SMTP id ot17-20020a17090b3b51b0290109c9ac3c34so5765558pjb.4; Fri, 09 Apr 2021 17:40:03 -0700 (PDT) X-Gm-Message-State: AOAM532z8fWhtlAfHeIOvh7bNlggRgaxC39Qlm12m7mzEXBpXMjK6+EN qTWef47rBPltY2VScCk18PLuW5LQJTOtZBWFkEQ= X-Received: by 2002:a17:90a:5306:: with SMTP id x6mr11539930pjh.39.1618015203252; Fri, 09 Apr 2021 17:40:03 -0700 (PDT) MIME-Version: 1.0 References: <20210409223801.104657-1-mcroce@linux.microsoft.com> <20210409223801.104657-4-mcroce@linux.microsoft.com> In-Reply-To: From: Matteo Croce Date: Sat, 10 Apr 2021 02:39:27 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v3 3/5] page_pool: Allow drivers to hint on SKB recycling To: Ilias Apalodimas Cc: 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 , Michel Lespinasse , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Guoqing Jiang , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Aleksandr Nogikh , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Yunsheng 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 10, 2021 at 2:11 AM Ilias Apalodimas wrote: > > Hi Matteo, > > [...] > > +bool page_pool_return_skb_page(void *data); > > + > > struct page_pool *page_pool_create(const struct page_pool_params *params); > > > > #ifdef CONFIG_PAGE_POOL > > @@ -243,4 +247,13 @@ static inline void page_pool_ring_unlock(struct page_pool *pool) > > spin_unlock_bh(&pool->ring.producer_lock); > > } > > > > +/* Store mem_info on struct page and use it while recycling skb frags */ > > +static inline > > +void page_pool_store_mem_info(struct page *page, struct xdp_mem_info *mem) > > +{ > > + u32 *xmi = (u32 *)mem; > > + > > I just noticed this changed from the original patchset I was carrying. > On the original, I had a union containing a u32 member to explicitly avoid > this casting. Let's wait for comments on the rest of the series, but i'd like > to change that back in a v4. Aplogies, I completely missed this on the > previous postings ... > Hi, I had to change this because including net/xdp.h here caused a circular dependency. I think that the safest thing we can do is to use memcpy(), which will handle the alignments correctly, depending on the architecture. Cheers, -- per aspera ad upstream