[dpdk-dev] [PATCH v5 2/3] ethdev: add optional rxtx callback support
Mcnamara, John
john.mcnamara at intel.com
Mon Feb 23 18:27:30 CET 2015
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Monday, February 23, 2015 3:12 PM
> To: Mcnamara, John
> Cc: dev at dpdk.org; Richardson, Bruce; nhorman at tuxdriver.com;
> stephen at networkplumber.org; Doherty, Declan
> Subject: Re: [PATCH v5 2/3] ethdev: add optional rxtx callback support
>
> > +#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 >= nb_ports || fn == NULL ||
> > + queue_id >= rte_eth_devices[port_id].data->nb_rx_queues) {
> > + rte_errno = EINVAL;
> > + return NULL;
> > + }
>
> 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 suggestions.
John
--
More information about the dev
mailing list