On 5/22/2015 2:20 AM, Stephen Hemminger wrote: > On Thu, 21 May 2015 16:56:00 +0800 > Cunming Liang <cunming.liang at intel.com> wrote: > >> +int >> +rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id, >> + int epfd, int op, void *data) >> +{ >> + uint32_t vec; >> + struct rte_eth_dev *dev; >> + struct rte_intr_handle *intr_handle; >> + int rc; >> + >> + if (!rte_eth_dev_is_valid_port(port_id)) { >> + PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); > Use %u when printing unsigned value Agree. > >> + return -ENODEV; >> + } >> + >> + dev = &rte_eth_devices[port_id]; >> + if (dev == NULL) { >> + PMD_DEBUG_TRACE("Invalid port device\n"); >> + return -ENODEV; >> + } > Another unnecessary conditional check, already done in > rte_eth_dev_is_valid_port Yes, it's not necessary anymore. >> + >> + if (queue_id >= dev->data->nb_rx_queues) { >> + PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", rx_queue_id); > This is wrong, won't build with debug enabled, You meant to use queue_id > here and use %u I'm sorry, that's a mistake, thanks. >> + return -EINVAL; >> + } >> + >> + intr_handle = &dev->pci_dev->intr_handle; >> + if (!intr_handle->intr_vec) { >> + PMD_DEBUG_TRACE("RX Intr vector unset\n"); >> + return -EPERM; >> + } >> +
- [dpdk-dev] [PATCH v8 03/11] eal/linux: add API to set rx... Cunming Liang
- [dpdk-dev] [PATCH v8 04/11] eal/linux: fix comments typo... Cunming Liang
- [dpdk-dev] [PATCH v8 05/11] eal/linux: add interrupt vec... Cunming Liang
- [dpdk-dev] [PATCH v8 05/11] eal/linux: add interrup... Stephen Hemminger
- [dpdk-dev] [PATCH v8 05/11] eal/linux: add inte... Liang, Cunming
- [dpdk-dev] [PATCH v8 06/11] eal/linux: standalone intr e... Cunming Liang
- [dpdk-dev] [PATCH v8 07/11] eal/bsd: dummy for new intr ... Cunming Liang
- [dpdk-dev] [PATCH v8 08/11] ethdev: add rx intr enable, ... Cunming Liang
- [dpdk-dev] [PATCH v8 08/11] ethdev: add rx intr ena... Stephen Hemminger
- [dpdk-dev] [PATCH v8 08/11] ethdev: add rx intr ena... Stephen Hemminger
- [dpdk-dev] [PATCH v8 08/11] ethdev: add rx intr ena... Liang, Cunming
- [dpdk-dev] [PATCH v8 09/11] ixgbe: enable rx queue inter... Cunming Liang
- [dpdk-dev] [PATCH v8 10/11] igb: enable rx queue interru... Cunming Liang
- [dpdk-dev] [PATCH v8 11/11] l3fwd-power: enable one-shot... Cunming Liang
- [dpdk-dev] [PATCH v9 00/12] Interrupt mode PMD Cunming Liang
- [dpdk-dev] [PATCH v9 01/12] eal/linux: add interrup... Cunming Liang
- [dpdk-dev] [PATCH v9 02/12] eal/linux: add rte_epol... Cunming Liang
- [dpdk-dev] [PATCH v9 03/12] eal/linux: add API to s... Cunming Liang
- [dpdk-dev] [PATCH v9 04/12] eal/linux: fix comments... Cunming Liang
- [dpdk-dev] [PATCH v9 05/12] eal/linux: add interrup... Cunming Liang