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 <jiawe...@trustnetic.com> > > [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; > > } > >