From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 01/13] librte_ether: modify internal callback function Date: Thu, 06 Oct 2016 14:56:04 +0200 Message-ID: <8021250.9Wl94qBdaq@xps13> References: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com> <1475753191-17391-2-git-send-email-bernard.iremonger@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, rahul.r.shah@intel.com, wenzhuo.lu@intel.com, az5157@att.com, jerin.jacob@caviumnetworks.com To: Bernard Iremonger Return-path: Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by dpdk.org (Postfix) with ESMTP id 61F842946 for ; Thu, 6 Oct 2016 14:56:14 +0200 (CEST) Received: by mail-lf0-f46.google.com with SMTP id b75so15156534lfg.3 for ; Thu, 06 Oct 2016 05:56:14 -0700 (PDT) In-Reply-To: <1475753191-17391-2-git-send-email-bernard.iremonger@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-10-06 12:26, Bernard Iremonger: > void > _rte_eth_dev_callback_process(struct rte_eth_dev *dev, > - enum rte_eth_event_type event) > + enum rte_eth_event_type event, void *param) You need to squash the patches updating the calls to this function. Otherwise, this patch does not compile. [...] > + if (param != NULL) > + dev_cb.cb_arg = (void *) param; You are overriding the user parameter. As it is only for a new event, it can be described in the register API that the user param won't be returned for this event. But a better design would be to add a new parameter to the callback. However it will be an API breakage. > + RTE_ETH_EVENT_VF_MBOX, /**< PF mailbox processing callback */ Sorry I do not parse well this line. The event name is VF_MBOX and the comment is about the callback processing this event on PF side? I would suggest this kind of comment: "message from VF received by PF" [...] > * Pointer to struct rte_eth_dev. > * @param event > * Eth device interrupt event type. > + * @param param > + * Parameter to pass back to user application. > + * Allows the user application to decide if a particular function > + * is permitted. In a more generic case, the parameter gives some details about the event.