Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752770AbdFQKsH convert rfc822-to-8bit (ORCPT ); Sat, 17 Jun 2017 06:48:07 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:7877 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752699AbdFQKsG (ORCPT ); Sat, 17 Jun 2017 06:48:06 -0400 From: Salil Mehta To: Stephen Hemminger 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 Thread-Topic: [PATCH V2 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC Thread-Index: AQHS5Jpli12+D/2e6EyB3JqMZRm9UqIjVaeAgAWNnJA= Date: Sat, 17 Jun 2017 10:47:43 +0000 Message-ID: References: <20170613231035.494020-1-salil.mehta@huawei.com> <20170613231035.494020-2-salil.mehta@huawei.com> <20170613165303.7a096821@xeon-e3> In-Reply-To: <20170613165303.7a096821@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.203.181.160] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.594508DF.004B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.2.25, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 39e067c9daf0bf3a7f142d353c2d06f7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1412 Lines: 49 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 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