From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v9 2/8] ethdev: add new api to add Rx callback as head of the list Date: Tue, 14 Jun 2016 22:01:48 +0200 Message-ID: <5708967.CQrqTqxUyg@xps13> References: <1465575534-23605-1-git-send-email-reshma.pattan@intel.com> <1465897108-26548-1-git-send-email-reshma.pattan@intel.com> <1465897108-26548-3-git-send-email-reshma.pattan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Reshma Pattan Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 4914DADCD for ; Tue, 14 Jun 2016 22:01:50 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id m124so6061700wme.1 for ; Tue, 14 Jun 2016 13:01:50 -0700 (PDT) In-Reply-To: <1465897108-26548-3-git-send-email-reshma.pattan@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-06-14 10:38, Reshma Pattan: > Added new public api rte_eth_add_first_rx_callback to add given > callback as head of the list. > > Signed-off-by: Reshma Pattan > --- > +/* > +* Add a callback that must be called first on packet RX on a given port > +* and queue. > +* > +* This API configures a first function to be called for each burst of > +* packets received on a given NIC port queue. The return value is a pointer > +* that can be used to later remove the callback using > +* rte_eth_remove_rx_callback(). > +* > +* Multiple functions are called in the order that they are added. > +* > +* @param port_id > +* The port identifier of the Ethernet device. > +* @param queue_id > +* The queue on the Ethernet device on which the callback is to be added. > +* @param fn > +* The callback function > +* @param user_param > +* A generic pointer parameter which will be passed to each invocation of the > +* callback function on this port and queue. > +* > +* @return > +* NULL on error. > +* On success, a pointer value which can later be used to remove the callback. > +*/ > +void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id, > + rte_rx_callback_fn fn, void *user_param); Sorry I fail to understand why this function is needed. What cannot be done in rte_eth_add_rx_callback?