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 E912BA0A0C; Mon, 19 Jul 2021 08:44:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC6E44068B; Mon, 19 Jul 2021 08:44:13 +0200 (CEST) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by mails.dpdk.org (Postfix) with ESMTP id 997A14067A for ; Mon, 19 Jul 2021 08:44:12 +0200 (CEST) Received: by mail-il1-f171.google.com with SMTP id p3so15034736ilg.8 for ; Sun, 18 Jul 2021 23:44:12 -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=ofmoZDSFsWBeR0DPtIxhqJBtHDreZpYG3MkjKbD+tik=; b=vYzRZySN13wCmpUpF5mhpDZOelIijWKq17GHnek1kpsoLBq12JSIlOJjyR9/4/fr0Y k/ibbU7U+zs2K1fHT333B765f+LvGxVsriPQTD3GNUFKK9tq+8Y4vGgObtPaYEYAg7KY rIhfikhoFrOsVpI9T7JDbzj59ze6Pc3QPSXfWwIVcCBUW2qA1KHaScVvKNY90bOwLBuW AF1ZgijmL7OfiVmsrmFgp0imOY+DF0IpOC+Ulg7awaNhDnbFvSuIXXPRrihotkUcRA/c iI3PXnOcD/qqojm6schdQlsk420oVxiETHlS6wC9BlqOvudzT73YNEzJ8o4/J+eYIBt1 +KfA== 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=ofmoZDSFsWBeR0DPtIxhqJBtHDreZpYG3MkjKbD+tik=; b=Awe6dJdfOIwjpzC3ppvuFsHxIQ8uiQAGgrSY9JwP68fEtwYr36b3ExlUl8CRV31sau Ju00sFxJkuEiKQVKIqbbpHFstDxIl82zGmggD5DTLME6HZGGKdQBbGFZd2lf2x6i3GaX sAOHphX+QpOeW75hg6c5Kl82wBIuhZh9go+SjvwVLSbl/wUgf/9MzgEej73Xxy6JwiIP ++wiTDMAe6RmhNmB5XjlA2pennjcSc06m/N6Zv11FnDFe9+OKM5e+S5ZqQC0/tMWtcF3 t+gyRqKyiF3/ci0K1ZX+b2BD7feTtrpK6IF+sVhWkauAPde80U0GnbpNsgyY71XRRmrU kmig== X-Gm-Message-State: AOAM533sEnORaEIXHkw80RvhzPHFBfLYsOaDOrAUaZXIVKm9c6jRorS/ Qu8lXrsgYXfU6XPVRAKVzf2W7D9XrYELkJpL94U= X-Google-Smtp-Source: ABdhPJwc8Zb8vGao1ESPvf04QMGVXq9h3yI5xMvyM6Ha98ZrXUgTbSRgYxykR2TKeGzOM/3p2AWH2NQUdumvEPMlPpw= X-Received: by 2002:a92:d946:: with SMTP id l6mr15698075ilq.162.1626677051871; Sun, 18 Jul 2021 23:44:11 -0700 (PDT) MIME-Version: 1.0 References: <20210716170236.2297967-1-ganapati.kundapura@intel.com> In-Reply-To: <20210716170236.2297967-1-ganapati.kundapura@intel.com> From: Jerin Jacob Date: Mon, 19 Jul 2021 12:13:46 +0530 Message-ID: To: Ganapati Kundapura Cc: "Jayatheerthan, Jay" , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] eventdev: configure the Rx event buffer size 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, Jul 16, 2021 at 10:33 PM Ganapati Kundapura wrote: > > As of now Rx event buffer size is static and set to 128. > > This patch sets the Rx event buffer size to 192, configurable > at compile time and also errors out at run time if Rx event > buffer size is configured more than 16 bits. > > Signed-off-by: Ganapati Kundapura > --- > config/rte_config.h | 1 + > lib/eventdev/rte_event_eth_rx_adapter.c | 14 +++++++++++++- > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/config/rte_config.h b/config/rte_config.h > index 590903c..3d938c8 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -77,6 +77,7 @@ > #define RTE_EVENT_ETH_INTR_RING_SIZE 1024 > #define RTE_EVENT_CRYPTO_ADAPTER_MAX_INSTANCE 32 > #define RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE 32 > +#define RTE_EVENT_ETH_RX_ADAPTER_BUFFER_SIZE 128 We are limiting any configuration to rte_config.h file. Could you make it dynamic with the default value and application can pass the value kind of scheme? > > /* rawdev defines */ > #define RTE_RAWDEV_MAX_DEVS 64 > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c > index 13dfb28..0fe265e 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -25,7 +25,12 @@ > > #define BATCH_SIZE 32 > #define BLOCK_CNT_THRESHOLD 10 > -#define ETH_EVENT_BUFFER_SIZE (4*BATCH_SIZE) > + > +#define ETH_EVENT_BUFFER_SIZE \ > + (RTE_EVENT_ETH_RX_ADAPTER_BUFFER_SIZE + BATCH_SIZE + BATCH_SIZE) > + > +#define MAX_ETH_EVENT_BUFFER_SIZE (USHRT_MAX - BATCH_SIZE - BATCH_SIZE) > + > #define MAX_VECTOR_SIZE 1024 > #define MIN_VECTOR_SIZE 4 > #define MAX_VECTOR_NS 1E9 > @@ -2165,6 +2170,13 @@ rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id, > return -EEXIST; > } > > + if (RTE_DIM(rx_adapter->event_enqueue_buffer.events) > USHRT_MAX) { > + RTE_EDEV_LOG_ERR("CONFIG_RTE_ADPTR_ETH_EVENT_BUFFER_SIZE is " > + "greater than max allowed value %u", > + MAX_ETH_EVENT_BUFFER_SIZE); > + return -EINVAL; > + } > + > socket_id = rte_event_dev_socket_id(dev_id); > snprintf(mem_name, ETH_RX_ADAPTER_MEM_NAME_LEN, > "rte_event_eth_rx_adapter_%d", > -- > 2.6.4 >