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 BF239A0C43; Thu, 26 Aug 2021 14:38:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8378440689; Thu, 26 Aug 2021 14:38:11 +0200 (CEST) Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mails.dpdk.org (Postfix) with ESMTP id 9624F40140; Thu, 26 Aug 2021 14:38:10 +0200 (CEST) Received: by mail-il1-f180.google.com with SMTP id v2so3051901ilg.12; Thu, 26 Aug 2021 05:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2HdRfUtiC6cderGRf2D55eiZLGlqBR1uY4vD+E4tJ0M=; b=cxCWg4Be/k/xOjW41DS3I3ipUyZIe4sre8U33nvhbyr1W5GWf96NMEfymGKleyRL8B hObIV8JIYLiJ3s3qIG6scYIi36Tup5LPL6i+JUNazDNOpHWqk2pfiGefKOW2ZS7CLBKl TFAwsc944k2C5kBf3I8ajO2WW8IZZPFJyIQZujmr+V1KeRvVSH08mUiTFjChMwzKKYuz DRXy1haIDAyvTTecYNV2kF5zyi7wtWNQfA0RZ3vwqDRb3hE9WAZhPPSLqadJKVIs4xio XRemaLH4OEHi/qG9cayJTAI0z2YYDlpCYQub4HUA1cIVgv5Gg+NEzMkMotC4ZE8HXj4l s1Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2HdRfUtiC6cderGRf2D55eiZLGlqBR1uY4vD+E4tJ0M=; b=SEAkpTbOjccPcMH37A3Um9SOH3rJ1lDklcQDDYd6U8DxFjWlF7g3g+b5r+o2MZxFWY JNxkLD/zCfXnLMKFFfXoXryzBeujOej0kNLBHI4e7rA4X8oLvBoK2p4BynHx9O1hpXtY UChlwj4jJZkuJogJtVmt0iTWjwwL+swl4oIbetAyyFgVWDnhATUJVL2YEANoyNHsOoh5 NUbCaTRgERJesqnbqOnBYe86EsQqHNPngFcSI6sCsuENgAYqizwQAY8Ny5P6yKjlOAcW tpundmcPajh05UYHUojNXin8bBf6k+DKYwuKvfdrsheR5GC1mjgmdCbr5b66F7uUILtJ U2Ww== X-Gm-Message-State: AOAM531ldLoEoSYGuVKex8M6L4CEC+YIbJ/vDGHKax9I4XnxrHnhpHak oNFT5hGSz8fjwqVJZ8aCbtEj8MtTlaTp0EzPGco= X-Google-Smtp-Source: ABdhPJwjX5+A3fEF3Q7TkXrFuto1EZQPpkDxnAIzcsc1ByDuj+UebVIXvOh15IgjtRfewOt+8v1m2AmzAOhF1/C2MKk= X-Received: by 2002:a92:a012:: with SMTP id e18mr2398587ili.271.1629981489838; Thu, 26 Aug 2021 05:38:09 -0700 (PDT) MIME-Version: 1.0 References: <20210820162834.12544-1-konstantin.ananyev@intel.com> In-Reply-To: <20210820162834.12544-1-konstantin.ananyev@intel.com> From: Jerin Jacob Date: Thu, 26 Aug 2021 18:07:43 +0530 Message-ID: To: Konstantin Ananyev Cc: dpdk-dev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Qiming Yang , Qi Zhang , Beilei Xing , techboard@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [RFC 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" On Fri, Aug 20, 2021 at 9:59 PM Konstantin Ananyev wrote: > > NOTE: This is just an RFC to start further discussion and collect the feedback. > Due to significant amount of work, changes required are applied only to two > PMDs so far: net/i40e and net/ice. > So to build it you'll need to add: > -Denable_drivers='common/*,mempool/*,net/ice,net/i40e' > to your config options. > > That approach was selected to avoid(/minimize) possible performance losses. > > So far I done only limited amount functional and performance testing. > Didn't spot any functional problems, and performance numbers > remains the same before and after the patch on my box (testpmd, macswap fwd). Based on testing on octeonxt2. We see some regression in testpmd and bit on l3fwd too. Without patch: 73.5mpps/core in testpmd iofwd With out patch: 72 5mpps/core in testpmd iofwd Based on my understanding it is due to additional indirection. My suggestion to fix the problem by: Removing the additional `data` redirection and pull callback function pointers back and keep rest as opaque as done in the existing patch like [1] I don't believe this has any real implication on future ABI stability as we will not be adding any new item in rte_eth_fp in any way as new features can be added in slowpath rte_eth_dev as mentioned in the patch. [2] is the patch of doing the same as I don't see any performance regression after [2]. [1] - struct rte_eth_burst_api { - struct rte_eth_fp { + void *data; rte_eth_rx_burst_t rx_pkt_burst; /**< PMD receive function. */ rte_eth_tx_burst_t tx_pkt_burst; @@ -85,8 +100,19 @@ struct rte_eth_burst_api { /**< Check the status of a Rx descriptor. */ rte_eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */ + /** + * User-supplied functions called from rx_burst to post-process + * received packets before passing them to the user + */ + struct rte_eth_rxtx_callback + *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; + /** + * User-supplied functions called from tx_burst to pre-process + * received packets before passing them to the driver for transmission. + */ + struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; uintptr_t reserved[2]; -} __rte_cache_min_aligned; +} __rte_cache_aligned; [2] https://pastebin.com/CuqkrCW4