[dpdk-dev] [PATCH v4 22/23] ethdev: Decouple interrupt handling from PCI device

Jan Blunck jblunck at infradead.org
Thu Dec 22 19:26:44 CET 2016


On Thu, Dec 22, 2016 at 4:13 PM, Thomas Monjalon
<thomas.monjalon at 6wind.com> wrote:
> 2016-12-21 16:09, Jan Blunck:
>> The struct rte_intr_handle is an abstraction layer for different types of
>> interrupt mechanisms. It is embedded in the low-level device (e.g. PCI).
>> On allocation of a struct rte_eth_dev a reference to the intr_handle
>> should be stored for devices supporting interrupts.
> [...]
>> --- a/lib/librte_ether/rte_ethdev.h
>> +++ b/lib/librte_ether/rte_ethdev.h
>> @@ -1629,6 +1629,7 @@ struct rte_eth_dev {
>>       const struct eth_driver *driver;/**< Driver for this device */
>>       const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
>>       struct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */
>> +     struct rte_intr_handle *intr_handle; /**< Device interrupt handle */
>>       /** User application callbacks for NIC interrupts */
>>       struct rte_eth_dev_cb_list link_intr_cbs;
>>       /**
>
> Why adding interrupt in ethdev?
> Shouldn't it be a property of rte_device?

Good question. I don't think that rte_device should become an
abstraction layer for all kind of real/virtual devices functionality.
There are devices that do not support interrupts and this
functionality is around enabling irqs per queue. Since this is a
concept of the ethdev I believe the right place to keep a reference to
the IRQ implementation is the rte_eth_dev.


More information about the dev mailing list