Message ID | 20240729205459.2583533-4-dw@davidwei.uk (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | fix bnxt_en queue reset when queue is active | expand |
On 29.07.2024 22:54, David Wei wrote: > The queue API calls bnxt_hwrm_vnic_update() to stop/start the flow of > packets. It can only be called if BNXT_SUPPORTS_NTUPLE_VNIC(), so key > support for it by only setting queue_mgmt_ops if this is true. > > Signed-off-by: David Wei <dw@davidwei.uk> > --- Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c > index ce60c9322fe6..2801ae94d87b 100644 > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c > @@ -15713,7 +15713,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) > dev->stat_ops = &bnxt_stat_ops; > dev->watchdog_timeo = BNXT_TX_TIMEOUT; > dev->ethtool_ops = &bnxt_ethtool_ops; > - dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops; > pci_set_drvdata(pdev, dev); > > rc = bnxt_alloc_hwrm_resources(bp); > @@ -15892,8 +15891,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) > > INIT_LIST_HEAD(&bp->usr_fltr_list); > > - if (BNXT_SUPPORTS_NTUPLE_VNIC(bp)) > + if (BNXT_SUPPORTS_NTUPLE_VNIC(bp)) { > bp->rss_cap |= BNXT_RSS_CAP_MULTI_RSS_CTX; > + dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops; > + } > > rc = register_netdev(dev); > if (rc)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index ce60c9322fe6..2801ae94d87b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -15713,7 +15713,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) dev->stat_ops = &bnxt_stat_ops; dev->watchdog_timeo = BNXT_TX_TIMEOUT; dev->ethtool_ops = &bnxt_ethtool_ops; - dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops; pci_set_drvdata(pdev, dev); rc = bnxt_alloc_hwrm_resources(bp); @@ -15892,8 +15891,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) INIT_LIST_HEAD(&bp->usr_fltr_list); - if (BNXT_SUPPORTS_NTUPLE_VNIC(bp)) + if (BNXT_SUPPORTS_NTUPLE_VNIC(bp)) { bp->rss_cap |= BNXT_RSS_CAP_MULTI_RSS_CTX; + dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops; + } rc = register_netdev(dev); if (rc)
The queue API calls bnxt_hwrm_vnic_update() to stop/start the flow of packets. It can only be called if BNXT_SUPPORTS_NTUPLE_VNIC(), so key support for it by only setting queue_mgmt_ops if this is true. Signed-off-by: David Wei <dw@davidwei.uk> --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)