Hi Stephen

> -----Original Message-----
> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Wednesday, June 14, 2017 12:53 AM
> To: Salil Mehta
> Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y);
> mehta.salil....@gmail.com; net...@vger.kernel.org; linux-
> ker...@vger.kernel.org; Linuxarm
> Subject: Re: [PATCH V2 net-next 1/8] net: hns3: Add support of HNS3
> Ethernet Driver for hip08 SoC
> 
> On Wed, 14 Jun 2017 00:10:28 +0100
> Salil Mehta <salil.me...@huawei.com> wrote:
> 
> > +static irqreturn_t hns3_irq_handle(int irq, void *dev)
> > +{
> > +   struct hns3_enet_tqp_vector *tqp_vector = dev;
> > +
> > +   napi_schedule(&tqp_vector->napi);
> 
> In order to do NAPI correctly, the IRQ must be disabled.
> If you are using MSI, then hardware will do it for you.
Yes, you are correct. They get auto disabled in our case.

> 
> But I don't see you ever enable MSI or MSI-x in this driver.

We are enabling them again in common poll:

static int hns3_nic_common_poll(struct napi_struct *napi, int budget)
{
        struct hns3_enet_ring *ring;
        int rx_pkt_total = 0;

      [....]

        hns3_mask_vector_irq(tqp_vector, 1);---> this re-enables the interrupts 
on NIC.

        return rx_pkt_total;
}

> Are you just assuming that the driver only works on one platform
> and that platform has PCI MSI-X?
We support both MSI and MSI-X. Hope I answered this completely?

Best regards
Salil


Reply via email to