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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51FAEC0015E for ; Fri, 28 Jul 2023 12:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236574AbjG1Mg7 (ORCPT ); Fri, 28 Jul 2023 08:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236464AbjG1Mg4 (ORCPT ); Fri, 28 Jul 2023 08:36:56 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7951C26BC; Fri, 28 Jul 2023 05:36:53 -0700 (PDT) Received: from dggpemm500005.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RC6W25pKwztRTk; Fri, 28 Jul 2023 20:33:34 +0800 (CST) Received: from [10.69.30.204] (10.69.30.204) 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.2507.27; Fri, 28 Jul 2023 20:36:51 +0800 Subject: Re: [PATCH net-next 5/9] page_pool: don't use driver-set flags field directly To: Alexander Lobakin , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: Maciej Fijalkowski , Larysa Zaremba , Alexander Duyck , Jesper Dangaard Brouer , Ilias Apalodimas , Simon Horman , , References: <20230727144336.1646454-1-aleksander.lobakin@intel.com> <20230727144336.1646454-6-aleksander.lobakin@intel.com> From: Yunsheng Lin Message-ID: Date: Fri, 28 Jul 2023 20:36:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20230727144336.1646454-6-aleksander.lobakin@intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 On 2023/7/27 22:43, Alexander Lobakin wrote: > > struct page_pool { > struct page_pool_params p; > - long pad; > + > + bool dma_map:1; /* Perform DMA mapping */ > + enum { > + PP_DMA_SYNC_ACT_DISABLED = 0, /* Driver didn't ask to sync */ > + PP_DMA_SYNC_ACT_DO, /* Perform DMA sync ops */ > + } dma_sync_act:1; > + bool page_frag:1; /* Allow page fragments */ > Isn't it more common or better to just remove the flags field in 'struct page_pool_params' and pass the flags by parameter like below, so that patch 4 is not needed? struct page_pool *page_pool_create(const struct page_pool_params *params, unsigned int flags);