[dpdk-dev] [PATCH v4 3/3] igb_uio: MSI IRQ mode
Markus Theil
markus.theil at tu-ilmenau.de
Fri Sep 1 00:07:06 CEST 2017
On 31.08.2017 17:32, Stephen Hemminger wrote:
> On Thu, 31 Aug 2017 12:22:29 +0200
> Markus Theil <markus.theil at tu-ilmenau.de> wrote:
>
>> +/*
>> + * It masks the msi on/off of generating MSI messages.
>> + */
>> +static void
>> +igbuio_msi_mask_irq(struct pci_dev *pdev, struct msi_desc *desc, int32_t state)
>> +{
>> + u32 mask_bits = desc->masked;
>> + u32 offset = desc->irq - pdev->irq;
>> + u32 mask = 1 << offset;
>> + u32 flag = !!state << offset;
>> +
>> + if (!desc->msi_attrib.maskbit)
>> + return;
>> +
>> + mask_bits &= ~mask;
>> + mask_bits |= flag;
>> +
>> + if (mask_bits != desc->masked) {
>> + pci_write_config_dword(pdev, desc->mask_pos, mask_bits);
>> + desc->masked = mask_bits;
>> + }
>> +}
>> +
> Why not use the existing kernel API pci_msi_mask_irq()?
Thanks for the advice, I have considered it in v5.
More information about the dev
mailing list