Re: [PATCH] netifd: exclude 20-smp-packet-steering on bcm53xx

2023-02-02 Thread Rafał Miłecki

On 2.02.2023 19:56, John Crispin wrote:

northstar could ship a uci-defaults script to populate UCI for line 37 -->

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering;h=8a86bf75f60040e97a7779628afb0993aee87c50;hb=HEAD#l37


bcm53xx's script actually uses network.@globals[0].packet_steering on
its own. It's on purpose as it's exactly what that script does - it
steers packets across CPUs. It makes it also compatible with existing
UIs which allow setting packet_steering.

It's a matter of target specific steering which gives better results
than the generic one. I also don't think we can write a global script
that will handle perfectly all targets. That is too device specific.

For details see:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=fcbd39689ebfef20c62fe3882d51f3af765e8028

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] netifd: exclude 20-smp-packet-steering on bcm53xx

2023-02-02 Thread John Crispin

northstar could ship a uci-defaults script to populate UCI for line 37 -->

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering;h=8a86bf75f60040e97a7779628afb0993aee87c50;hb=HEAD#l37

On 02.02.23 17:06, Rafał Miłecki wrote:

From: Rafał Miłecki 

bcm53xx comes with custom (more optimized) packet steering. A race
between two scripts was resulting in varying network performance.

Ref: fcbd39689ebf ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki 
---
Is this an acceptable method to handle this?
---
  package/network/config/netifd/Makefile | 4 
  1 file changed, 4 insertions(+)

diff --git a/package/network/config/netifd/Makefile 
b/package/network/config/netifd/Makefile
index 500daaa152..dac325004c 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -45,6 +45,10 @@ define Package/netifd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d/
$(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
+ifneq ($(CONFIG_TARGET_bcm53xx),y)
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/net
+   $(CP) ./files/20-smp-packet-steering $(1)/etc/hotplug.d/net/
+endif
  endef
  
  $(eval $(call BuildPackage,netifd))


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] netifd: exclude 20-smp-packet-steering on bcm53xx

2023-02-02 Thread Felix Fietkau

On 02.02.23 17:06, Rafał Miłecki wrote:

From: Rafał Miłecki 

bcm53xx comes with custom (more optimized) packet steering. A race
between two scripts was resulting in varying network performance.

Ref: fcbd39689ebf ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki 
---
Is this an acceptable method to handle this?
netifd can be shared between multiple targets, so such target specific 
checks can break stuff. I also have some doubts about the bcm53xx 
specific script - some parts look a bit weird to me. Maybe we can find a 
generic way that works for bcm53xx and other targets.


- Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] netifd: exclude 20-smp-packet-steering on bcm53xx

2023-02-02 Thread Rafał Miłecki
From: Rafał Miłecki 

bcm53xx comes with custom (more optimized) packet steering. A race
between two scripts was resulting in varying network performance.

Ref: fcbd39689ebf ("bcm53xx: enable & setup packet steering")
Signed-off-by: Rafał Miłecki 
---
Is this an acceptable method to handle this?
---
 package/network/config/netifd/Makefile | 4 
 1 file changed, 4 insertions(+)

diff --git a/package/network/config/netifd/Makefile 
b/package/network/config/netifd/Makefile
index 500daaa152..dac325004c 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -45,6 +45,10 @@ define Package/netifd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d/
$(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
+ifneq ($(CONFIG_TARGET_bcm53xx),y)
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/net
+   $(CP) ./files/20-smp-packet-steering $(1)/etc/hotplug.d/net/
+endif
 endef
 
 $(eval $(call BuildPackage,netifd))
-- 
2.34.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel