diff mbox series

[net-next,v2,4/4] bnxt_en: only set dev->queue_mgmt_ops if BNXT_SUPPORTS_NTUPLE_VNIC

Message ID 20240731131542.3359733-5-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

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 42 this patch: 42
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 43 this patch: 43
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 45 this patch: 45
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 18 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 2 this patch: 2
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-08-01--06-00 (tests: 707)

Commit Message

David Wei July 31, 2024, 1:15 p.m. UTC
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(-)

Comments

Michael Chan Aug. 1, 2024, 1:33 a.m. UTC | #1
On Wed, Jul 31, 2024 at 6:15 AM David Wei <dw@davidwei.uk> 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>
> ---
>  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)) {

Thanks for the patch.  We found out during internal testing that an
additional FW fix is required to make the ring restart 100% reliable
with traffic.  FW needs to add one more step to flush the RX pipeline
during HWRM_VNIC_UPDATE.  Once we determine which FW versions will
have the fix, we can add the conditional check here to make this patch
more complete.  I think we just need about a week to determine that.
Please hold off on this patchset.  Thanks.
David Wei Aug. 1, 2024, 8:59 a.m. UTC | #2
On 2024-08-01 02:33, Michael Chan wrote:
> On Wed, Jul 31, 2024 at 6:15 AM David Wei <dw@davidwei.uk> 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>
>> ---
>>  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)) {
> 
> Thanks for the patch.  We found out during internal testing that an
> additional FW fix is required to make the ring restart 100% reliable
> with traffic.  FW needs to add one more step to flush the RX pipeline
> during HWRM_VNIC_UPDATE.  Once we determine which FW versions will
> have the fix, we can add the conditional check here to make this patch
> more complete.  I think we just need about a week to determine that.
> Please hold off on this patchset.  Thanks.

Got it, no problem. Let me know the FW version and I'll gate the ops
behind it. Thanks.
diff mbox series

Patch

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)