From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0BEEA0A0F; Mon, 5 Jul 2021 09:10:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2955241159; Mon, 5 Jul 2021 09:10:38 +0200 (CEST) Received: from smtpbg511.qq.com (smtpbg511.qq.com [203.205.250.109]) by mails.dpdk.org (Postfix) with ESMTP id 75B6A4114D for ; Mon, 5 Jul 2021 09:10:35 +0200 (CEST) X-QQ-mid: bizesmtp54t1625469030t8uy1hmg Received: from jiawenwu (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Mon, 05 Jul 2021 15:10:30 +0800 (CST) X-QQ-SSF: 01400000000000D0E000B00A0000000 X-QQ-FEAT: O9RHVi+JMbJZu4BcxmFeE3cvJdr38UM7tTvMLmzoEGkFVsBbuT+7Wi5JO+jVO aIzndGo9zfscjfJzets9khn1hWd0HZgEBX7H6MeMGO0gJeUcCPAINnoim+LqMWcIJRsoRI1 mtxCY86Ln5gpc0kqB6ud6T7pdQJWYdzmUIDApt7CX+vP6qVnbTDQ15iEQtV1odfydv+TgUY qAiYt4PQdxCNGw7cEh6XTY8jQKjqaEx4WVOz0OIrR3S27CWBBpXma9wRQq9EKmTJ2sESnYc +QZznwT22E8JYvANNAJb/sGAjaqtWX6kxd700YCWGVR+CbvAzq5OeFTM/w1s4v/MFhiltt/ pP0RTG3Mdxt1Ms9n38qLSl8XOXQUQ== X-QQ-GoodBg: 2 From: "Jiawen Wu" To: "'Andrew Rybchenko'" , References: <20210617110005.4132926-1-jiawenwu@trustnetic.com> <20210617110005.4132926-11-jiawenwu@trustnetic.com> <52460389-4422-31c8-76fa-0a8790aa033d@oktetlabs.ru> In-Reply-To: <52460389-4422-31c8-76fa-0a8790aa033d@oktetlabs.ru> Date: Mon, 5 Jul 2021 15:10:30 +0800 Message-ID: <00a701d7716c$d705b0c0$85111240$@trustnetic.com>+92AE4DF36510C404 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQEx9tyhu8851cQlQUtl5PIyQvroAQCyruaXAZmq31GsbIe7AA== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 Subject: Re: [dpdk-dev] [PATCH v6 10/19] net/ngbe: support link update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On July 3, 2021 12:24 AM, Andrew Rybchenko wrote: > On 6/17/21 1:59 PM, Jiawen Wu wrote: > > Register to handle device interrupt. > > > > Signed-off-by: Jiawen Wu > > [snip] > > > diff --git a/doc/guides/nics/ngbe.rst b/doc/guides/nics/ngbe.rst index > > 54d0665db9..0918cc2918 100644 > > --- a/doc/guides/nics/ngbe.rst > > +++ b/doc/guides/nics/ngbe.rst > > @@ -8,6 +8,11 @@ The NGBE PMD (librte_pmd_ngbe) provides poll mode > > driver support for Wangxun 1 Gigabit Ethernet NICs. > > > > > > +Features > > +-------- > > + > > +- Link state information > > + > > Two empty lines before the section. > > > Prerequisites > > ------------- > > > > [snip] > > > diff --git a/drivers/net/ngbe/ngbe_ethdev.c > > b/drivers/net/ngbe/ngbe_ethdev.c index deca64137d..c952023e8b 100644 > > --- a/drivers/net/ngbe/ngbe_ethdev.c > > +++ b/drivers/net/ngbe/ngbe_ethdev.c > > @@ -141,6 +175,23 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, > void *init_params __rte_unused) > > return -ENOMEM; > > } > > > > + ctrl_ext = rd32(hw, NGBE_PORTCTL); > > + /* let hardware know driver is loaded */ > > + ctrl_ext |= NGBE_PORTCTL_DRVLOAD; > > + /* Set PF Reset Done bit so PF/VF Mail Ops can work */ > > + ctrl_ext |= NGBE_PORTCTL_RSTDONE; > > + wr32(hw, NGBE_PORTCTL, ctrl_ext); > > + ngbe_flush(hw); > > + > > + rte_intr_callback_register(intr_handle, > > + ngbe_dev_interrupt_handler, eth_dev); > > + > > + /* enable uio/vfio intr/eventfd mapping */ > > + rte_intr_enable(intr_handle); > > + > > + /* enable support intr */ > > + ngbe_enable_intr(eth_dev); > > + > > I don't understand why it is done unconditionally regardless of the > corresponding bit in dev_conf. Sorry...I don't quite understand what you mean. > > > return 0; > > } > >