All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/5] bnxt_en: Bug fixes
@ 2022-12-27  3:19 Michael Chan
  2022-12-27  3:19 ` [PATCH net 1/5] bnxt_en: fix devlink port registration to netdev Michael Chan
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Michael Chan @ 2022-12-27  3:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edumazet, pabeni, bpf, gospo

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

This series fixes a devlink bug and several XDP related bugs.  The
devlink bug causes a kernel crash on VF devices.  The XDP driver
patches fix and clean up the RX XDP path and re-enable header-data
split that was disabled by mistake when adding the XDP multi-buffer
support.

Michael Chan (4):
  bnxt_en: Simplify bnxt_xdp_buff_init()
  bnxt_en: Fix XDP RX path
  bnxt_en: Fix first buffer size calculations for XDP multi-buffer
  bnxt_en: Fix HDS and jumbo thresholds for RX packets

Vikas Gupta (1):
  bnxt_en: fix devlink port registration to netdev

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 27 +++++++++++--------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     | 15 ++++++++---
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 20 +++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h |  6 ++---
 4 files changed, 39 insertions(+), 29 deletions(-)

-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 1/5] bnxt_en: fix devlink port registration to netdev
  2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
@ 2022-12-27  3:19 ` Michael Chan
  2022-12-27  3:19 ` [PATCH net 2/5] bnxt_en: Simplify bnxt_xdp_buff_init() Michael Chan
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 26+ messages in thread
From: Michael Chan @ 2022-12-27  3:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edumazet, pabeni, bpf, gospo, Vikas Gupta, Jiri Pirko

[-- Attachment #1: Type: text/plain, Size: 3469 bytes --]

From: Vikas Gupta <vikas.gupta@broadcom.com>

We don't register a devlink port in case of a VF so
avoid setting the devlink pointer to netdev.
Also, SET_NETDEV_DEVLINK_PORT has to be moved
so that we determine whether the device is PF/VF first.

This fixes the NULL pointer dereference of devlink_port->devlink
when creating VFs:

BUG: kernel NULL pointer dereference, address: 0000000000000160
PGD 0
Oops: 0000 [#1] PREEMPT SMP NOPTI
CPU: 14 PID: 388 Comm: kworker/14:1 Kdump: loaded Not tainted 6.1.0-rc8 #5
Hardware name: Dell Inc. PowerEdge R750/06V45N, BIOS 1.3.8 08/31/2021
Workqueue: events work_for_cpu_fn
RIP: 0010:devlink_nl_port_handle_size+0xb/0x50
Code: 83 c4 10 5b 5d c3 cc cc cc cc b8 a6 ff ff ff eb de e8 c9 59 21 00 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 53 48 8b 47 20 <48> 8b a8 60 01 00 00 48 8b 45 60 48 8b 38 e8 92 90 1a 00 48 8b 7d
RSP: 0018:ff4fe5394846fcd8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000794 RCX: 0000000000000000
RDX: ff1f129683a30a40 RSI: 0000000000000008 RDI: ff1f1296bb496188
RBP: 0000000000000334 R08: 0000000000000cc0 R09: 0000000000000000
R10: ff1f1296bb494298 R11: ffffffffffffffc0 R12: 0000000000000000
R13: 0000000000000000 R14: ff1f1296bb494000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ff1f129e5fa00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000160 CR3: 000000131f610006 CR4: 0000000000771ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 <TASK>
 if_nlmsg_size+0x14a/0x220
 rtmsg_ifinfo_build_skb+0x3c/0x100
 rtmsg_ifinfo+0x9c/0xc0
 register_netdevice+0x59d/0x670
 register_netdev+0x1c/0x40
 bnxt_init_one+0x674/0xa60 [bnxt_en]
 local_pci_probe+0x42/0x80
 work_for_cpu_fn+0x13/0x20
 process_one_work+0x1e2/0x3b0
 ? rescuer_thread+0x390/0x390
 worker_thread+0x1c4/0x3a0
 ? rescuer_thread+0x390/0x390
 kthread+0xd6/0x100
 ? kthread_complete_and_exit+0x20/0x20

Fixes: ac73d4bf2cda ("net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port")
Cc: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 4c7d07c684c4..93d32b333007 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -13591,7 +13591,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		return -ENOMEM;
 
 	bp = netdev_priv(dev);
-	SET_NETDEV_DEVLINK_PORT(dev, &bp->dl_port);
 	bp->board_idx = ent->driver_data;
 	bp->msg_enable = BNXT_DEF_MSG_ENABLE;
 	bnxt_set_max_func_irqs(bp, max_irqs);
@@ -13599,6 +13598,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (bnxt_vf_pciid(bp->board_idx))
 		bp->flags |= BNXT_FLAG_VF;
 
+	/* No devlink port registration in case of a VF */
+	if (BNXT_PF(bp))
+		SET_NETDEV_DEVLINK_PORT(dev, &bp->dl_port);
+
 	if (pdev->msix_cap)
 		bp->flags |= BNXT_FLAG_MSIX_CAP;
 
-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH net 2/5] bnxt_en: Simplify bnxt_xdp_buff_init()
  2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
  2022-12-27  3:19 ` [PATCH net 1/5] bnxt_en: fix devlink port registration to netdev Michael Chan
@ 2022-12-27  3:19 ` Michael Chan
  2022-12-27  3:19 ` [PATCH net 3/5] bnxt_en: Fix XDP RX path Michael Chan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 26+ messages in thread
From: Michael Chan @ 2022-12-27  3:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edumazet, pabeni, bpf, gospo

[-- Attachment #1: Type: text/plain, Size: 3212 bytes --]

bnxt_xdp_buff_init() does not modify the data_ptr or the len parameters,
so no need to pass in the addresses of these parameters.

Fixes: b231c3f3414c ("bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 6 +++---
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 93d32b333007..b8639b7e6b2b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1925,7 +1925,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 	dma_addr = rx_buf->mapping;
 
 	if (bnxt_xdp_attached(bp, rxr)) {
-		bnxt_xdp_buff_init(bp, rxr, cons, &data_ptr, &len, &xdp);
+		bnxt_xdp_buff_init(bp, rxr, cons, data_ptr, len, &xdp);
 		if (agg_bufs) {
 			u32 frag_len = bnxt_rx_agg_pages_xdp(bp, cpr, &xdp,
 							     cp_cons, agg_bufs,
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index c3065ec0a479..1847f191577d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -177,7 +177,7 @@ bool bnxt_xdp_attached(struct bnxt *bp, struct bnxt_rx_ring_info *rxr)
 }
 
 void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
-			u16 cons, u8 **data_ptr, unsigned int *len,
+			u16 cons, u8 *data_ptr, unsigned int len,
 			struct xdp_buff *xdp)
 {
 	struct bnxt_sw_rx_bd *rx_buf;
@@ -191,13 +191,13 @@ void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
 	offset = bp->rx_offset;
 
 	mapping = rx_buf->mapping - bp->rx_dma_offset;
-	dma_sync_single_for_cpu(&pdev->dev, mapping + offset, *len, bp->rx_dir);
+	dma_sync_single_for_cpu(&pdev->dev, mapping + offset, len, bp->rx_dir);
 
 	if (bp->xdp_has_frags)
 		buflen = BNXT_PAGE_MODE_BUF_SIZE + offset;
 
 	xdp_init_buff(xdp, buflen, &rxr->xdp_rxq);
-	xdp_prepare_buff(xdp, *data_ptr - offset, offset, *len, false);
+	xdp_prepare_buff(xdp, data_ptr - offset, offset, len, false);
 }
 
 void bnxt_xdp_buff_frags_free(struct bnxt_rx_ring_info *rxr,
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
index 505911ae095d..2bbdb8e7c506 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
@@ -27,7 +27,7 @@ int bnxt_xdp_xmit(struct net_device *dev, int num_frames,
 bool bnxt_xdp_attached(struct bnxt *bp, struct bnxt_rx_ring_info *rxr);
 
 void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
-			u16 cons, u8 **data_ptr, unsigned int *len,
+			u16 cons, u8 *data_ptr, unsigned int len,
 			struct xdp_buff *xdp);
 void bnxt_xdp_buff_frags_free(struct bnxt_rx_ring_info *rxr,
 			      struct xdp_buff *xdp);
-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH net 3/5] bnxt_en: Fix XDP RX path
  2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
  2022-12-27  3:19 ` [PATCH net 1/5] bnxt_en: fix devlink port registration to netdev Michael Chan
  2022-12-27  3:19 ` [PATCH net 2/5] bnxt_en: Simplify bnxt_xdp_buff_init() Michael Chan
@ 2022-12-27  3:19 ` Michael Chan
  2022-12-27  3:19 ` [PATCH net 4/5] bnxt_en: Fix first buffer size calculations for XDP multi-buffer Michael Chan
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 26+ messages in thread
From: Michael Chan @ 2022-12-27  3:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edumazet, pabeni, bpf, gospo

[-- Attachment #1: Type: text/plain, Size: 3254 bytes --]

The XDP program can change the starting address of the RX data buffer and
this information needs to be passed back from bnxt_rx_xdp() to
bnxt_rx_pkt() for the XDP_PASS case so that the SKB can point correctly
to the modified buffer address.  Add back the data_ptr parameter to
bnxt_rx_xdp() to make this work.

Fixes: b231c3f3414c ("bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 7 +++++--
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 4 ++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index b8639b7e6b2b..1acabfe26db1 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1940,7 +1940,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 	}
 
 	if (xdp_active) {
-		if (bnxt_rx_xdp(bp, rxr, cons, xdp, data, &len, event)) {
+		if (bnxt_rx_xdp(bp, rxr, cons, xdp, data, &data_ptr, &len, event)) {
 			rc = 1;
 			goto next_rx;
 		}
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index 1847f191577d..2ceeaa818c1c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -222,7 +222,8 @@ void bnxt_xdp_buff_frags_free(struct bnxt_rx_ring_info *rxr,
  * false   - packet should be passed to the stack.
  */
 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
-		 struct xdp_buff xdp, struct page *page, unsigned int *len, u8 *event)
+		 struct xdp_buff xdp, struct page *page, u8 **data_ptr,
+		 unsigned int *len, u8 *event)
 {
 	struct bpf_prog *xdp_prog = READ_ONCE(rxr->xdp_prog);
 	struct bnxt_tx_ring_info *txr;
@@ -255,8 +256,10 @@ bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
 		*event &= ~BNXT_RX_EVENT;
 
 	*len = xdp.data_end - xdp.data;
-	if (orig_data != xdp.data)
+	if (orig_data != xdp.data) {
 		offset = xdp.data - xdp.data_hard_start;
+		*data_ptr = xdp.data_hard_start + offset;
+	}
 
 	switch (act) {
 	case XDP_PASS:
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
index 2bbdb8e7c506..ea430d6961df 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h
@@ -18,8 +18,8 @@ struct bnxt_sw_tx_bd *bnxt_xmit_bd(struct bnxt *bp,
 				   struct xdp_buff *xdp);
 void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts);
 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
-		 struct xdp_buff xdp, struct page *page, unsigned int *len,
-		 u8 *event);
+		 struct xdp_buff xdp, struct page *page, u8 **data_ptr,
+		 unsigned int *len, u8 *event);
 int bnxt_xdp(struct net_device *dev, struct netdev_bpf *xdp);
 int bnxt_xdp_xmit(struct net_device *dev, int num_frames,
 		  struct xdp_frame **frames, u32 flags);
-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH net 4/5] bnxt_en: Fix first buffer size calculations for XDP multi-buffer
  2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
                   ` (2 preceding siblings ...)
  2022-12-27  3:19 ` [PATCH net 3/5] bnxt_en: Fix XDP RX path Michael Chan
@ 2022-12-27  3:19 ` Michael Chan
  2022-12-27  3:19 ` [PATCH net 5/5] bnxt_en: Fix HDS and jumbo thresholds for RX packets Michael Chan
  2022-12-28 10:20 ` [PATCH net 0/5] bnxt_en: Bug fixes patchwork-bot+netdevbpf
  5 siblings, 0 replies; 26+ messages in thread
From: Michael Chan @ 2022-12-27  3:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edumazet, pabeni, bpf, gospo

[-- Attachment #1: Type: text/plain, Size: 4726 bytes --]

The size of the first buffer is always page size, and the useable
space is the page size minus the offset and the skb_shared_info size.
Make sure SKB and XDP buf sizes match so that the skb_shared_info
is at the same offset seen from the SKB and XDP_BUF.

build_skb() should be passed PAGE_SIZE.  xdp_init_buff() should
be passed PAGE_SIZE as well.  xdp_get_shared_info_from_buff() will
automatically deduct the skb_shared_info size if the XDP buffer
has frags.  There is no need to keep bp->xdp_has_frags.

Change BNXT_PAGE_MODE_BUF_SIZE to BNXT_MAX_PAGE_MODE_MTU_SBUF
since this constant is really the MTU with ethernet header size
subtracted.

Also fix the BNXT_MAX_PAGE_MODE_MTU macro with proper parentheses.

Fixes: 32861236190b ("bnxt: change receive ring space parameters")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |  9 +++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     | 15 +++++++++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |  7 +------
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 1acabfe26db1..a21c6829e301 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -991,8 +991,7 @@ static struct sk_buff *bnxt_rx_multi_page_skb(struct bnxt *bp,
 	dma_addr -= bp->rx_dma_offset;
 	dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
 			     DMA_ATTR_WEAK_ORDERING);
-	skb = build_skb(page_address(page), BNXT_PAGE_MODE_BUF_SIZE +
-					    bp->rx_dma_offset);
+	skb = build_skb(page_address(page), PAGE_SIZE);
 	if (!skb) {
 		__free_page(page);
 		return NULL;
@@ -3969,8 +3968,10 @@ void bnxt_set_ring_params(struct bnxt *bp)
 		bp->rx_agg_ring_mask = (bp->rx_agg_nr_pages * RX_DESC_CNT) - 1;
 
 		if (BNXT_RX_PAGE_MODE(bp)) {
-			rx_space = BNXT_PAGE_MODE_BUF_SIZE;
-			rx_size = BNXT_MAX_PAGE_MODE_MTU;
+			rx_space = PAGE_SIZE;
+			rx_size = PAGE_SIZE -
+				  ALIGN(max(NET_SKB_PAD, XDP_PACKET_HEADROOM), 8) -
+				  SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
 		} else {
 			rx_size = SKB_DATA_ALIGN(BNXT_RX_COPY_THRESH + NET_IP_ALIGN);
 			rx_space = rx_size + NET_SKB_PAD +
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 41c6dd0ae447..5163ef4a49ea 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -591,12 +591,20 @@ struct nqe_cn {
 #define BNXT_RX_PAGE_SIZE (1 << BNXT_RX_PAGE_SHIFT)
 
 #define BNXT_MAX_MTU		9500
-#define BNXT_PAGE_MODE_BUF_SIZE \
+
+/* First RX buffer page in XDP multi-buf mode
+ *
+ * +-------------------------------------------------------------------------+
+ * | XDP_PACKET_HEADROOM | bp->rx_buf_use_size              | skb_shared_info|
+ * | (bp->rx_dma_offset) |                                  |                |
+ * +-------------------------------------------------------------------------+
+ */
+#define BNXT_MAX_PAGE_MODE_MTU_SBUF \
 	((unsigned int)PAGE_SIZE - VLAN_ETH_HLEN - NET_IP_ALIGN -	\
 	 XDP_PACKET_HEADROOM)
 #define BNXT_MAX_PAGE_MODE_MTU	\
-	BNXT_PAGE_MODE_BUF_SIZE - \
-	SKB_DATA_ALIGN((unsigned int)sizeof(struct skb_shared_info))
+	(BNXT_MAX_PAGE_MODE_MTU_SBUF - \
+	 SKB_DATA_ALIGN((unsigned int)sizeof(struct skb_shared_info)))
 
 #define BNXT_MIN_PKT_SIZE	52
 
@@ -2134,7 +2142,6 @@ struct bnxt {
 #define BNXT_DUMP_CRASH		1
 
 	struct bpf_prog		*xdp_prog;
-	u8			xdp_has_frags;
 
 	struct bnxt_ptp_cfg	*ptp_cfg;
 	u8			ptp_all_rx_tstamp;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index 2ceeaa818c1c..36d5202c0aee 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -193,9 +193,6 @@ void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
 	mapping = rx_buf->mapping - bp->rx_dma_offset;
 	dma_sync_single_for_cpu(&pdev->dev, mapping + offset, len, bp->rx_dir);
 
-	if (bp->xdp_has_frags)
-		buflen = BNXT_PAGE_MODE_BUF_SIZE + offset;
-
 	xdp_init_buff(xdp, buflen, &rxr->xdp_rxq);
 	xdp_prepare_buff(xdp, data_ptr - offset, offset, len, false);
 }
@@ -404,10 +401,8 @@ static int bnxt_xdp_set(struct bnxt *bp, struct bpf_prog *prog)
 		netdev_warn(dev, "ethtool rx/tx channels must be combined to support XDP.\n");
 		return -EOPNOTSUPP;
 	}
-	if (prog) {
+	if (prog)
 		tx_xdp = bp->rx_nr_rings;
-		bp->xdp_has_frags = prog->aux->xdp_has_frags;
-	}
 
 	tc = netdev_get_num_tc(dev);
 	if (!tc)
-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH net 5/5] bnxt_en: Fix HDS and jumbo thresholds for RX packets
  2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
                   ` (3 preceding siblings ...)
  2022-12-27  3:19 ` [PATCH net 4/5] bnxt_en: Fix first buffer size calculations for XDP multi-buffer Michael Chan
@ 2022-12-27  3:19 ` Michael Chan
  2022-12-28 10:20 ` [PATCH net 0/5] bnxt_en: Bug fixes patchwork-bot+netdevbpf
  5 siblings, 0 replies; 26+ messages in thread
From: Michael Chan @ 2022-12-27  3:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edumazet, pabeni, bpf, gospo

[-- Attachment #1: Type: text/plain, Size: 2013 bytes --]

The recent XDP multi-buffer feature has introduced regressions in the
setting of HDS and jumbo thresholds.  HDS was accidentally disabled in
the nornmal mode without XDP.  This patch restores jumbo HDS placement
when not in XDP mode.  In XDP multi-buffer mode, HDS should be disabled
and the jumbo threshold should be set to the usable page size in the
first page buffer.

Fixes: 32861236190b ("bnxt: change receive ring space parameters")
Reviewed-by: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index a21c6829e301..16ce7a90610c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -5399,15 +5399,16 @@ static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, u16 vnic_id)
 	req->flags = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT);
 	req->enables = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID);
 
-	if (BNXT_RX_PAGE_MODE(bp) && !BNXT_RX_JUMBO_MODE(bp)) {
+	if (BNXT_RX_PAGE_MODE(bp)) {
+		req->jumbo_thresh = cpu_to_le16(bp->rx_buf_use_size);
+	} else {
 		req->flags |= cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 |
 					  VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6);
 		req->enables |=
 			cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID);
+		req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh);
+		req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh);
 	}
-	/* thresholds not implemented in firmware yet */
-	req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh);
-	req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh);
 	req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
 	return hwrm_req_send(bp, req);
 }
-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes
  2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
                   ` (4 preceding siblings ...)
  2022-12-27  3:19 ` [PATCH net 5/5] bnxt_en: Fix HDS and jumbo thresholds for RX packets Michael Chan
@ 2022-12-28 10:20 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 26+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-28 10:20 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev, kuba, edumazet, pabeni, bpf, gospo

Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 26 Dec 2022 22:19:35 -0500 you wrote:
> This series fixes a devlink bug and several XDP related bugs.  The
> devlink bug causes a kernel crash on VF devices.  The XDP driver
> patches fix and clean up the RX XDP path and re-enable header-data
> split that was disabled by mistake when adding the XDP multi-buffer
> support.
> 
> Michael Chan (4):
>   bnxt_en: Simplify bnxt_xdp_buff_init()
>   bnxt_en: Fix XDP RX path
>   bnxt_en: Fix first buffer size calculations for XDP multi-buffer
>   bnxt_en: Fix HDS and jumbo thresholds for RX packets
> 
> [...]

Here is the summary with links:
  - [net,1/5] bnxt_en: fix devlink port registration to netdev
    https://git.kernel.org/netdev/net/c/0020ae2a4aa8
  - [net,2/5] bnxt_en: Simplify bnxt_xdp_buff_init()
    https://git.kernel.org/netdev/net/c/bbfc17e50ba2
  - [net,3/5] bnxt_en: Fix XDP RX path
    https://git.kernel.org/netdev/net/c/9b3e607871ea
  - [net,4/5] bnxt_en: Fix first buffer size calculations for XDP multi-buffer
    https://git.kernel.org/netdev/net/c/1abeacc1979f
  - [net,5/5] bnxt_en: Fix HDS and jumbo thresholds for RX packets
    https://git.kernel.org/netdev/net/c/a056ebcc30e2

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] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes
  2024-01-17 23:45 Michael Chan
@ 2024-01-19  2:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 26+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-19  2:10 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev, edumazet, kuba, pabeni, andrew.gospodarek

Hello:

This series was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 17 Jan 2024 15:45:10 -0800 you wrote:
> This series contains 5 miscellaneous fixes.  The fixes include adding
> delay for FLR, buffer memory leak, RSS table size calculation,
> ethtool self test kernel warning, and mqprio crash.
> 
> Michael Chan (5):
>   bnxt_en: Wait for FLR to complete during probe
>   bnxt_en: Fix memory leak in bnxt_hwrm_get_rings()
>   bnxt_en: Fix RSS table entries calculation for P5_PLUS chips
>   bnxt_en: Prevent kernel warning when running offline self test
>   bnxt_en: Fix possible crash after creating sw mqprio TCs
> 
> [...]

Here is the summary with links:
  - [net,1/5] bnxt_en: Wait for FLR to complete during probe
    https://git.kernel.org/netdev/net/c/e6602b3c07d8
  - [net,2/5] bnxt_en: Fix memory leak in bnxt_hwrm_get_rings()
    https://git.kernel.org/netdev/net/c/a261fd41f44f
  - [net,3/5] bnxt_en: Fix RSS table entries calculation for P5_PLUS chips
    https://git.kernel.org/netdev/net/c/602801d18667
  - [net,4/5] bnxt_en: Prevent kernel warning when running offline self test
    https://git.kernel.org/netdev/net/c/7d544a01450e
  - [net,5/5] bnxt_en: Fix possible crash after creating sw mqprio TCs
    https://git.kernel.org/netdev/net/c/bb89cf26f515

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] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes
@ 2024-01-17 23:45 Michael Chan
  2024-01-19  2:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2024-01-17 23:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, kuba, pabeni, andrew.gospodarek

[-- Attachment #1: Type: text/plain, Size: 850 bytes --]

This series contains 5 miscellaneous fixes.  The fixes include adding
delay for FLR, buffer memory leak, RSS table size calculation,
ethtool self test kernel warning, and mqprio crash.

Michael Chan (5):
  bnxt_en: Wait for FLR to complete during probe
  bnxt_en: Fix memory leak in bnxt_hwrm_get_rings()
  bnxt_en: Fix RSS table entries calculation for P5_PLUS chips
  bnxt_en: Prevent kernel warning when running offline self test
  bnxt_en: Fix possible crash after creating sw mqprio TCs

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 49 +++++++++++++------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c |  2 +-
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  7 +--
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |  2 +-
 5 files changed, 42 insertions(+), 19 deletions(-)

-- 
2.30.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes
  2021-09-05 18:10 Michael Chan
@ 2021-09-05 19:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 26+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-05 19:50 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev, kuba, edwin.peer, gospo

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Sun,  5 Sep 2021 14:10:54 -0400 you wrote:
> This series includes 3 fixes related to devlink firmware and chip
> versions.  The other 2 patches fix a UDP tunneling issue and an
> error recovery issue.
> 
> Edwin Peer (2):
>   bnxt_en: fix stored FW_PSID version masks
>   bnxt_en: fix read of stored FW_PSID version on P5 devices
> 
> [...]

Here is the summary with links:
  - [net,1/5] bnxt_en: fix stored FW_PSID version masks
    https://git.kernel.org/netdev/net/c/1656db67233e
  - [net,2/5] bnxt_en: fix read of stored FW_PSID version on P5 devices
    https://git.kernel.org/netdev/net/c/beb55fcf950f
  - [net,3/5] bnxt_en: Fix asic.rev in devlink dev info command
    https://git.kernel.org/netdev/net/c/6fdab8a3ade2
  - [net,4/5] bnxt_en: Fix UDP tunnel logic
    https://git.kernel.org/netdev/net/c/7ae9dc356f24
  - [net,5/5] bnxt_en: Fix possible unintended driver initiated error recovery
    https://git.kernel.org/netdev/net/c/1b2b91831983

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] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes
@ 2021-09-05 18:10 Michael Chan
  2021-09-05 19:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2021-09-05 18:10 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, edwin.peer, gospo

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

This series includes 3 fixes related to devlink firmware and chip
versions.  The other 2 patches fix a UDP tunneling issue and an
error recovery issue.

Edwin Peer (2):
  bnxt_en: fix stored FW_PSID version masks
  bnxt_en: fix read of stored FW_PSID version on P5 devices

Michael Chan (3):
  bnxt_en: Fix asic.rev in devlink dev info command
  bnxt_en: Fix UDP tunnel logic
  bnxt_en: Fix possible unintended driver initiated error recovery

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 53 ++++++++++++-------
 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 51 ++++++++++++------
 .../net/ethernet/broadcom/bnxt/bnxt_devlink.h |  4 +-
 3 files changed, 72 insertions(+), 36 deletions(-)

-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2020-10-26  4:18 Michael Chan
@ 2020-10-27  1:36 ` Jakub Kicinski
  0 siblings, 0 replies; 26+ messages in thread
From: Jakub Kicinski @ 2020-10-27  1:36 UTC (permalink / raw)
  To: Michael Chan; +Cc: netdev, gospo

On Mon, 26 Oct 2020 00:18:16 -0400 Michael Chan wrote:
> These 5 bug fixes are all related to the firmware reset or AER recovery.
> 2 patches fix the cleanup logic for the workqueue used to handle firmware
> reset and recovery. 1 patch ensures that the chip will have the proper
> BAR addresses latched after fatal AER recovery.  1 patch fixes the
> open path to check for firmware reset abort error.  The last one
> sends the fw reset command unconditionally to fix the AER reset logic.
> 
> Please queue these for -stable as well.  Thanks.

Applied, thanks!

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2020-10-26  4:18 Michael Chan
  2020-10-27  1:36 ` Jakub Kicinski
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2020-10-26  4:18 UTC (permalink / raw)
  To: kuba; +Cc: netdev, gospo

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

These 5 bug fixes are all related to the firmware reset or AER recovery.
2 patches fix the cleanup logic for the workqueue used to handle firmware
reset and recovery. 1 patch ensures that the chip will have the proper
BAR addresses latched after fatal AER recovery.  1 patch fixes the
open path to check for firmware reset abort error.  The last one
sends the fw reset command unconditionally to fix the AER reset logic.

Please queue these for -stable as well.  Thanks.

Michael Chan (1):
  bnxt_en: Check abort error state in bnxt_open_nic().

Vasundhara Volam (4):
  bnxt_en: Fix regression in workqueue cleanup logic in
    bnxt_remove_one().
  bnxt_en: Invoke cancel_delayed_work_sync() for PFs also.
  bnxt_en: Re-write PCI BARs after PCI fatal error.
  bnxt_en: Send HWRM_FUNC_RESET fw command unconditionally.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 49 ++++++++++++++---------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h |  1 +
 2 files changed, 32 insertions(+), 18 deletions(-)

-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4166 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2020-04-26 20:24 Michael Chan
@ 2020-04-27 18:45 ` David Miller
  0 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2020-04-27 18:45 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Sun, 26 Apr 2020 16:24:37 -0400

> A collection of 5 miscellaneous bug fixes covering VF anti-spoof setup
> issues, devlink MSIX max value, AER, context memory allocation error
> path, and VLAN acceleration logic.
> 
> Please queue for -stable.  Thanks.

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2020-04-26 20:24 Michael Chan
  2020-04-27 18:45 ` David Miller
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2020-04-26 20:24 UTC (permalink / raw)
  To: davem; +Cc: netdev

A collection of 5 miscellaneous bug fixes covering VF anti-spoof setup
issues, devlink MSIX max value, AER, context memory allocation error
path, and VLAN acceleration logic.

Please queue for -stable.  Thanks.

Michael Chan (4):
  bnxt_en: Fix VF anti-spoof filter setup.
  bnxt_en: Improve AER slot reset.
  bnxt_en: Return error when allocating zero size context memory.
  bnxt_en: Fix VLAN acceleration handling in bnxt_fix_features().

Vasundhara Volam (1):
  bnxt_en: Reduce BNXT_MSIX_VEC_MAX value to supported CQs per PF.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 20 +++++++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         |  1 -
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h |  2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c   | 10 ++--------
 4 files changed, 16 insertions(+), 17 deletions(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2020-03-22 20:40 Michael Chan
  2020-03-23 17:27 ` Jakub Kicinski
@ 2020-03-24  4:43 ` David Miller
  1 sibling, 0 replies; 26+ messages in thread
From: David Miller @ 2020-03-24  4:43 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Sun, 22 Mar 2020 16:40:00 -0400

> 5 bug fix patches covering an indexing bug for priority counters, memory
> leak when retrieving DCB ETS settings, error path return code, proper
> disabling of PCI before freeing context memory, and proper ring accounting
> in error path.

Series applied.

> Please also apply these to -stable.  Thanks.

Queued up, thanks.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2020-03-22 20:40 Michael Chan
@ 2020-03-23 17:27 ` Jakub Kicinski
  2020-03-24  4:43 ` David Miller
  1 sibling, 0 replies; 26+ messages in thread
From: Jakub Kicinski @ 2020-03-23 17:27 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev

On Sun, 22 Mar 2020 16:40:00 -0400 Michael Chan wrote:
> 5 bug fix patches covering an indexing bug for priority counters, memory
> leak when retrieving DCB ETS settings, error path return code, proper
> disabling of PCI before freeing context memory, and proper ring accounting
> in error path.
> 
> Please also apply these to -stable.  Thanks.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2020-03-22 20:40 Michael Chan
  2020-03-23 17:27 ` Jakub Kicinski
  2020-03-24  4:43 ` David Miller
  0 siblings, 2 replies; 26+ messages in thread
From: Michael Chan @ 2020-03-22 20:40 UTC (permalink / raw)
  To: davem; +Cc: netdev

5 bug fix patches covering an indexing bug for priority counters, memory
leak when retrieving DCB ETS settings, error path return code, proper
disabling of PCI before freeing context memory, and proper ring accounting
in error path.

Please also apply these to -stable.  Thanks.

Edwin Peer (1):
  bnxt_en: fix memory leaks in bnxt_dcbnl_ieee_getets()

Michael Chan (3):
  bnxt_en: Fix Priority Bytes and Packets counters in ethtool -S.
  bnxt_en: Return error if bnxt_alloc_ctx_mem() fails.
  bnxt_en: Free context memory after disabling PCI in probe error path.

Vasundhara Volam (1):
  bnxt_en: Reset rings if ring reservation fails during open()

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 28 ++++++++++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         |  2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c     | 15 ++++++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  8 +++----
 4 files changed, 35 insertions(+), 18 deletions(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2019-10-21  5:34 Michael Chan
@ 2019-10-22 20:29 ` Jakub Kicinski
  0 siblings, 0 replies; 26+ messages in thread
From: Jakub Kicinski @ 2019-10-22 20:29 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev, vasundhara-v.volam

On Mon, 21 Oct 2019 01:34:24 -0400, Michael Chan wrote:
> Devlink and error recovery bug fix patches.  Most of the work is by
> Vasundhara Volam.  

Thanks, applied.

> Please queue patch 1 and 2 for -stable also.  Thanks.

FWIW these will likely only reach 5.3 since it looks like the bug dates
to 5.1 but 5.1 and 5.2 branches of stable are already EOL.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2019-10-21  5:34 Michael Chan
  2019-10-22 20:29 ` Jakub Kicinski
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2019-10-21  5:34 UTC (permalink / raw)
  To: davem; +Cc: netdev, vasundhara-v.volam

Devlink and error recovery bug fix patches.  Most of the work is by
Vasundhara Volam.  Please queue patch 1 and 2 for -stable also.  Thanks.

Michael Chan (1):
  bnxt_en: Fix devlink NVRAM related byte order related issues.

Vasundhara Volam (4):
  bnxt_en: Fix the size of devlink MSIX parameters.
  bnxt_en: Adjust the time to wait before polling firmware readiness.
  bnxt_en: Minor formatting changes in FW devlink_health_reporter
  bnxt_en: Avoid disabling pci device in bnxt_remove_one() for already
    disabled device.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         |  10 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 112 +++++++++++++---------
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h |   3 +-
 3 files changed, 73 insertions(+), 52 deletions(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2019-06-29 15:16 Michael Chan
@ 2019-06-30 23:01 ` David Miller
  0 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2019-06-30 23:01 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Sat, 29 Jun 2019 11:16:43 -0400

> Miscellaneous bug fix patches, including two resource handling fixes for
> the RDMA driver, a PCI shutdown patch to add pci_disable_device(), a patch
> to fix ethtool selftest crash, and the last one suppresses an unnecessry
> error message.

Series applied.

> Please also queue patches 1, 2, and 3 for -stable.  Thanks.

Queued up.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2019-06-29 15:16 Michael Chan
  2019-06-30 23:01 ` David Miller
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2019-06-29 15:16 UTC (permalink / raw)
  To: davem; +Cc: netdev

Miscellaneous bug fix patches, including two resource handling fixes for
the RDMA driver, a PCI shutdown patch to add pci_disable_device(), a patch
to fix ethtool selftest crash, and the last one suppresses an unnecessry
error message.

Please also queue patches 1, 2, and 3 for -stable.  Thanks.

Michael Chan (5):
  bnxt_en: Disable bus master during PCI shutdown and driver unload.
  bnxt_en: Fix ethtool selftest crash under error conditions.
  bnxt_en: Fix statistics context reservation logic for RDMA driver.
  bnxt_en: Cap the returned MSIX vectors to the RDMA driver.
  bnxt_en: Suppress error messages when querying DSCP DCB capabilities.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 20 +++++++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c     |  2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  6 +++---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c     |  4 +++-
 4 files changed, 20 insertions(+), 12 deletions(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2016-02-10 22:33 Michael Chan
@ 2016-02-16 20:51 ` David Miller
  0 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2016-02-16 20:51 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: Michael Chan <mchan@broadcom.com>
Date: Wed, 10 Feb 2016 17:33:45 -0500

> Fixed autoneg logic and some related cleanups, fixed tx push operation,
> and reduced default ring sizes.

Series applied, thanks Michael.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2016-02-10 22:33 Michael Chan
  2016-02-16 20:51 ` David Miller
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2016-02-10 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev

Fixed autoneg logic and some related cleanups, fixed tx push operation,
and reduced default ring sizes.

Michael Chan (5):
  bnxt_en: Fix ethtool autoneg logic.
  bnxt_en: Cleanup and Fix flow control setup logic
  bnxt_en: Remove 20G support and advertise only 40GbaseCR4.
  bnxt_en: Fix implementation of tx push operation.
  bnxt_en: Reduce default ring sizes.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 62 ++++++++++++-----------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         | 15 ++++--
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 46 +++++------------
 3 files changed, 56 insertions(+), 67 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH net 0/5] bnxt_en: Bug fixes.
  2015-11-05 21:25 Michael Chan
@ 2015-11-05 21:35 ` David Miller
  0 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2015-11-05 21:35 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: Michael Chan <mchan@broadcom.com>
Date: Thu, 5 Nov 2015 16:25:46 -0500

> Miscellaneous small bug fixes.

This looks fine, series applied, thanks.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH net 0/5] bnxt_en: Bug fixes.
@ 2015-11-05 21:25 Michael Chan
  2015-11-05 21:35 ` David Miller
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Chan @ 2015-11-05 21:25 UTC (permalink / raw)
  To: davem; +Cc: netdev

Miscellaneous small bug fixes.

Michael Chan (5):
  bnxt_en: Change sp events definitions to represent bit position.
  bnxt_en: Determine tcp/ipv6 RSS hash type correctly.
  bnxt_en: map CAG_REG_LEGACY_INT_STATUS_MASK to GRC window #4
  bnxt_en: Fix comparison of u16 sw_id against negative value.
  bnxt_en: More robust SRIOV cleanup sequence.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c       | 28 ++++++++++++-----
 drivers/net/ethernet/broadcom/bnxt/bnxt.h       | 26 +++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 40 +++++++++++++++++--------
 3 files changed, 64 insertions(+), 30 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-01-19  2:10 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27  3:19 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
2022-12-27  3:19 ` [PATCH net 1/5] bnxt_en: fix devlink port registration to netdev Michael Chan
2022-12-27  3:19 ` [PATCH net 2/5] bnxt_en: Simplify bnxt_xdp_buff_init() Michael Chan
2022-12-27  3:19 ` [PATCH net 3/5] bnxt_en: Fix XDP RX path Michael Chan
2022-12-27  3:19 ` [PATCH net 4/5] bnxt_en: Fix first buffer size calculations for XDP multi-buffer Michael Chan
2022-12-27  3:19 ` [PATCH net 5/5] bnxt_en: Fix HDS and jumbo thresholds for RX packets Michael Chan
2022-12-28 10:20 ` [PATCH net 0/5] bnxt_en: Bug fixes patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2024-01-17 23:45 Michael Chan
2024-01-19  2:10 ` patchwork-bot+netdevbpf
2021-09-05 18:10 Michael Chan
2021-09-05 19:50 ` patchwork-bot+netdevbpf
2020-10-26  4:18 Michael Chan
2020-10-27  1:36 ` Jakub Kicinski
2020-04-26 20:24 Michael Chan
2020-04-27 18:45 ` David Miller
2020-03-22 20:40 Michael Chan
2020-03-23 17:27 ` Jakub Kicinski
2020-03-24  4:43 ` David Miller
2019-10-21  5:34 Michael Chan
2019-10-22 20:29 ` Jakub Kicinski
2019-06-29 15:16 Michael Chan
2019-06-30 23:01 ` David Miller
2016-02-10 22:33 Michael Chan
2016-02-16 20:51 ` David Miller
2015-11-05 21:25 Michael Chan
2015-11-05 21:35 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.