lkml.org 
[lkml]   [2017]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC
Date
Hi Stephen

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, June 14, 2017 12:53 AM
> To: Salil Mehta
> Cc: davem@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y);
> mehta.salil.lnk@gmail.com; netdev@vger.kernel.org; linux-
> kernel@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.mehta@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


\
 
 \ /
  Last update: 2017-06-17 12:49    [W:0.085 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site