From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 2C42F37B4 for ; Fri, 7 Oct 2016 14:29:44 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id b201so35129655wmb.0 for ; Fri, 07 Oct 2016 05:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=qHsFvb9i66RWPjO8d0sEh5Uli9+qreQabN7z8FWN4RU=; b=T5pEXXPdq+se7x2hQboSSDkA94Mb1foi8/Wr0LZds7expjo6BfBQL16LDG9feKtLDp kFKVP8Kb/D/ZayVVAP+7jJglvPiRpPdGSFXetY61r4aI4djZgGij3msWzCMw6Rb9q5B5 XQOBXk5fuHPCilkyhcZmnSIGz7Hav5D2prADidmKXzLQKr/lZ5cn9sPj/ClXjMxrO9Qr yylH59FdngD4p7iXe9fhQIc8AYmV+uHVl5x6mOJGbEIOiBnzn4zmTrGghdGFsW73Wm04 l6OEfMOfRxmzkSVvRjfxIFXsVYpEO216yo+u1tydwMKImB84fSZQgK5Fj4vl2YFK+akd luSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=qHsFvb9i66RWPjO8d0sEh5Uli9+qreQabN7z8FWN4RU=; b=mIT4j4nTWOnqDByDagmhtrwKlizobRedI4Y0/KUp8NfGVEEpQKUl1aeeZwrQYsxom/ RdFY3ni1EvaZkvGuXqy319xWlrQOQbS4190FAn/aw36F3VIEkEgwlhHOnfU1V1SDP/Kt kXzw8vq1bT6WtGi20EOQ017fzJbGon0huEW2IKr6lIxopukzlAdU8GWgFt5VgZUrGNaJ xCuDllmvjc9LtlN/67tPZA5gQh8mK8TSuzmV8PPiX6SYrigaoFCgwKqPmBu6efsg1sl7 k9E70hJAgA0R26AcVp0ZQpFw/g8v0dTMPG2d0QTH+7QK2SaqlNwmohwFK+NGvcj0FK6y u8KQ== X-Gm-Message-State: AA6/9RnTuXCnZn5afiqluJTSk9swf2S4nZwzWMEyv3nzcH5fURbDWhRXfID93Em/dtnzKlHA X-Received: by 10.194.113.201 with SMTP id ja9mr15788242wjb.109.1475843383894; Fri, 07 Oct 2016 05:29:43 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id f142sm2827268wmf.19.2016.10.07.05.29.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Oct 2016 05:29:43 -0700 (PDT) From: Thomas Monjalon To: Bernard Iremonger Cc: dev@dpdk.org, rahul.r.shah@intel.com, wenzhuo.lu@intel.com, az5157@att.com, jerin.jacob@caviumnetworks.com Date: Fri, 07 Oct 2016 14:29:42 +0200 Message-ID: <1948203.6ATyv1RgPu@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1475772490-10491-2-git-send-email-bernard.iremonger@intel.com> References: <1475753191-17391-1-git-send-email-bernard.iremonger@intel.com> <1475772490-10491-2-git-send-email-bernard.iremonger@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 1/2] librte_ether: modify internal callback function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 12:29:44 -0000 2016-10-06 17:48, Bernard Iremonger: > @@ -2508,7 +2508,7 @@ rte_eth_dev_callback_unregister(uint8_t port_id, > > void > _rte_eth_dev_callback_process(struct rte_eth_dev *dev, > - enum rte_eth_event_type event) > + enum rte_eth_event_type event, void *cb_arg) > { > struct rte_eth_dev_callback *cb_lst; > struct rte_eth_dev_callback dev_cb; > @@ -2519,6 +2519,9 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev, > continue; > dev_cb = *cb_lst; > cb_lst->active = 1; > + if (cb_arg != NULL) > + dev_cb.cb_arg = (void *) cb_arg; > + > rte_spinlock_unlock(&rte_eth_dev_cb_lock); > dev_cb.cb_fn(dev->data->port_id, dev_cb.event, > dev_cb.cb_arg); [...] > @@ -3047,6 +3048,11 @@ typedef void (*rte_eth_dev_cb_fn)(uint8_t port_id, \ > * @param cb_arg > * Pointer to the parameters for the registered callback. > * > + * The cb_arg must not be NULL if the application requires > + * data to be returned when the callback is processed. > + * For the RTE_ETH_EVENT_VF_MBOX data is returned to the > + * application. This comment is wrong. You should say that the user data is overwritten in the case of RTE_ETH_EVENT_VF_MBOX. And you should point to where the meaning of this parameter is documented (ixgbe.h) or document it here.