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 54E205A9F for ; Fri, 13 Mar 2015 19:28:34 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 13 Mar 2015 11:28:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,396,1422950400"; d="scan'208";a="466962812" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by FMSMGA003.fm.intel.com with ESMTP; 13 Mar 2015 11:21:35 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.247]) by IRSMSX152.ger.corp.intel.com ([169.254.6.205]) with mapi id 14.03.0195.001; Fri, 13 Mar 2015 18:28:31 +0000 From: "Mcnamara, John" To: Neil Horman Thread-Topic: [dpdk-dev] [PATCH] ethdev: additional parameter in RX callback Thread-Index: AQHQXOU9mNo7RPE6bEmXAywVhJMgMJ0ZOBAAgADx7YCAAEQVAIAAEhyAgAAFaACAAA6c0IAAGSsAgAAHbHA= Date: Fri, 13 Mar 2015 18:28:31 +0000 Message-ID: References: <1426179268-22164-1-git-send-email-john.mcnamara@intel.com> <20150312191540.GB15260@hmsreliant.think-freely.org> <20150313094133.GA5056@bricha3-MOBL3> <20150313134514.GC28191@hmsreliant.think-freely.org> <20150313145002.GA11352@bricha3-MOBL3> <20150313150924.GF28191@hmsreliant.think-freely.org> <20150313173146.GJ28191@hmsreliant.think-freely.org> In-Reply-To: <20150313173146.GJ28191@hmsreliant.think-freely.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] ethdev: additional parameter in RX callback 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, 13 Mar 2015 18:28:34 -0000 > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Friday, March 13, 2015 5:32 PM > To: Mcnamara, John > Cc: Richardson, Bruce; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] ethdev: additional parameter in RX > callback >=20 > > Is encoding the information in the array really a better solution here? > The cb->param already exists for passing in user defined information to > the callback. The proposed patch merely transmits the parent function > arguments to the enclosed callback. > > > The cb->param can't be used here, because its opaque to the internals of > the DPDK. rte_eth_rx_burst doesn't (and can't) know where in the cb- > >params pointer to store that information. Thats why you added an > additional parameter in the first place, isn't it? Yes. That is correct. > My point is that using > an array terminator keeps us out of this habbit of just adding parameters > to communicate more information (as thats an ABI breaking method, and not > particularly scalable if there is more information to be transmitted in > the future). Using a context sensitive API set goes beyond even that, an= d > allows to retrieve arbitrary information form callbacks as needed in an > ABI safe manner Again I can agree with this in the general case, but it isn't necessary, in= this case, to encode the information in the array since it is already loca= l to and available in the function. It seems artificial, at this point, to = implement an array terminator solution to protect an API that, effectively,= hasn't been published yet. John =20