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 A5850A0C41; Thu, 16 Sep 2021 06:43:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F43A4003F; Thu, 16 Sep 2021 06:43:02 +0200 (CEST) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by mails.dpdk.org (Postfix) with ESMTP id 23CBE4003C for ; Thu, 16 Sep 2021 06:43:01 +0200 (CEST) Received: by mail-il1-f176.google.com with SMTP id h29so5409231ila.2 for ; Wed, 15 Sep 2021 21:43:01 -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=N8lbCKF4u1tFjDMqfSVYDCcX8i6Lh9spdUhfTqsMZMc=; b=c1GtkQ0xPPL6oPg5ahc5Z04rtrRK77f57YO7kyVuvJpMzTyk52Sy6f0afXsbt/EaDI lON9/UiTNNV9dRFm9aia/l1k6OYstyV16fKide46lO4jBYYf4qNJvtHIZTyhMcODMFRP 3VIe5LyaZbAqOl8w12cAdJLI1hA0YQUDYkWuDYBQBfFLHVIcJLv/jL75wgy+6wMET3Uj EN6VVhKmxS+CSpXCLx5G0YZltGUwLiUunq7/diG+sAtcVy1Umh6XR5vYSjDQkuz3fEvY 5D0cv0XJeChEOtHAMioh+kxFOEgK7iQoaZyH15iGZpUoZAauB2CNWAfWZ8wFloojlftQ K/4w== 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=N8lbCKF4u1tFjDMqfSVYDCcX8i6Lh9spdUhfTqsMZMc=; b=3TEbD7zdZVJyh1wJcFPvkz6JeUEJQ3GH110W/SMkyuydxPRr7+MJr0A9PMlCgaRCFB GIGfHGTS7INcXCFfLPzpm9lBTb3tzMDpEHxELHpBrBKsDZU4ZDd59CijnRgIVta/VnC7 PDULrY3nt6w4eimfbEAN4iTIr1kTWUvHkBc8rwhFTxs/mX8wiTGKzPXevCSgL/gjvZR7 vj3T4i420N652MiJchq5VeFT6ORv+PG18dmZ/qNeQ7B2cV9bw+huA8gXs3oEtzyhh2WW jdh68usasmsnb/YaNDmmRGACa74ctFzNJ/UWHocw+k4KZh+W5jPWpup4qd1hSjwcEtow kqEw== X-Gm-Message-State: AOAM530j0Kt6tH1yhZybmQp1mp4EzpIo6S1QwIXhv1g4vDump3XM4Yhx i3H0a7cQv789elGKK4pIChZydpHLuH7gGDstN0u1m83pRYcU/w== X-Google-Smtp-Source: ABdhPJwSMgFhVM4xNtT16dwdBJREBhIL+WqFiqJp3PUpmCwnRTkbVPUdIb/F85a5Ite2C6sGFNGbuXuESFDn+SA0xZU= X-Received: by 2002:a05:6e02:ef4:: with SMTP id j20mr2698939ilk.294.1631767380387; Wed, 15 Sep 2021 21:43:00 -0700 (PDT) MIME-Version: 1.0 References: <20210907053642.4093569-1-ganapati.kundapura@intel.com> <20210907064518.376652-1-ganapati.kundapura@intel.com> In-Reply-To: From: Jerin Jacob Date: Thu, 16 Sep 2021 10:12:34 +0530 Message-ID: To: "Kundapura, Ganapati" Cc: "Jayatheerthan, Jay" , dpdk-dev , Pavan Nikhilesh Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 1/3] eventdev: add rx queue info get api 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 Wed, Sep 8, 2021 at 1:51 PM Kundapura, Ganapati wrote: > > Hi Jerin, > > > -----Original Message----- > > From: Jerin Jacob > > Sent: 07 September 2021 15:07 > > To: Kundapura, Ganapati > > Cc: Jayatheerthan, Jay ; dpdk-dev > > ; Pavan Nikhilesh > > Subject: Re: [PATCH v3 1/3] eventdev: add rx queue info get api > > > > On Tue, Sep 7, 2021 at 2:20 PM Kundapura, Ganapati > > wrote: > > > > > > > > > > > > > -----Original Message----- > > > > From: Jerin Jacob > > > > Sent: 07 September 2021 13:42 > > > > To: Kundapura, Ganapati > > > > Cc: Jayatheerthan, Jay ; dpdk-dev > > > > ; Pavan Nikhilesh > > > > Subject: Re: [PATCH v3 1/3] eventdev: add rx queue info get api > > > > > > > > in > > > > > > > > On Tue, Sep 7, 2021 at 12:15 PM Ganapati Kundapura > > > > wrote: > > > > > > > > > > Added rte_event_eth_rx_adapter_queue_info_get() API to get rx > > > > > queue information - event queue identifier, flags for handling > > > > > received packets, schedular type, event priority, polling > > > > > frequency of the receive queue and flow identifier in > > > > > rte_event_eth_rx_adapter_queue_info structure > > > > > > > > > > Signed-off-by: Ganapati Kundapura > > > > > > > > > > --- > > > > > v3: > > > > > * Split single patch into implementaion, test and document updation > > > > > patches separately > > > > > > > > > +struct rte_event_eth_rx_adapter_queue_info; > > > > > + > > > > > +/** > > > > > + * Retrieve information about Rx queue. This callback is invoked > > > > > +if > > > > > + * the caps returned from the eventdev_eth_rx_adapter_caps_get(, > > > > > +eth_port_id) > > > > > + * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set. > > > > > > > > It will useful for !RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT > > case > > > > too. > > > > > > > > > > > > Missed this comment in v4 > Sorry I missed these comments > > rte_event_eth_rx_adapter_queue_info_get() calls PMD callback if internal port cap is set, > otherwise it implements to return the queue_info. > PMD callback is for internal port and queue_info_get() api implements for non internal port This API will be useful for !RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT case too. In order to use this in a generic way, I suggest in following way, In the rte_event_eth_rx_adapter_queue_add() stores this config in common code(i.e file: ./lib/eventdev/rte_event_eth_rx_adapter.c and rte_event_eth_rx_adapter_queue_add() function) as named memzone or so. Later when rte_event_eth_rx_adapter_queue_conf_get() called, the config can be retrived through named memzone lookup and have PMD specific callback like your patch for overriding any parameter as neeed. i.e If PMD callback is NULL, Application should get the config struct as provided in rte_event_eth_rx_adapter_queue_add() with rte_event_eth_rx_adapter_queue_conf_get(). > > > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h > > > > > b/lib/eventdev/rte_event_eth_rx_adapter.h > > > > > index 182dd2e..75c0010 100644 > > > > > --- a/lib/eventdev/rte_event_eth_rx_adapter.h > > > > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.h > > > > > @@ -33,6 +33,7 @@ > > > > > * - rte_event_eth_rx_adapter_stop() > > > > > * - rte_event_eth_rx_adapter_stats_get() > > > > > * - rte_event_eth_rx_adapter_stats_reset() > > > > > + * - rte_event_eth_rx_adapter_queue_info_get() > > > > > * > > > > > * The application creates an ethernet to event adapter using > > > > > * rte_event_eth_rx_adapter_create_ext() or > > > > > rte_event_eth_rx_adapter_create() @@ -140,6 +141,56 @@ typedef > > int > > > > (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id, > > > > > void *arg); > > > > > > > > > > /** > > > > > + * Rx queue info > > > > > + */ > > > > > +struct rte_event_eth_rx_adapter_queue_info { > > > > > > > > Can we avoid the duplication of this structure and use > > > > rte_event_eth_rx_adapter_queue_conf instead. > > > > > Agree > > > > API can be rte_event_eth_rx_adapter_queue_conf_get() to align the > > > > structure. > Agree > > > > > > > > Also instead of every driver duplicating this code, How about > > > > - common code stores the config in > > > > rte_event_eth_rx_adapter_queue_add() > > > > - common code stores the config in > > > > rte_event_eth_rx_adapter_queue_conf_get() > > queue_add() stores the config in dev_info and queue_conf_get() retrieves the config from dev_info. > Please clarify on common code to store and retrieve queue conf? See above. > > > > - Addtional PMD level API can be given incase, something needs to > > > > overridden by Adapter. > > > Existing PMD callbacks like queue_add, queue_del, adapter_start, adapter_stop etc > doesn't have any additional PMD level api. > queue_info_get PMD callback is also similar. See above. > > > > > Missed addressing this comment in v4.