From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DDFAE530C for ; Fri, 7 Oct 2016 18:57:26 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 07 Oct 2016 09:57:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,456,1473145200"; d="scan'208";a="17752521" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga004.jf.intel.com with ESMTP; 07 Oct 2016 09:57:24 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.164]) by IRSMSX106.ger.corp.intel.com ([169.254.8.209]) with mapi id 14.03.0248.002; Fri, 7 Oct 2016 17:57:23 +0100 From: "Iremonger, Bernard" To: Thomas Monjalon CC: "dev@dpdk.org" , "Shah, Rahul R" , "Lu, Wenzhuo" , "az5157@att.com" , "jerin.jacob@caviumnetworks.com" Thread-Topic: [dpdk-dev] [PATCH v6 1/2] librte_ether: modify internal callback function Thread-Index: AQHSH/F71EaoA+9QakCaLw/4UBZM6aCc3E4AgABbLJA= Date: Fri, 7 Oct 2016 16:57:23 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C21A08FD74@IRSMSX108.ger.corp.intel.com> References: <1475753191-17391-1-git-send-email-bernard.iremonger@intel.com> <1475772490-10491-2-git-send-email-bernard.iremonger@intel.com> <1948203.6ATyv1RgPu@xps13> In-Reply-To: <1948203.6ATyv1RgPu@xps13> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2FkNmE5NmItMzk5OC00YTU3LTlkYTQtMGQ4NzYzZGIyMzA1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImU1bkVLWCtIRTBGaVFPTWJVWlwvQjFQQ0Erd0JjN1wvYlwvZXBuSjBGNVR5S2c9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 16:57:27 -0000 Hi Thomas, > Subject: Re: [dpdk-dev] [PATCH v6 1/2] librte_ether: modify internal call= back > function >=20 > 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 =3D *cb_lst; > > cb_lst->active =3D 1; > > + if (cb_arg !=3D NULL) > > + dev_cb.cb_arg =3D (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. >=20 > 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. This is corrected in the v7 patchset. Regards. Bernard.