* [PATCH net 0/3] bnxt_en: Bug fixes
@ 2024-04-05 23:55 Michael Chan
2024-04-05 23:55 ` [PATCH net 1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init() Michael Chan
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michael Chan @ 2024-04-05 23:55 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, kuba, pabeni, pavan.chebbi, andrew.gospodarek
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
The first 2 patches fix 2 potential issues in the aux bus initialization
and error recovery paths. The 3rd patch fixes a potential PTP TX
timestamp issue during error recovery.
Pavan Chebbi (1):
bnxt_en: Reset PTP tx_avail after possible firmware reset
Vikas Gupta (2):
bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
bnxt_en: Fix error recovery for RoCE ulp client
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.30.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
2024-04-05 23:55 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
@ 2024-04-05 23:55 ` Michael Chan
2024-04-05 23:55 ` [PATCH net 2/3] bnxt_en: Fix error recovery for RoCE ulp client Michael Chan
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michael Chan @ 2024-04-05 23:55 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, kuba, pabeni, pavan.chebbi, andrew.gospodarek,
Vikas Gupta
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
From: Vikas Gupta <vikas.gupta@broadcom.com>
If ulp = kzalloc() fails, the allocated edev will leak because it is
not properly assigned and the cleanup path will not be able to free it.
Fix it by assigning it properly immediately after allocation.
Fixes: 303432211324 ("bnxt_en: Remove runtime interrupt vector allocation")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
index 93f9bd55020f..a5f9c9090a6b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
@@ -392,12 +392,13 @@ void bnxt_rdma_aux_device_init(struct bnxt *bp)
if (!edev)
goto aux_dev_uninit;
+ aux_priv->edev = edev;
+
ulp = kzalloc(sizeof(*ulp), GFP_KERNEL);
if (!ulp)
goto aux_dev_uninit;
edev->ulp_tbl = ulp;
- aux_priv->edev = edev;
bp->edev = edev;
bnxt_set_edev_info(edev, bp);
--
2.30.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 2/3] bnxt_en: Fix error recovery for RoCE ulp client
2024-04-05 23:55 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
2024-04-05 23:55 ` [PATCH net 1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init() Michael Chan
@ 2024-04-05 23:55 ` Michael Chan
2024-04-05 23:55 ` [PATCH net 3/3] bnxt_en: Reset PTP tx_avail after possible firmware reset Michael Chan
2024-04-08 13:00 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Michael Chan @ 2024-04-05 23:55 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, kuba, pabeni, pavan.chebbi, andrew.gospodarek,
Vikas Gupta
[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]
From: Vikas Gupta <vikas.gupta@broadcom.com>
Since runtime MSIXs vector allocation/free has been removed,
the L2 driver needs to repopulate the MSIX entries for the
ulp client as the irq table may change during the recovery
process.
Fixes: 303432211324 ("bnxt_en: Remove runtime interrupt vector allocation")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
index a5f9c9090a6b..195c02dc0683 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
@@ -210,6 +210,9 @@ void bnxt_ulp_start(struct bnxt *bp, int err)
if (err)
return;
+ if (edev->ulp_tbl->msix_requested)
+ bnxt_fill_msix_vecs(bp, edev->msix_entries);
+
if (aux_priv) {
struct auxiliary_device *adev;
--
2.30.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 3/3] bnxt_en: Reset PTP tx_avail after possible firmware reset
2024-04-05 23:55 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
2024-04-05 23:55 ` [PATCH net 1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init() Michael Chan
2024-04-05 23:55 ` [PATCH net 2/3] bnxt_en: Fix error recovery for RoCE ulp client Michael Chan
@ 2024-04-05 23:55 ` Michael Chan
2024-04-08 13:00 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Michael Chan @ 2024-04-05 23:55 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, kuba, pabeni, pavan.chebbi, andrew.gospodarek,
Kalesh AP
[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]
From: Pavan Chebbi <pavan.chebbi@broadcom.com>
It is possible that during error recovery and firmware reset,
there is a pending TX PTP packet waiting for the timestamp.
We need to reset this condition so that after recovery, the
tx_avail count for PTP is reset back to the initial value.
Otherwise, we may not accept any PTP TX timestamps after
recovery.
Fixes: 118612d519d8 ("bnxt_en: Add PTP clock APIs, ioctls, and ethtool methods")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 493b724848c8..57e61f963167 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -11758,6 +11758,8 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
/* VF-reps may need to be re-opened after the PF is re-opened */
if (BNXT_PF(bp))
bnxt_vf_reps_open(bp);
+ if (bp->ptp_cfg)
+ atomic_set(&bp->ptp_cfg->tx_avail, BNXT_MAX_TX_TS);
bnxt_ptp_init_rtc(bp, true);
bnxt_ptp_cfg_tstamp_filters(bp);
bnxt_cfg_usr_fltrs(bp);
--
2.30.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 0/3] bnxt_en: Bug fixes
2024-04-05 23:55 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
` (2 preceding siblings ...)
2024-04-05 23:55 ` [PATCH net 3/3] bnxt_en: Reset PTP tx_avail after possible firmware reset Michael Chan
@ 2024-04-08 13:00 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-08 13:00 UTC (permalink / raw)
To: Michael Chan
Cc: davem, netdev, edumazet, kuba, pabeni, pavan.chebbi,
andrew.gospodarek
Hello:
This series was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 5 Apr 2024 16:55:10 -0700 you wrote:
> The first 2 patches fix 2 potential issues in the aux bus initialization
> and error recovery paths. The 3rd patch fixes a potential PTP TX
> timestamp issue during error recovery.
>
> Pavan Chebbi (1):
> bnxt_en: Reset PTP tx_avail after possible firmware reset
>
> [...]
Here is the summary with links:
- [net,1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
https://git.kernel.org/netdev/net/c/7ac10c7d728d
- [net,2/3] bnxt_en: Fix error recovery for RoCE ulp client
https://git.kernel.org/netdev/net/c/b5ea7d33ba2a
- [net,3/3] bnxt_en: Reset PTP tx_avail after possible firmware reset
https://git.kernel.org/netdev/net/c/faa12ca24558
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-08 13:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 23:55 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
2024-04-05 23:55 ` [PATCH net 1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init() Michael Chan
2024-04-05 23:55 ` [PATCH net 2/3] bnxt_en: Fix error recovery for RoCE ulp client Michael Chan
2024-04-05 23:55 ` [PATCH net 3/3] bnxt_en: Reset PTP tx_avail after possible firmware reset Michael Chan
2024-04-08 13:00 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).