> Subject: [PATCH v4 2/2] net/ice: get link status updates via adminq message
> 
> Rather than relying directly on an interrupt we get link status updates
> from the device firmware via adminq messages.
> 
> Signed-off-by: Bruce Richardson <[email protected]>
> ---
>  drivers/net/intel/ice/ice_ethdev.c | 48 ++++++++++--------------------
>  1 file changed, 16 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/net/intel/ice/ice_ethdev.c
> b/drivers/net/intel/ice/ice_ethdev.c
> index a59ca2e047..8286816f06 100644
> --- a/drivers/net/intel/ice/ice_ethdev.c
> +++ b/drivers/net/intel/ice/ice_ethdev.c

snip

> 
>  static void
> @@ -4393,6 +4374,7 @@ ice_dev_start(struct rte_eth_dev *dev)
>       struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
>       struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
>       struct ice_vsi *vsi = pf->main_vsi;
> +     struct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);
>       struct ice_adapter *ad =
>                       ICE_DEV_PRIVATE_TO_ADAPTER(dev->data-
> >dev_private);
>       uint16_t nb_rxq = 0;
> @@ -4443,6 +4425,8 @@ ice_dev_start(struct rte_eth_dev *dev)
>       if (ice_rxq_intr_setup(dev))
>               return -EIO;
> 
> +     rte_intr_enable(pci_dev->intr_handle);

Looks good to me.
I simulated link up/down and verified that the adminq messages were received as 
expected.

I'm wondering if the call to rte_intr_enable is needed here? It's already 
called in ice_rxq_intr_setup.

Other than that LGTM.

Acked-by: Ciara Loftus <[email protected]>

> +
>       /* Enable receiving broadcast packets and transmitting packets */
>       ice_set_bit(ICE_PROMISC_BCAST_RX, pmask);
>       ice_set_bit(ICE_PROMISC_BCAST_TX, pmask);
> --
> 2.51.0

Reply via email to