From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E235A034C; Tue, 30 Aug 2022 15:07:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5CEC40F18; Tue, 30 Aug 2022 15:07:56 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2076.outbound.protection.outlook.com [40.107.212.76]) by mails.dpdk.org (Postfix) with ESMTP id 1F1E040F17 for ; Tue, 30 Aug 2022 15:07:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xfo3L2r+gPsdJqQMoBs1+JRzXjS44ZU81IbnuQfAEOoaiH4ezxfZkEJW/Pux0lZm02RKKBbrdZepS/oowl7okEaCEpcCrVIXYkaDs2+ybUEHzqcq3ShjtDOnJXYiFcrAZOmcGAJ3HMgSeJZhn6Mp7y4E56NiTJCIj85L4kJI6M64ZpYaN8oddxhAiNluWYGt55ICbBs/EPduMz85Cfhqk3nb3/lPXZHusvgwYIjVXaCXHgCufX+KE3va6K3+A3vfUTHfPHIHPVVJEIyjsEmos/OlHMtcc3NcJbg9JR9g6vnLKn40/rzFTC6qg8EM1GT0owgYReHAGSNsih9kF/qfmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WPl5JWb9iQfwWl8FbwAk/R4+l0zuRdwflQ6ccN8bK5k=; b=P21ZIPbD8l30ka9yKRb0cxFACXaMtzxoE0PMoXUCx0Dghe/ox9Ken0yr6TcQyv+5ta6YbIWjx88zjHr6OsBFyIHC0X/gzfFf3aAidMDxQBKe+qSgzgKPlFDHR3peBudfI0Z16UXIa3ulUFUjF6DnEhHSOmjje4bsmx1ANWWk16ShrGIrxGuTJyTrz/LbcfglWbzRDRxadtyfXApD2vy2OMG2zuQJnjs2QaC8NNz4WYuVmNYjtSRNP3qF25lDBkBYPfjZJej2nHeeGHgDiUeEcV9ujkL9ucqRDYb+yeuRfKJSJkm6dzioeZnhIcrJ9LGzf7vcKKV7gwPkp0MKkb+Hag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=marvell.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WPl5JWb9iQfwWl8FbwAk/R4+l0zuRdwflQ6ccN8bK5k=; b=kI/dgKKuvpCC8jKrY4UvYg6d7ZGaXVCI6xulnq3lmR1jGk77ShwAt+zW96+KIeNXiiADEQIlNZ1uuJS4oqgXmijORJsYh6F+ur2UAymLCKDmE51XDeyqmj6SzKXK+gnqU5bN3Gj1iCFl85eXtKLkk7xhx7epi/Kc49K6+gYJJAE= Received: from BN0PR03CA0019.namprd03.prod.outlook.com (2603:10b6:408:e6::24) by PH0PR02MB7655.namprd02.prod.outlook.com (2603:10b6:510:57::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Tue, 30 Aug 2022 13:07:52 +0000 Received: from BN1NAM02FT060.eop-nam02.prod.protection.outlook.com (2603:10b6:408:e6:cafe::56) by BN0PR03CA0019.outlook.office365.com (2603:10b6:408:e6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend Transport; Tue, 30 Aug 2022 13:07:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch02.xlnx.xilinx.com; pr=C Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT060.mail.protection.outlook.com (10.13.3.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5566.15 via Frontend Transport; Tue, 30 Aug 2022 13:07:51 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 30 Aug 2022 14:07:50 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Tue, 30 Aug 2022 14:07:50 +0100 Envelope-to: sthotton@marvell.com, stephen@networkplumber.org, dev@dpdk.org, jerinj@marvell.com, olivier.matz@6wind.com, thomas@monjalon.net, bruce.richardson@intel.com, mb@smartsharesystems.com Received: from [10.71.194.74] (port=3079) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oT0y4-0003zM-8B; Tue, 30 Aug 2022 14:07:50 +0100 Message-ID: <28868fce-0843-18e1-234b-27882e9ae16c@xilinx.com> Date: Tue, 30 Aug 2022 14:07:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH] mbuf: add mbuf physical address field to dynamic field Content-Language: en-US To: Shijith Thotton , CC: , , , , Bruce Richardson , =?UTF-8?Q?Morten_Br=c3=b8rup?= References: <20220630094538.5b27d0c6@hermes.local> <20220701122434.1887783-1-sthotton@marvell.com> From: Ferruh Yigit In-Reply-To: <20220701122434.1887783-1-sthotton@marvell.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b28f684-6f07-463a-8f99-08da8a88a4d8 X-MS-TrafficTypeDiagnostic: PH0PR02MB7655:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oJyPPn0X2QtA3xouNbMeEXs2aQ7XwlpzVsBK279iArdecjSlMQeQlIKJ0HeehktqzYDlUOkl7APteezFqeusOuiHWlHS/pPRMXtslCdvwYyLkpcyBoAqk9dim0fCBkhpZSQvhJ/9oyvFMUyACxLcu3s0iOlJlVLlRN+PtBfi7ENFk8qx9/MXsmTV7ZK4vStE4NAf+TOgNxjNirfFPLTH5b0uC6bb3ajHxYA1evFQpNV1eDz+Dh6eCzsZ+4S4zREFM9gYCYjAV+Lrjv00PL5IwgDxFDj2PVoe5uuA1hTDsIm6Gxy7nnvnR1uMZAIlwbcgtWDE22yNvRX/TnQCkbFtn5p+0qv16KdtyPNcZBSBrNqmraFis1DmKdbQ2c0Lj515JLyQ6k5u7Q/BCXOjucDdN0fZYxb6xS7UczcBC9iaX//57NCb2Bzq0VUn514jff6LIdVwA4yQaBhmHv//1MvkpaEQeA0cP15w/ZvK/aIMrKIRij0mjDAKOp/MMyzy1dqsZz9Au2xKFoYx7FvNV8qNXs7384x4AXnz8by5M0JQHkA7h2Pk9Wch80bldQck0fwp53GEwnbqKziQ1tFCYrtoim+te7CIoImPyZihpSIdR4MinV+sm8NnEHQqDap3LuaGfraf92Trt/SdaCCbLPbbV0CzK7Cvl9DeIh2VMwUX3JBAZkpMuO9LHsWvsvHnNVgCWPUBmw8+Tan++t0J97KtI0Ddl/nu33ib3YrIfS20RNCLDPK1wOh4gy+AwnQVukGMD3LAl7KrD81EJfUh62905XCIq8P94G6OD8ozo1rLH6PzHNRcNfujKw4/0lY6f5nBW87FFwsgV5bVDWKLEypoAKiYdem72sb5ssERB7yZ2NE= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(346002)(376002)(136003)(396003)(39860400002)(46966006)(40470700004)(36840700001)(478600001)(8676002)(4326008)(70586007)(316002)(110136005)(54906003)(82310400005)(40480700001)(40460700003)(8936002)(9786002)(5660300002)(2906002)(44832011)(70206006)(7636003)(356005)(31686004)(82740400003)(31696002)(36756003)(53546011)(336012)(26005)(426003)(47076005)(186003)(2616005)(6666004)(41300700001)(36860700001)(50156003)(2101003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2022 13:07:51.0469 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b28f684-6f07-463a-8f99-08da8a88a4d8 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT060.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR02MB7655 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 7/1/2022 1:24 PM, Shijith Thotton wrote: >>> If all devices are configured to run in IOVA mode as VA, physical >>> address field of mbuf (buf_iova) won't be used. In such cases, buf_iova >>> space is free to use as a dynamic field. So a new dynamic field member >>> (dynfield2) is added in mbuf structure to make use of that space. >>> >>> A new mbuf flag RTE_MBUF_F_DYNFIELD2 is introduced to help identify the >>> mbuf that can use dynfield2. >>> >>> Signed-off-by: Shijith Thotton >> >> This seems like a complex and potentially error prone way to do this. >> What is the use case? >> > > PCI drivers with the flag RTE_PCI_DRV_NEED_IOVA_AS_VA only works in IOVA mode as > VA. buf_iova field of mbuf is not used by those PMDs and can be used as a > dynamic area to save space. > 'RTE_PCI_DRV_NEED_IOVA_AS_VA' means device can *only* work in RTE_IOVA_VA mode, right? Although there are many devices that support RTE_IOVA_VA mode, only a few of them works *only* with RTE_IOVA_VA mode, rest can prefer to use RTE_IOVA_PA or RTE_IOVA_VA. Also using KNI forces to use RTE_IOVA_PA mode. And moving 'buf_iova' filed out of first cache will impact the performance for RTE_IOVA_PA mode. Since KNI is going away and vfio is more preferred way, it can be OK to make 'buf_iova' dynamic filed in long term, but I think it is better to do this slowly, like should we wait for KNI to go away first? >> How much of a performance gain? > > No change in performance.