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 BA03CA0C47; Tue, 5 Oct 2021 11:54:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E7CC412F0; Tue, 5 Oct 2021 11:54:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 737B04129A for ; Tue, 5 Oct 2021 11:54:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633427657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v5Fd4W/oZ2P/JoUTk2WX3vC4R3v9mYMb28oyNHC9cQw=; b=JckQrroI8F7QT051Cgh5AGkJhVdfsIgp1Wuow6gZltLf7DkxxYGXsFQd8JsEzh7MfNZ272 6QMS4FtQPUJUkwJNniUC5usd7k3olwbx+tVI4cH48rCpOyHYf+faap91aRxMBeotqugLgZ 8V7gg61KwqqJWGS77ravNO9P7abuF1s= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-508-sa5rHKraN7G5v-WCWUkdHg-1; Tue, 05 Oct 2021 05:54:16 -0400 X-MC-Unique: sa5rHKraN7G5v-WCWUkdHg-1 Received: by mail-lf1-f69.google.com with SMTP id bp11-20020a056512158b00b003fc7d722819so16488980lfb.7 for ; Tue, 05 Oct 2021 02:54:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v5Fd4W/oZ2P/JoUTk2WX3vC4R3v9mYMb28oyNHC9cQw=; b=TXKtUA4aTkNn2LMbXCfn3SBIhamH4YFeK7TNxWjVkH9BmUhv+IzfThyf/X1ChyyxY9 Nunkhentl37/SzbCil4h3qKOqYFf6sXbXr4sJ5gjKj+SpjlQzWo/28/XhNsTXt/wSTw9 z8WrU5s4/arMLgwUZaCdk3mnPG/rpcywcP0TaViFi/WHc0gLEhoof/vemEX31E3aUEaM p6wL61/UgStXLD6fQyOrQvMN11bn9qY4v/L4AIMN4pGBDaDgJO0OY1tQmuZJw8rIvXfX zbaqZfsVh5j76TtgsLDOk4HWAeTcoKkT7+ysQvEWX9QWVBkZ9xla1frnFvbWq2/OCqsk GhDQ== X-Gm-Message-State: AOAM531/f6k8/fCyZGxV86uOmKkrNOVr3BBukf4VdUXuqRrGPGmftooZ dOiG8znEepJ2j1PGY2mnURICLq74eRl96xi+9OSglH7sS4roJ52TYZJLkxJ62gSscmhuiZhpSAE SSq87z9EEIzoim9y1q/s= X-Received: by 2002:a2e:2243:: with SMTP id i64mr21048322lji.333.1633427654447; Tue, 05 Oct 2021 02:54:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqyW54o5MBgp0KCinNb2Tb4/y81rTOY4dyWfPKBZMsqIp8JTLmkZk6xlBadzsI2d/qzior/h7uu1a3TMz4E+w= X-Received: by 2002:a2e:2243:: with SMTP id i64mr21048269lji.333.1633427654202; Tue, 05 Oct 2021 02:54:14 -0700 (PDT) MIME-Version: 1.0 References: <20211001140255.5726-1-konstantin.ananyev@intel.com> <20211004135603.20593-1-konstantin.ananyev@intel.com> <20211004135603.20593-5-konstantin.ananyev@intel.com> In-Reply-To: <20211004135603.20593-5-konstantin.ananyev@intel.com> From: David Marchand Date: Tue, 5 Oct 2021 11:54:02 +0200 Message-ID: To: Konstantin Ananyev Cc: dev , Xiaoyun Li , Anoob Joseph , Jerin Jacob Kollanukkaran , Nithin Dabilpuram , Ankur Dwivedi , Shepard Siegel , Ed Czeck , John Miller , Igor Russkikh , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , "Wang, Haiyue" , John Daley , Hyong Youb Kim , Qi Zhang , Xiao Wang , "humin (Q)" , Yisen Zhuang , oulijun , Beilei Xing , Jingjing Wu , Qiming Yang , Matan Azrad , Slava Ovsiienko , Stephen Hemminger , Long Li , heinrich.kuhn@corigine.com, Kiran Kumar Kokkilagadda , Andrew Rybchenko , Maciej Czekaj , Jiawen Wu , Jian Wang , Maxime Coquelin , "Xia, Chenbo" , Thomas Monjalon , "Yigit, Ferruh" , Ray Kinsella , "Jayatheerthan, Jay" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4 4/7] ethdev: make burst functions to use new flat array 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 Mon, Oct 4, 2021 at 3:59 PM Konstantin Ananyev wrote: > > Rework 'fast' burst functions to use rte_eth_fp_ops[]. > While it is an API/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 thing to note - RX/TX callback invocation will cause extra > function call with these changes. That might cause some insignificant > slowdown for code-path where RX/TX callbacks are heavily involved. > > Signed-off-by: Konstantin Ananyev > --- > lib/ethdev/ethdev_private.c | 31 +++++ > lib/ethdev/rte_ethdev.h | 242 ++++++++++++++++++++++++++---------- > lib/ethdev/version.map | 5 + > 3 files changed, 210 insertions(+), 68 deletions(-) > > diff --git a/lib/ethdev/ethdev_private.c b/lib/ethdev/ethdev_private.c > index 3eeda6e9f9..27d29b2ac6 100644 > --- a/lib/ethdev/ethdev_private.c > +++ b/lib/ethdev/ethdev_private.c > @@ -226,3 +226,34 @@ eth_dev_fp_ops_setup(struct rte_eth_fp_ops *fpo, > fpo->txq.data = dev->data->tx_queues; > fpo->txq.clbk = (void **)(uintptr_t)dev->pre_tx_burst_cbs; > } > + > +uint16_t > +__rte_eth_rx_epilog(uint16_t port_id, uint16_t queue_id, > + struct rte_mbuf **rx_pkts, uint16_t nb_rx, uint16_t nb_pkts, > + void *opaque) > +{ > + const struct rte_eth_rxtx_callback *cb = opaque; > + > + while (cb != NULL) { > + nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx, > + nb_pkts, cb->param); > + cb = cb->next; > + } > + > + return nb_rx; > +} This helper name is ambiguous. Maybe the intent was to have a generic place holder for updates in future releases. But in this series, __rte_eth_rx_epilog is invoked only if a rx callback is registered, under #ifdef RTE_ETHDEV_RXTX_CALLBACKS. I'd prefer we call it a spade, i.e. rte_eth_call_rx_callbacks, and it does not need to be advertised as internal. > + > +uint16_t > +__rte_eth_tx_prolog(uint16_t port_id, uint16_t queue_id, > + struct rte_mbuf **tx_pkts, uint16_t nb_pkts, void *opaque) > +{ > + const struct rte_eth_rxtx_callback *cb = opaque; > + > + while (cb != NULL) { > + nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts, > + cb->param); > + cb = cb->next; > + } > + > + return nb_pkts; > +} Idem, rte_eth_call_tx_callbacks. -- David Marchand