From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6783C433F5 for ; Mon, 20 Sep 2021 06:20:37 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 6C67560F23 for ; Mon, 20 Sep 2021 06:20:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6C67560F23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A941940DF7; Mon, 20 Sep 2021 08:20:36 +0200 (CEST) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by mails.dpdk.org (Postfix) with ESMTP id 5C63540DF5 for ; Mon, 20 Sep 2021 08:20:35 +0200 (CEST) Received: by mail-io1-f48.google.com with SMTP id y18so20692277ioc.1 for ; Sun, 19 Sep 2021 23:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qfOcq+mVkZgmfSLDVL18XU8JreUg5Dpyo+M1rwH8Kls=; b=IaMILVl5kGkpI7KcOaKsq4HHePrZ/HKrmGJMZd6vVb1i4Gtm+lYqlNBWPn7XHbQpIe ea//plJsOT2kLwUObtKwFlOj0fcM6k6I/a2DoXYrkYCLt3YlQn+tFWPlv7+T422MyEBQ koyBh68GmZeZn6oRnvrEdjmXmUh4OLarI20YnnDB8czxM4hNwgA02Swr7AosEKwWyW6R /Rs+8ggb8y/PMvTEC6RAHRI7foDzhpK6y0S1kYKW10lBXt8U7kk3ztlgmz8BqzfNEi2r d51pR7EjMM0uKdf9BFVoGGY4k8TXCgFrzsHLNjmQNv4/qDOYV9rC3jeDKADoonqhTl9v JSMA== 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=qfOcq+mVkZgmfSLDVL18XU8JreUg5Dpyo+M1rwH8Kls=; b=3dqt6lnndosjuwCwHLyE7bSO8ia43uKdrRWoteMX2kpNV1uZVBxtTwnJ61hgNJGKvK 31sHsMmdiUAk8KpzshtFah3WYPS/nTa9CLdFWO5oj19vJ0zwGlXV1O3pGvxAvvlYhU3X Ho8euxaxr0y5yFxZuKQz0MsXFYWpw2py4MDMqGbsi6qtL72/T/iSKdJAQCZBM99pp1d9 vaci1LFIfvL5cVO66RfaIdT9W/dEU4COQsijlwR59MMQ1BdIr7YRwVvL+tC1H1ejIuGZ uqk/QANObBumTzdtJa4gH7jT3jRXIFjZtNjODqBvS7oQOvh/1KRpjLccBkMRH2dc757L kRUA== X-Gm-Message-State: AOAM531iDLQ4Y1gMuk9zVF5GRYatoqW7tQ7sQCdwrZB8FqCfFfvY/c1k r+Ipy2gCyLB/vvBzgiFYb7cGyNIswGUlBKEn2Uo= X-Google-Smtp-Source: ABdhPJwtuoutWKgbCyjfJhIQ9VXq8pg8r65SgyvLlwhxeCK2gYLTfxkBsqjX7axz8LA0pn2wWsa93sk0eYPjblg99bw= X-Received: by 2002:a02:7160:: with SMTP id n32mr17311679jaf.99.1632118834386; Sun, 19 Sep 2021 23:20:34 -0700 (PDT) MIME-Version: 1.0 References: <20210918131140.3543317-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20210918131140.3543317-1-s.v.naga.harish.k@intel.com> From: Jerin Jacob Date: Mon, 20 Sep 2021 11:50:08 +0530 Message-ID: To: Naga Harish K S V Cc: Jerin Jacob , "Jayatheerthan, Jay" , dpdk-dev , Ganapati Kundapura Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v1 1/5] eventdev: rx_adapter: add support to configure 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 Sat, Sep 18, 2021 at 6:41 PM Naga Harish K S V wrote: > > Currently Rx event buffer is static array > with a default size of 192(6*BATCH_SIZE). > > ``rte_event_eth_rx_adapter_create2`` api is added which takes > ``struct rte_event_eth_rx_adapter_params`` to configure event > buffer size in addition other params . The event buffer is > allocated dynamically at run time aligned to BATCH_SIZE + 2*BATCH_SIZE. > > Signed-off-by: Naga Harish K S V > Signed-off-by: Ganapati Kundapura > --- > > +/** > + * A structure to hold adapter config params > + */ > +struct rte_event_eth_rx_adapter_params { > + uint16_t event_buf_size; > + /**< size of event buffer for the adapter */ See below. > +}; > + > /** > * > * Callback function invoked by the SW adapter before it continues > @@ -330,6 +339,40 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id, > rte_event_eth_rx_adapter_conf_cb conf_cb, > void *conf_arg); > > +/** > + * Create a new ethernet Rx event adapter with the specified identifier. > + * This function allocates Rx adapter event buffer with the size specified > + * in rxa_params aligned to BATCH_SIZE plus (BATCH_SIZE+BATCH_SIZE) and > + * uses an internal configuration function that creates an event port. This function may use for adding another rte_event_eth_rx_adapter_params:: value. So semantics of rte_event_eth_rx_adapter_params::event_buf_size you can document at in that structure. This function, you can tell it adapter creation varint with parameters or so See below. > + * This default function reconfigures the event device with an > + * additional event port and setups up the event port using the port config > + * parameter passed into this function. In case the application needs more > + * control in configuration of the service, it should use the > + * rte_event_eth_rx_adapter_create_ext() version. > + * > + * @param id > + * The identifier of the ethernet Rx event adapter. > + * > + * @param dev_id > + * The identifier of the event device to configure. > + * > + * @param rxa_params > + * Pointer to struct rte_event_eth_rx_adapter_params containing > + * size to allocate rx event buffer. Value NULL is allowed to represent the default values or so. > + * > + * @param port_config > + * Argument of type *rte_event_port_conf* that is passed to the conf_cb > + * function. > + * > + * @return > + * - 0: Success > + * - <0: Error code on failure > + */ > +__rte_experimental > +int rte_event_eth_rx_adapter_create2(uint8_t id, uint8_t dev_id, > + struct rte_event_eth_rx_adapter_params *rxa_params, > + struct rte_event_port_conf *port_config); Couple of suggestion on API name and prototype: - I think, we can remove 2 version and give more meaningful,name like rte_event_eth_rx_adapter_create_with_param() or so - Keep new parameter as last to have better compatibility i.e rte_event_eth_rx_adapter_create_with_param(uint8_t id, uint8_t dev_id, struct rte_event_port_conf *port_config, struct rte_event_eth_rx_adapter_params *rxa_params)