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 EDAE0A00C5; Wed, 14 Sep 2022 17:21:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 912CE4021D; Wed, 14 Sep 2022 17:21:12 +0200 (CEST) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by mails.dpdk.org (Postfix) with ESMTP id 9A5E640156 for ; Wed, 14 Sep 2022 17:21:10 +0200 (CEST) Received: by mail-qk1-f181.google.com with SMTP id s9so8860030qkg.4 for ; Wed, 14 Sep 2022 08:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=j4QbMNsomeLIA0ZLrAroAumO5NccJQcAucaraeN3Qqc=; b=n3cPiYGviDlk5f1TT2DhpVEx6n4mB60WCVKQMjz40dpz88PBbsbinHkEzOjzyDpX3+ LxxfbC9AhmhseP0G+Yb0NEzqFpYd+lUFyVnkPKlyGIRSyca23xkC8YBdRAuuGCmQ9Lm8 gpf9YRjK9GNO0IADlclQDWvEyhITywCeOUcDc9v7nQpWYDx6gjF/3yybnLQeJ/Q17mKv lB3iAO7S65h15XJAfZqoQic0oTDzmNpfDJIH2dUC/H1iyVIeMpGuGtcRQNc/2+AYi3iy E2S95guRbRPxhP2C+BEbAMc2/XKeFU2i6vQOI4NrMDSvnYv5N5FMm8SrFvvs3XDDV+py yfHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=j4QbMNsomeLIA0ZLrAroAumO5NccJQcAucaraeN3Qqc=; b=WlAH3HKCd6Yq6sc6dZXh9dn98n5mp1cB6d5DyjtyurwFgtvx9nxzpiEzuhieHaf+NL MlWoRSs8vndUyYVrw0Th39+UMh14BOf5pB+nSQ2JMHDUnuF68YmBx+Nkwm0XkIGCp7ap IP5wmhVKgjpmB0NJxFajY9lLeJ7MptF7/6Ip9mgw3aEyDZL3/x7n/oPfJdSlFHrYksCX ufONDnTICFeBxHZcpaDU7tpIT9yvuVAykvryBcvCNi6ORDwrmCAQR3BkXsS06XJ9faIC On9twFEW6oR+hp9rTBJd4t1ONmILzeXgFT+04fO7Cr/3VEEMIw7vMdoDQBIcyJeKxy8X FRbA== X-Gm-Message-State: ACgBeo2zqpfif5RfsTsq8PyoIMPS0ucnrJ7zAa8yTqbrh5sWcjkkZ1t/ nsgSBUPaoiLFGhlUwhEnvzUdeHT8FkVpmou9bao= X-Google-Smtp-Source: AA6agR46uHvkR5J0XRVrC275IIYDzPNYcIAchqPh2c9mCH1DEJnBUZ1yIL3N/9rOmkMwgGAkT6cu8yaEK4Uwwd5qrjg= X-Received: by 2002:a37:9ad5:0:b0:6cd:ef68:19a9 with SMTP id c204-20020a379ad5000000b006cdef6819a9mr16350042qke.22.1663168869896; Wed, 14 Sep 2022 08:21:09 -0700 (PDT) MIME-Version: 1.0 References: <20220909034219.4018966-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20220909034219.4018966-1-s.v.naga.harish.k@intel.com> From: Jerin Jacob Date: Wed, 14 Sep 2022 20:50:44 +0530 Message-ID: Subject: Re: [PATCH 1/3] eventdev/eth_tx: add queue start stop API To: Naga Harish K S V Cc: jay.jayatheerthan@intel.com, jerinj@marvell.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" 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 Fri, Sep 9, 2022 at 9:12 AM Naga Harish K S V wrote: > > This patch adds support to start or stop a particular queue > that is associated with the adapter. > > Start function enables the Tx Adapter to start enqueueing > packets to the Tx queue. > > Stop function stops the Tx Adapter from transmitting any > mbufs to the Tx queue. The Tx Adapter also frees any mbufs > that it may have buffered for this queue. All inflight packets > destined to the queue are freed until the queue is started again. > > Signed-off-by: Naga Harish K S V In general, new APIs look good to me if it is helping the SW driver. I will wait for comment from @Jayatheerthan, Jay Some comments below > --- > lib/eventdev/eventdev_pmd.h | 41 +++++++++ > lib/eventdev/rte_event_eth_tx_adapter.c | 114 +++++++++++++++++++++++- > lib/eventdev/rte_event_eth_tx_adapter.h | 39 ++++++++ > lib/eventdev/version.map | 2 + Please squash 3/3 to 1/3. Please update doc/guides/prog_guide/event_ethernet_tx_adapter.rst for new APIs doc for What is this API and when to use this API etc. > 4 files changed, 192 insertions(+), 4 deletions(-) > > diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h > index f514a37575..a27c0883c6 100644 > --- a/lib/eventdev/eventdev_pmd.h > +++ b/lib/eventdev/eventdev_pmd.h > @@ -1294,6 +1294,43 @@ typedef int (*eventdev_eth_tx_adapter_stats_reset_t)(uint8_t id, > typedef int (*eventdev_eth_tx_adapter_instance_get_t) > (uint16_t eth_dev_id, uint16_t tx_queue_id, uint8_t *txa_inst_id); > > +/** > + * Start a Tx queue that is assigned to TX adapter instance Tx adapter > + * > + * @param id > + * Adapter identifier > + * > + * @param eth_dev_id > + * Port identifier of Ethernet device > + * > + * @param tx_queue_id > + * Ethernet device TX queue index Tx > + * > + * @return > + * - 0: Success > + * - <0: Error code on failure > + */ > +typedef int (*eventdev_eth_tx_adapter_queue_start) > + (uint8_t id, uint16_t eth_dev_id, uint16_t tx_queue_id); > + > +/** > + * Stop a Tx queue that is assigned to TX adapter instance Tx > +int > +rte_event_eth_tx_adapter_queue_start(uint16_t eth_dev_id, uint16_t tx_queue_id) > +{ > + return txa_queue_state_set(eth_dev_id, tx_queue_id, true); Make it is NOP with return 0 if eventdev_eth_tx_adapter_queue_start is NULL > +} > + > +int > +rte_event_eth_tx_adapter_queue_stop(uint16_t eth_dev_id, uint16_t tx_queue_id) > +{ > + return txa_queue_state_set(eth_dev_id, tx_queue_id, false); Make it is NOP with return 0 if eventdev_eth_tx_adapter_queue_start is NULL > +}