From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B8E559A87 for ; Mon, 23 Feb 2015 18:27:35 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 23 Feb 2015 09:27:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,631,1418112000"; d="scan'208";a="655969526" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 23 Feb 2015 09:27:32 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.247]) by IRSMSX102.ger.corp.intel.com ([169.254.2.69]) with mapi id 14.03.0195.001; Mon, 23 Feb 2015 17:27:30 +0000 From: "Mcnamara, John" To: Thomas Monjalon Thread-Topic: [PATCH v5 2/3] ethdev: add optional rxtx callback support Thread-Index: AQHQTS85IUphc62xNEKu9OuQyrZBZZz+W7SAgAAlc5A= Date: Mon, 23 Feb 2015 17:27:30 +0000 Message-ID: References: <1424281343-2994-1-git-send-email-john.mcnamara@intel.com> <1424451827-32293-1-git-send-email-john.mcnamara@intel.com> <1424451827-32293-3-git-send-email-john.mcnamara@intel.com> <7382517.Dv0U0yYrtA@xps13> In-Reply-To: <7382517.Dv0U0yYrtA@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] 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 v5 2/3] ethdev: add optional rxtx callback support 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: Mon, 23 Feb 2015 17:27:36 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, February 23, 2015 3:12 PM > To: Mcnamara, John > Cc: dev@dpdk.org; Richardson, Bruce; nhorman@tuxdriver.com; > stephen@networkplumber.org; Doherty, Declan > Subject: Re: [PATCH v5 2/3] ethdev: add optional rxtx callback support >=20 > > +#ifdef RTE_ETHDEV_RXTX_CALLBACKS > > +void * > > +rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id, > > + rte_rxtx_callback_fn fn, void *user_param) { > > + /* check input parameters */ > > + if (port_id >=3D nb_ports || fn =3D=3D NULL || > > + queue_id >=3D rte_eth_devices[port_id].data->nb_rx_queues) { > > + rte_errno =3D EINVAL; > > + return NULL; > > + } >=20 > Why not putting #ifdef only here and return an error ENOTSUP? Hi Thomas, That would probably be cleaner/clearer. I'll rework this patch with your su= ggestions. John --=20