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 C2B94A034F; Mon, 11 Oct 2021 11:22:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57A40410EA; Mon, 11 Oct 2021 11:22:53 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 04F2A410E6 for ; Mon, 11 Oct 2021 11:22:51 +0200 (CEST) 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)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 624557F502; Mon, 11 Oct 2021 12:22:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 624557F502 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1633944171; bh=YzR5d7e6UNLYMdzqV9NWiuEPfm6efl3vRcb4xOr7K9g=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=ZjKTBOY3q2gdziWroRxraAcq0PeTQlfONvbcQqZkEzYo/ZHkRej5lBH+Gg4VV37nb 5IjbOWTCJO6ymjySeOTV16DO1TplvtEa/rELteAhMLOsHUcMPkwzCYtp554vq224TO FqW93SUikj2P4hqa/mIvdYqpX5M8E87Y2/YrCH4Y= To: Konstantin Ananyev , dev@dpdk.org Cc: xiaoyun.li@intel.com, anoobj@marvell.com, jerinj@marvell.com, ndabilpuram@marvell.com, adwivedi@marvell.com, shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com, john.miller@atomicrules.com, irusskikh@marvell.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, rahul.lakkireddy@chelsio.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, haiyue.wang@intel.com, johndale@cisco.com, hyonkim@cisco.com, qi.z.zhang@intel.com, xiao.w.wang@intel.com, humin29@huawei.com, yisen.zhuang@huawei.com, oulijun@huawei.com, beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, matan@nvidia.com, viacheslavo@nvidia.com, sthemmin@microsoft.com, longli@microsoft.com, heinrich.kuhn@corigine.com, kirankumark@marvell.com, mczekaj@marvell.com, jiawenwu@trustnetic.com, jianwang@trustnetic.com, maxime.coquelin@redhat.com, chenbo.xia@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com, mdr@ashroe.eu, jay.jayatheerthan@intel.com References: <20211004135603.20593-1-konstantin.ananyev@intel.com> <20211007112750.25526-1-konstantin.ananyev@intel.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <30795fb2-b579-ca13-9921-a30f903f0df9@oktetlabs.ru> Date: Mon, 11 Oct 2021 12:22:51 +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: <20211007112750.25526-1-konstantin.ananyev@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 0/7] hide eth dev related structures 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" Hi Konstantin, On 10/7/21 2:27 PM, Konstantin Ananyev wrote: > v5 changes: > - Fix spelling (Thomas/David) > - Rename internal helper functions (David) > - Reorder patches and update commit messages (Thomas) > - Update comments (Thomas) > - Changed layout in rte_eth_fp_ops, to group functions and > related data based on their functionality: > first 64B line for Rx, second one for Tx. > Didn't observe any real performance difference comparing to > original layout. Though decided to keep a new one, as it seems > a bit more plausible. > > v4 changes: > - Fix secondary process attach (Pavan) > - Fix build failure (Ferruh) > - Update lib/ethdev/verion.map (Ferruh) > Note that moving newly added symbols from EXPERIMENTAL to DPDK_22 > section makes checkpatch.sh to complain. > > v3 changes: > - Changes in public struct naming (Jerin/Haiyue) > - Split patches > - Update docs > - Shamelessly included Andrew's patch: > https://patches.dpdk.org/project/dpdk/patch/20210928154856.1015020-1-andrew.rybchenko@oktetlabs.ru/ > into these series. > I have to do similar thing here, so decided to avoid duplicated effort. > > The aim of these patch series is to make rte_ethdev core data structures > (rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback, etc.) internal to > DPDK and not visible to the user. > That should allow future possible changes to core ethdev related structures > to be transparent to the user and help to improve ABI/API stability. > Note that current ethdev API is preserved, but it is a formal ABI break. > > The work is based on previous discussions at: > https://www.mail-archive.com/dev@dpdk.org/msg211405.html > https://www.mail-archive.com/dev@dpdk.org/msg216685.html > and consists of the following main points: > 1. Copy public 'fast' function pointers (rx_pkt_burst(), etc.) and > related data pointer from rte_eth_dev into a separate flat array. > We keep it public to still be able to use inline functions for these > 'fast' calls (like rte_eth_rx_burst(), etc.) to avoid/minimize slowdown. > Note that apart from function pointers itself, each element of this > flat array also contains two opaque pointers for each ethdev: > 1) a pointer to an array of internal queue data pointers > 2) points to array of queue callback data pointers. > Note that exposing this extra information allows us to avoid extra > changes inside PMD level, plus should help to avoid possible > performance degradation. > 2. Change implementation of 'fast' inline ethdev functions > (rte_eth_rx_burst(), etc.) to use new public flat array. > While it is an ABI breakage, this change is intended to be transparent > for both users (no changes in user app is required) and PMD developers > (no changes in PMD is required). > One extra note - with new implementation RX/TX callback invocation > will cost one extra function call with this changes. That might cause > some slowdown for code-path with RX/TX callbacks heavily involved. > Hope such trade-off is acceptable for the community. > 3. Move rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback and related > things into internal header: . > > That approach was selected to: > - Avoid(/minimize) possible performance losses. > - Minimize required changes inside PMDs. > > Performance testing results (ICX 2.0GHz, E810 (ice)): > - testpmd macswap fwd mode, plus > a) no RX/TX callbacks: > no actual slowdown observed > b) bpf-load rx 0 0 JM ./dpdk.org/examples/bpf/t3.o: > ~2% slowdown > - l3fwd: no actual slowdown observed > > Would like to thank everyone who already reviewed and tested previous > versions of these series. All other interested parties please don't be shy > and provide your feedback. Many thanks for the very good patch series. I hope we'll make it to be included in 21.11. If you need any help with cosmetic fixes suggested by me on review, please, let me know. Andrew.