Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2923346pxv; Mon, 12 Jul 2021 05:21:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT2rAgTesy1tIwoqxWMUueDnhtE0s/ZlQ5dZ/llUBED2EyxLKxHG//ZziFSyRSaDJYTKxF X-Received: by 2002:a17:906:3693:: with SMTP id a19mr44290052ejc.237.1626092470915; Mon, 12 Jul 2021 05:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626092470; cv=none; d=google.com; s=arc-20160816; b=OAMlPomw0NlNFCYjKzs153uclwAAUsKV9kkSloLHD7VJAApYMhM8cVJLUpqmZBWDb8 /aGQ+Z05BUuZXsAaG+LkkrrKL89FhM9NanqwncemvfEJ6CXPLuqYKw7Dva/uZ5d6L0Q1 QtoOadjhLbecDyqDuXNXoIFOJUWYCisbxvUuOo1nFtNIJeutMkcF2ZzPsiXBGUx0TSnN o4wop3rgieRW1j3dvreZx9AgqJnmeNZHg5Wup+fbbwC3oxQX6Rui76MB8KmtBXYtJE9b o2SoZzG3Dpp7Ddq2SMVAxrJPUN72XmjZ6t/PTzNw9nnomgUBgytGsuc++aidHY2Y/SMk FofQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=YjNQ3hX9EDTJcOUCxef9bI5orTYbmBoD0yEtTZk9rAc=; b=ctSrDQr4Hr8akluDOwNmOt441V1ICXnvUp/piF9zQj1NO7/SXSX4eUGtZ65xdgEwxD /NyZHvqPo2A+NwCHTLPBiesqBFIhWwMqxc7YT1ADycv1tI43GRq7qMDbVOcVwf36iPTI zYvHaUixQQ4vuCgh0Is8ReB8Z2ZDi2I4Vv45ZTQV1XHvlCquiL+7ajbH+xlTN6pfcnju sdZfpexlIF8zp1CvRTbKm9PUpJ+5u7ophRMSds1Z7/XtdGNtG6O6E1XGYZf33d/g0PCd VBBH0qjYFwCjvfQf4/VeZ/wYKF3VDmgqwMkcM60vaouoEim+UthWJmF9w/SoIT2/pOmZ oVFA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si16387230eju.200.2021.07.12.05.20.46; Mon, 12 Jul 2021 05:21:10 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230058AbhGLMU2 (ORCPT + 99 others); Mon, 12 Jul 2021 08:20:28 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:11288 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234255AbhGLMUR (ORCPT ); Mon, 12 Jul 2021 08:20:17 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GNjMb4PdWz78fP; Mon, 12 Jul 2021 20:12:59 +0800 (CST) Received: from dggpemm500005.china.huawei.com (7.185.36.74) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 12 Jul 2021 20:17:15 +0800 Received: from localhost.localdomain (10.69.192.56) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 12 Jul 2021 20:17:15 +0800 From: Yunsheng Lin To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH rfc v3 0/4] add frag page support in page pool Date: Mon, 12 Jul 2021 20:16:31 +0800 Message-ID: <1626092196-44697-1-git-send-email-linyunsheng@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds frag page support in page pool and enable skb's page frag recycling based on page pool in hns3 drvier. RFC v3: 1. Implement the semantic of "page recycling only wait for the page pool user instead of all user of a page" 2. Support the frag allocation of different sizes 3. Merge patch 4 & 5 to one patch as it does not make sense to use page_pool_dev_alloc_pages() API directly with elevated refcnt. 4. other minor comment suggested by Alexander. RFC v2: 1. Split patch 1 to more reviewable one. 2. Repurpose the lower 12 bits of the dma address to store the pagecnt_bias as suggested by Alexander. 3. support recycling to pool->alloc for elevated refcnt case too. Yunsheng Lin (4): page_pool: keep pp info as long as page pool owns the page page_pool: add interface for getting and setting pagecnt_bias page_pool: add frag page recycling support in page pool net: hns3: support skb's frag page recycling based on page pool drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 79 +++++++++++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 + drivers/net/ethernet/marvell/mvneta.c | 6 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/ethernet/ti/cpsw.c | 2 +- drivers/net/ethernet/ti/cpsw_new.c | 2 +- include/linux/skbuff.h | 4 +- include/net/page_pool.h | 58 +++++++-- net/core/page_pool.c | 155 +++++++++++++++++++++--- 9 files changed, 267 insertions(+), 44 deletions(-) -- 2.7.4