Skip to contentSkip to conversation

eth: bnxt: disable rx-copybreak by default

PATCH Superseded Jakub Kicinski 2 participants 2 messages May 29 – May 30

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 eth: bnxt: disable rx-copybreak by default

rx-copybreak requires an extra slab allocation. Since bnxt uses page pool frags and HDS by default, the rx-copybreak doesn't buy us anything. The extra pressure on slab causes overload on pre-sheaves kernels on modern AMD platforms.

In synthetic testing on net-next this patch shows little difference but I think copybreak is "obvious waste" at this point.

Default rx-copybreak threshold to 0 / disabled.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -1
index 61c847b36b9f..044084af2254 100644
@@ -36,7 +36,7 @@
 #include <linux/firmware/broadcom/tee_bnxt_fw.h>
 #endif
 
-#define BNXT_DEFAULT_RX_COPYBREAK 256
+#define BNXT_DEFAULT_RX_COPYBREAK 0
 #define BNXT_MAX_RX_COPYBREAK 1024
 
 extern struct list_head bnxt_block_cb_list;
Signature · 1 line
2.54.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jakub Kicinski

rx-copybreak requires an extra slab allocation. Since bnxt uses page pool frags and HDS by default, the rx-copybreak doesn't buy us anything. The extra pressure on slab causes overload on pre-sheaves kernels on modern AMD platforms.

In synthetic testing on net-next this patch shows little difference but I think copybreak is "obvious waste" at this point.

Quoted 7 lines

Default rx-copybreak threshold to 0 / disabled.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Fine by me. We can always use set-tunable.

Quoted 16 lines
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -2
index 61c847b36b9f..044084af2254 100644
@@ -36,7 +36,7 @@
 #include <linux/firmware/broadcom/tee_bnxt_fw.h>
 #endif
 
-#define BNXT_DEFAULT_RX_COPYBREAK 256
+#define BNXT_DEFAULT_RX_COPYBREAK 0
 #define BNXT_MAX_RX_COPYBREAK 1024
 
 extern struct list_head bnxt_block_cb_list;
--

2.54.0