[OpenWrt-Devel] [PATCH 1/1] kmod-sched-cake: drop out of tree package, use kernel version

2019-07-03 Thread Kevin Darbyshire-Bryant
CAKE made it to kernel 4.19 and since OpenWrt now at kernel 4.19 we can
drop the out of tree cake package in base repository.

Add kmod-sched-cake to netsupport so package dependencies are still met.
Similarly CAKE is retained as an optional qdisc module to avoid base
scheduler package size implications.

Backport upstream patches from k5.1 to address some small bugs and
support fwmark usage.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/kernel/kmod-sched-cake/Makefile   |  42 
 package/kernel/linux/modules/netsupport.mk|  16 ++
 ...ly-update-parent-qlen-when-splitting.patch |  50 
 ...-sch_cake-Make-the-dual-modes-fairer.patch | 217 ++
 ...-use-of-connmarks-as-tin-classifiers.patch | 118 ++
 ...erpret-fwmark-parameter-as-a-bitmask.patch | 102 
 6 files changed, 503 insertions(+), 42 deletions(-)
 delete mode 100644 package/kernel/kmod-sched-cake/Makefile
 create mode 100644 
target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
 create mode 100644 
target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
 create mode 100644 
target/linux/generic/backport-4.19/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch
 create mode 100644 
target/linux/generic/backport-4.19/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch

diff --git a/package/kernel/kmod-sched-cake/Makefile 
b/package/kernel/kmod-sched-cake/Makefile
deleted file mode 100644
index 35446641ab..00
--- a/package/kernel/kmod-sched-cake/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (C) 2016 LEDE
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=sched-cake
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
-PKG_SOURCE_DATE:=2019-03-12
-PKG_SOURCE_VERSION:=057c738801e9dc64e8dd72a3fc4f50734214433c
-PKG_MIRROR_HASH:=5bf06a804824db36ae393fc174aeec7b12633176e05a765c0931b39df5bd34df
-PKG_MAINTAINER:=Kevin Darbyshire-Bryant 
-
-include $(INCLUDE_DIR)/package.mk
-
-define KernelPackage/sched-cake
-  SUBMENU:=Network Support
-  TITLE:=Cake fq_codel/blue derived shaper
-  URL:=https://github.com/dtaht/sch_cake
-  FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
-  AUTOLOAD:=$(call AutoLoad,75,sch_cake)
-  DEPENDS:=+kmod-ipt-conntrack
-endef
-
-include $(INCLUDE_DIR)/kernel-defaults.mk
-
-define KernelPackage/sched-cake/description
-  Common Applications Kept Enhanced fq_codel/blue derived shaper
-endef
-
-define Build/Compile
-   $(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules
-endef
-
-$(eval $(call KernelPackage,sched-cake))
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6bd1f33979..9af6cbb674 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -789,6 +789,22 @@ endef
 $(eval $(call KernelPackage,sched-core))
 
 
+define KernelPackage/sched-cake
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Cake fq_codel/blue derived shaper
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_CAKE
+  FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko
+  AUTOLOAD:=$(call AutoProbe,sch_cake)
+  DEPENDS:=+kmod-ipt-conntrack
+endef
+
+define KernelPackage/sched-cake/description
+ Common Applications Kept Enhanced fq_codel/blue derived shaper
+endef
+
+$(eval $(call KernelPackage,sched-cake))
+
 define KernelPackage/sched-flower
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Flower traffic classifier
diff --git 
a/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
 
b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
new file mode 100644
index 00..f6de44568a
--- /dev/null
+++ 
b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
@@ -0,0 +1,50 @@
+From 8c6c37fdc20ec9ffaa342f827a8e20afe736fb0c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= 
+Date: Wed, 9 Jan 2019 17:09:44 +0100
+Subject: [PATCH] sch_cake: Correctly update parent qlen when splitting GSO
+ packets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To ensure parent qdiscs have the same notion of the number of enqueued
+packets even after splitting a GSO packet, update the qdisc tree with the
+number of packets that was added due to the split.
+
+Reported-by: Pete Heist 
+Tested-by: Pete Heist 
+Signed-off-by: Toke Høiland-Jørgensen 
+Signed-off-by: David S. Miller 
+Signed-off-by: Kevin Darbyshire-Bryant 
+---
+ net/sched/sch_cake.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/net/sched/sch_cake.c
 b/net/sched/sch_cake.c
+@@ -1666,7 +1666,7 @@ static s32 cake_enqueue(struct sk_buff *
+   

Re: [OpenWrt-Devel] [PATCH 1/2] ramips: Update ZBT WE1026 DTS-files

2019-07-03 Thread Kristian Evensen
Hi,

On Wed, Jul 3, 2019 at 9:55 AM Rafał Miłecki  wrote:
> Why you didn't cc Alex, so he can ack your relicensing? You also
> didn't care to let us know we need his ack!

While I don't appreciate your tone, I see now that I made a mistake.
When checking the history of the files that I relicense, there are
three more people that should be added to the CC-list (INAGAKI
Hiroshi, Mathias Kresin and Petr Štetiar). I have done so now, thanks
for spotting this and the mistake was of course not intentional.

BR,
Kristian

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


Re: [OpenWrt-Devel] [PATCH 1/2] ramips: Update ZBT WE1026 DTS-files

2019-07-03 Thread Rafał Miłecki
On Sun, 23 Jun 2019 at 11:25, Kristian Evensen
 wrote:
> This commit makes the following changes to the WE1026 DTS-files:
>
> * The parts that are unique to the -5G-version (LED and 5GHz wifi)
> are moved to a separate file, so that WE1026.dtsi can be referenced also
> by the DTS for the -H version.
> * Changed button from polled to interrupt.
> * Use the generic "flash"-name for the spi-nor node.
>
> All changes have been tested on the WE1026-5G-16M and work fine. I.e.,
> the device works as before the DTS-changes.
>
> Signed-off-by: Kristian Evensen 

Why you didn't cc Alex, so he can ack your relicensing? You also
didn't care to let us know we need his ack!

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


[OpenWrt-Devel] [PATCH] base-files: move stage2 upgrade to separated file

2019-07-03 Thread Rafał Miłecki
From: Rafał Miłecki 

do_upgrade_stage2() isn't really any common code. It isn't used anywhere
except for /sbin/sysupgrade that passes it to the stage2.

Moving its code to separated file also simplifies COMMAND variable.

Signed-off-by: Rafał Miłecki 
---
 .../base-files/files/lib/upgrade/common.sh| 22 
 .../base-files/files/lib/upgrade/do_stage2| 25 +++
 package/base-files/files/lib/upgrade/stage2   |  2 +-
 package/base-files/files/sbin/sysupgrade  |  2 +-
 4 files changed, 27 insertions(+), 24 deletions(-)
 create mode 100755 package/base-files/files/lib/upgrade/do_stage2

diff --git a/package/base-files/files/lib/upgrade/common.sh 
b/package/base-files/files/lib/upgrade/common.sh
index 7c4a2af08f..df6b54f79e 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -235,25 +235,3 @@ default_do_upgrade() {
fi
[ $? -ne 0 ] && exit 1
 }
-
-do_upgrade_stage2() {
-   v "Performing system upgrade..."
-   if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
-   platform_do_upgrade "$IMAGE"
-   else
-   default_do_upgrade "$IMAGE"
-   fi
-
-   if [ "$SAVE_CONFIG" -eq 1 ] && type 'platform_copy_config' >/dev/null 
2>/dev/null; then
-   platform_copy_config
-   fi
-
-   v "Upgrade completed"
-   sleep 1
-
-   v "Rebooting system..."
-   umount -a
-   reboot -f
-   sleep 5
-   echo b 2>/dev/null >/proc/sysrq-trigger
-}
diff --git a/package/base-files/files/lib/upgrade/do_stage2 
b/package/base-files/files/lib/upgrade/do_stage2
new file mode 100755
index 00..8aae452560
--- /dev/null
+++ b/package/base-files/files/lib/upgrade/do_stage2
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+include /lib/upgrade
+
+v "Performing system upgrade..."
+if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
+   platform_do_upgrade "$IMAGE"
+else
+   default_do_upgrade "$IMAGE"
+fi
+
+if [ "$SAVE_CONFIG" -eq 1 ] && type 'platform_copy_config' >/dev/null 
2>/dev/null; then
+   platform_copy_config
+fi
+
+v "Upgrade completed"
+sleep 1
+
+v "Rebooting system..."
+umount -a
+reboot -f
+sleep 5
+echo b 2>/dev/null >/proc/sysrq-trigger
diff --git a/package/base-files/files/lib/upgrade/stage2 
b/package/base-files/files/lib/upgrade/stage2
index 05d9214377..0a11cb2005 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -59,7 +59,7 @@ switch_to_ramfs() {
local file="$(which "$binary" 2>/dev/null)"
[ -n "$file" ] && install_bin "$file"
done
-   install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh 
/lib/upgrade/*.sh $RAMFS_COPY_DATA
+   install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh 
/lib/upgrade/*.sh /lib/upgrade/do_stage2 $RAMFS_COPY_DATA
 
[ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64
 
diff --git a/package/base-files/files/sbin/sysupgrade 
b/package/base-files/files/sbin/sysupgrade
index 54d7a64b48..73291262e7 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -363,7 +363,7 @@ fi
 install_bin /sbin/upgraded
 v "Commencing upgrade. Closing all shell sessions."
 
-COMMAND='. /lib/functions.sh; include /lib/upgrade; do_upgrade_stage2'
+COMMAND='/lib/upgrade/do_stage2'
 
 if [ -n "$FAILSAFE" ]; then
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
-- 
2.21.0


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


Re: [OpenWrt-Devel] Lots of core packages fail in phase2(?) buildbot - maybe due to lua changes?

2019-07-03 Thread Hannu Nyman

On 2019-07-03 09:17, Rafał Miłecki wrote:

On 2019-07-03 06:59, Hannu Nyman wrote:
I looked at the packages buildbot faillogs for OpenWrt master and the 
package download directories, and noticed that quite a lot of the core 
OpenWrt packages fail to build in the buildbot at the moment, like 
ubox, ubus, firewall, uci, netifd... and they are also missing from 
the snapshot download directories.


Example failllogs:


That error logs look quite confusing, but the fact is libubox wasn't
compiling because of Lua 5.3 header installed in wrong staging
directory.

Please try:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=47a984477b1d300047b3001971f0af0e371ea9ee


Hopefully that commit from jow has fixed things.

I have never had any trouble with my own builds, as I do not build lua 
5.3, but as buildot builds all packages, it has trouble. Let's see what 
happens at the buildbot.



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


Re: [OpenWrt-Devel] Lots of core packages fail in phase2(?) buildbot - maybe due to lua changes?

2019-07-03 Thread Rafał Miłecki

On 2019-07-03 06:59, Hannu Nyman wrote:
I looked at the packages buildbot faillogs for OpenWrt master and the 
package download directories, and noticed that quite a lot of the core 
OpenWrt packages fail to build in the buildbot at the moment, like 
ubox, ubus, firewall, uci, netifd... and they are also missing from the 
snapshot download directories.


Example failllogs:


That error logs look quite confusing, but the fact is libubox wasn't
compiling because of Lua 5.3 header installed in wrong staging
directory.

Please try:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=47a984477b1d300047b3001971f0af0e371ea9ee

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