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 E53D8A034F; Mon, 30 Aug 2021 11:41:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CA4B4115A; Mon, 30 Aug 2021 11:41:44 +0200 (CEST) Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) by mails.dpdk.org (Postfix) with ESMTP id 8B77A41155 for ; Mon, 30 Aug 2021 11:41:43 +0200 (CEST) Received: by mail-il1-f175.google.com with SMTP id l10so15303090ilh.8 for ; Mon, 30 Aug 2021 02:41:43 -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=KjhbWkcs/iMzaWcVPf8wKVG6vf+lr4BQjESYqRmi378=; b=RoGwUf7FiZlnFVBC/MNGIv4IFV5J+ndnlmT93mo6LYJFjCgdOV4sRz20nWN10movjA WoFVwJZZVTOw6RGtv9dP5MdGK/z6vPsrFYljBKVmThVQLZVoX2nOAERJ+tn0n3o8EB27 6B2/SpfIqH+28BX2kFmRglGwM883IdoOg3d6wV/pdGqUowUEhyk2VAvIKw5ugDos2Dbg 8EH1Vu5dAsHCPyC39QbUz7cAI6avdd1/NqCJlc2gmo1nWBBO/M1Ef0PBg1khp+Z+Dwlw 3PXhgEm/MJJsOKkOiB3xd7Ok085ckxILOqMNc49zxN4cnZD9OL4hFpRjb+YKNemSCq/S xB+A== 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=KjhbWkcs/iMzaWcVPf8wKVG6vf+lr4BQjESYqRmi378=; b=Ds8c0ddERB5OKfNGGY5Vbsj06ddEzl4pyy8In2fYQJkXwWx1aUVEnLvX1PUvb32Gtd siHApKLplYPTQdWiNgaL98OD+VMqOgTdFLQJMw/YCyuoB5noQ6qbuTXtAE/k82ctEBLL lv/xEsAAPqBsKSnQLDSZthR9GscdgT+2ffyu/t6nc3tpnonLx595GBuWAs6Cs7WxZlCk 4uy5K0PtGszTGrS9hg/I4pcLpx3AbuicMj5gmkfgBdujxBwIzoZEW8n5n63y1TJES6mk fpMUZvIPb0o4KRtAoHPKRjmUWtas8GHevCwygbaYNMy40I8yDto1JCaPNjDKWGV7oG2A atxw== X-Gm-Message-State: AOAM530bDBJJYKwawC751XDlK8cuxkoLsTTCLrUw4+IXCB7uUPokfAC0 BKXFJao/vNIYH9yfw0bA6hXsKWGEY3MEhedcmXs= X-Google-Smtp-Source: ABdhPJx9Nj3Bpak92cYUXPYBBchLksi4OPnHXLGZmWvpSiqFcr3DJx/nsBUz19lKMH0AWrsCUsQmruZB/HO7aAPa9xk= X-Received: by 2002:a92:d20d:: with SMTP id y13mr15477503ily.294.1630316502955; Mon, 30 Aug 2021 02:41:42 -0700 (PDT) MIME-Version: 1.0 References: <20210827094204.474846-1-ganapati.kundapura@intel.com> In-Reply-To: <20210827094204.474846-1-ganapati.kundapura@intel.com> From: Jerin Jacob Date: Mon, 30 Aug 2021 15:11:16 +0530 Message-ID: To: Ganapati Kundapura Cc: "Jayatheerthan, Jay" , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v1] eventdev: change packet enqueue buffer in RX adapter to circular buffer 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 27, 2021 at 3:12 PM Ganapati Kundapura wrote: > > RX adapter user memove() to move unprocessed events to the beginning of > the packet enqueue buffer. The use memmove() was found to consume good > amount of CPU cycles (about 20%). > > This patch removes the use of memove() while implementina a circular Typo > buffer to avoid copying of data. With this change RX adapter is able > to fill the buffer of 16384 events. Please change the subject to : eventdev: rx-adapter: improve ... > > Signed-off-by: Ganapati Kundapura > --- > lib/eventdev/rte_event_eth_rx_adapter.c | 84 ++++++++++++++++++++++++++------- > 1 file changed, 68 insertions(+), 16 deletions(-) > > } else { > num = rxa_create_event_vector(rx_adapter, eth_rx_queue_info, > @@ -892,9 +918,14 @@ rxa_buffer_mbufs(struct rte_event_eth_rx_adapter *rx_adapter, > > dropped = 0; > nb_cb = dev_info->cb_fn(eth_dev_id, rx_queue_id, > - ETH_EVENT_BUFFER_SIZE, buf->count, > - &buf->events[buf->count], num, > - dev_info->cb_arg, &dropped); > + buf->last | > + (RTE_DIM(buf->events) & ~buf->last_mask), > + buf->count >= BATCH_SIZE ? > + buf->count - BATCH_SIZE : 0, > + &buf->events[buf->tail], > + num, > + dev_info->cb_arg, > + &dropped); Moving this code section to a separate inline function can allow more linewidth to consume aka less number of lines. Rest looks good to me.