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 0D038A0548; Sat, 3 Apr 2021 16:34:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5DDB40696; Sat, 3 Apr 2021 16:34:22 +0200 (CEST) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by mails.dpdk.org (Postfix) with ESMTP id 9E5D44067B for ; Sat, 3 Apr 2021 16:34:20 +0200 (CEST) Received: by mail-io1-f42.google.com with SMTP id v26so7884270iox.11 for ; Sat, 03 Apr 2021 07:34:20 -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=bdbnBBeE8sYfFSGReT7CW9Zv7sT3O/Q62l6LDOwtaUk=; b=GDTCkgikI6VIK1+L05hoRLXz+BxkvoeiM/a6kNTz/SzJ1LFB5A0G5yoAp1MgtTmhIH 5VQ4Xvl4fhHSBj+i3JEZX9h/Jpu5t84KJjz5PtMlwpFd2cd9wfOI7pvSZla7AD4+Xmp6 L99u78WPHrOaWTwTNhPnfJsPHcgK11b4DIZH4we34rn2GU3mln0uUwQZYdhc3HTjpwcd s9JiT6AKDO/3+LgqgEnhdGnL1k9YWRDJv+vsc3g4XlhMV1tRL+Hfj5JEjQne8V2oWnq5 rjZ/8RfDJ7QhPJcsRkU7ftj4D00JbjEPVQq2+NZF+3i/YwyvbfU/3XihsxC3rJkn4WKf Vojw== 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=bdbnBBeE8sYfFSGReT7CW9Zv7sT3O/Q62l6LDOwtaUk=; b=bDUGV+ZPSZVX1+4qJTEMn4tuv0Yt531CEuqZCbFhtSXhw5WkigkKubfrPnkYfwb+E5 qLXgbpwZlYCnQJkpfECpUHA8NWy0LFMbDIZRC/qKQyDnhssmmJWZEeESj68aoyp1kOS8 ERuUCYqB6zzfX2RbSybfWTJLml02aim5FmSsglDp0OGl6BQWtgM9dyXVsJPPrJZPypCr tLpeUqNN22RRlI3aM9gRR/iGaI5PcoZsC4axxZhpmNFm8KLjOgjm38iJok3umtrjff2l l+w8SCbtObzh3ivRlkS1r6QxYdLFP1RZBcyTEMQOPRZS2dCI26/rXeME6Je1YdbEyGc7 EA6A== X-Gm-Message-State: AOAM533ynqlKks4/FTYq7mNmPg3og4QlARl2hTX/B1Iy0rA7Cb/9kyux JhZ2jVJWBljLrD7DP9Ev+8kAcF3SOE2W7UUuZYU= X-Google-Smtp-Source: ABdhPJxq0w0ohJO7Kny23wef6MYVDnHM261Tu7d3lLbupF6J2gpaqjFF627owFdNiiFhSnU+gAfM7WObjbf0aBY9yrE= X-Received: by 2002:a02:7086:: with SMTP id f128mr16778763jac.104.1617460460019; Sat, 03 Apr 2021 07:34:20 -0700 (PDT) MIME-Version: 1.0 References: <20210305162149.2196166-1-asekhar@marvell.com> <20210403141751.215926-1-asekhar@marvell.com> <20210403141751.215926-8-asekhar@marvell.com> In-Reply-To: <20210403141751.215926-8-asekhar@marvell.com> From: Jerin Jacob Date: Sat, 3 Apr 2021 20:04:04 +0530 Message-ID: To: Ashwin Sekhar T K Cc: dpdk-dev , Jerin Jacob , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Pavan Nikhilesh , Kiran Kumar K , Satheesh Paul Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 08/11] mempool/cnxk: add batch op init 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 Sat, Apr 3, 2021 at 7:49 PM Ashwin Sekhar T K wrote: > > Marvell CN10k mempool supports batch enqueue/dequeue which can > dequeue up to 512 pointers and enqueue up to 15 pointers using > a single instruction. > > These batch operations require a DMA memory to enqueue/dequeue > pointers. This patch adds the initialization of this DMA memory. > > Signed-off-by: Ashwin Sekhar T K > --- > doc/guides/mempool/cnxk.rst | 5 + > drivers/mempool/cnxk/cn10k_mempool_ops.c | 122 ++++++++++++++++++++++- > drivers/mempool/cnxk/cnxk_mempool.h | 3 + > drivers/mempool/cnxk/cnxk_mempool_ops.c | 13 ++- > 4 files changed, 138 insertions(+), 5 deletions(-) > > + > +static struct batch_op_data **batch_op_data; Please remove the global variable as it will break the multi-process. > + > +#define BATCH_OP_DATA_GET(pool_id) \ > + batch_op_data[roc_npa_aura_handle_to_aura(pool_id)] > + > +#define BATCH_OP_DATA_SET(pool_id, op_data) \ > + do { \ > + uint64_t aura = roc_npa_aura_handle_to_aura(pool_id); \ > + batch_op_data[aura] = op_data; \ > + } while (0) > + Please check this can be made as static inline if there is NO performance cost.