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 02E3FA0C4B; Sat, 6 Nov 2021 09:39:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CC4F4067C; Sat, 6 Nov 2021 09:39:58 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 97C8240151 for ; Sat, 6 Nov 2021 09:39:56 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 55FE17F52E; Sat, 6 Nov 2021 11:39:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 55FE17F52E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1636187995; bh=CpSEzcTzGqdNgD5KmyWLI6E1kx+RDmoqkXuBlZVDcLU=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=uVfpqRp2NniUSrnCRE4bqn+j3lwgE3hiYnIZjFXiDiT1VnRp4OEK6nLgwBpCLbKcq yR2ckMOZdLtguDCDKco+0viLebXSubPsmg8UW8lwm3kAq+DISTGBYZ4392mNcKwQS1 StPoG95J0NDj95EHDf92XNaoYKPzAUm9glD3yR/4= To: Thomas Monjalon , Viacheslav Galaktionov , Ferruh Yigit Cc: Ivan Malov , David Marchand , dev@dpdk.org References: <20211105083333.1960017-1-andrew.rybchenko@oktetlabs.ru> <20211105083333.1960017-5-andrew.rybchenko@oktetlabs.ru> <54c1c7a5-9093-5126-4984-c9dafa8f4cf6@intel.com> <2688687.HSkE7oWr40@thomas> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Sat, 6 Nov 2021 11:39:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <2688687.HSkE7oWr40@thomas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 4/4] net/sfc: support regioned NIC DMA memory mapping type 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 Sender: "dev" On 11/5/21 11:14 PM, Thomas Monjalon wrote: > 05/11/2021 20:05, Ferruh Yigit: >> On 11/5/2021 8:33 AM, Andrew Rybchenko wrote: >>> From: Viacheslav Galaktionov >>> >>> DMA on SN1022 SoC requires extra mapping of the memory via MCDI. >>> The mapping is expensive on datapath, so make it a build-time option. >>> Usage of build-time option is acceptable since it is required in >>> very specific case only. >>> >> >> Not really sure if it is acceptable. >> >> The change does not look trivial, it touches in many areas with ifdef blocks, >> cluttering the code. >> >> Even it is in datapath, it should be possible to have another datapath >> function that is only set for the specific device, even perhaps by automatically >> detecting the device, not needing a compile or runtime flag. > > Indeed compilation option is forbidden. > Function pointer is a better choice. > Thanks for the feedback. Unfortunately expected.