[PATCH uci] file: Fix uci -m import command

2023-07-13 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Without this change we see the following error:
  # uci -m import optic < /etc/optic-db/default
  uci: Parse error (option/list command found before the first section) at line 
4, byte 1

ptr.last is still a null pointer in case the uci_lookup_list() call
found a matching section and set ptr.s to it. The code expects that
uci_set() updates the ptr.last pointer, but this is not done any more.
If case uci_lookup_list() did not found a section ptr->s is a null
pointer and then uci_set() will allocate a new section.

Fixes: ae61e1cad4a1 ("uci: optimize update section in uci_set")
Fixes: 7e01d66d7bec ("uci: optimize update option in uci_set")
Signed-off-by: Hauke Mehrtens 
---
 file.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/file.c b/file.c
index 93abfae..b01480c 100644
--- a/file.c
+++ b/file.c
@@ -449,6 +449,7 @@ static void uci_parse_config(struct uci_context *ctx)
e = uci_lookup_list(>package->sections, name);
if (e) {
ptr.s = uci_to_section(e);
+   ptr.last = >e;
 
if ((ctx->flags & UCI_FLAG_STRICT) && 
strcmp(ptr.s->type, type))
uci_parse_error(ctx, "section of different type 
overwrites prior section with same name");
@@ -490,8 +491,10 @@ static void uci_parse_option(struct uci_context *ctx, bool 
list)
 
uci_fill_ptr(ctx, , >section->e);
e = uci_lookup_list(>section->options, name);
-   if (e)
+   if (e) {
ptr.o = uci_to_option(e);
+   ptr.last = >e;
+   }
ptr.option = name;
ptr.value = value;
 
-- 
2.17.1


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


[PATCH] kernel: netsupport: Extract act_police

2022-08-04 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This extracts kmod-sched-act-police to allow using it without adding all
the packages from the big kmod-sched package.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index bc63358989..d06ffbd98e 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -775,6 +775,18 @@ endef
 $(eval $(call KernelPackage,sched-core))
 
 
+define KernelPackage/sched-act-police
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Traffic Policing
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_ACT_POLICE
+  FILES:=$(LINUX_DIR)/net/sched/act_police.ko
+  AUTOLOAD:=$(call AutoProbe,act_police)
+endef
+
+$(eval $(call KernelPackage,sched-act-police))
+
+
 define KernelPackage/sched-act-sample
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Traffic Sampling
@@ -966,7 +978,7 @@ endef
 $(eval $(call KernelPackage,bpf-test))
 
 
-SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq 
sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple act_csum em_cmp 
em_nbyte em_meta em_text
+SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq 
sch_teql sch_fq sch_pie act_ipt act_pedit act_simple act_csum em_cmp em_nbyte 
em_meta em_text
 SCHED_FILES_EXTRA = $(foreach 
mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
 
 define KernelPackage/sched
@@ -982,7 +994,6 @@ define KernelPackage/sched
CONFIG_NET_SCH_TEQL \
CONFIG_NET_SCH_FQ \
CONFIG_NET_SCH_PIE \
-   CONFIG_NET_ACT_POLICE \
CONFIG_NET_ACT_IPT \
CONFIG_NET_ACT_PEDIT \
CONFIG_NET_ACT_SIMP \
-- 
2.17.1


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


[PATCH v2 8/8] kernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add the ipset/ip_set_hash_ipmac.ko file. The CONFIG_IP_SET_HASH_IPMAC
KConfig option is already set by the package.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netfilter.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/linux/modules/netfilter.mk 
b/package/kernel/linux/modules/netfilter.mk
index 9808649e70..22b7dbd285 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -348,6 +348,7 @@ IPSET_MODULES:= \
ipset/ip_set_bitmap_ipmac \
ipset/ip_set_bitmap_port \
ipset/ip_set_hash_ip \
+   ipset/ip_set_hash_ipmac \
ipset/ip_set_hash_ipmark \
ipset/ip_set_hash_ipport \
ipset/ip_set_hash_ipportip \
-- 
2.17.1


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


[PATCH v2 6/8] kernel: netsupport: Extract sched-prio and sched-red

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Thomas Langer 

Extract the kmod-sched-prio and kmod-sched-red kernel modules from the
big kmod-sched package. This allows adding the two kernel modules to
OpenWrt without adding the kmod-sched and all its depdnecy.

Signed-off-by: Thomas Langer 
Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 36 --
 1 file changed, 33 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index ab358aeaaf..8b984ec17f 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -906,6 +906,38 @@ endef
 $(eval $(call KernelPackage,sched-mqprio))
 
 
+define KernelPackage/sched-prio
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Multi Band Priority Queueing (PRIO)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_PRIO
+  FILES:=$(LINUX_DIR)/net/sched/sch_prio.ko
+  AUTOLOAD:=$(call AutoProbe,sch_prio)
+endef
+
+define KernelPackage/sched-prio/description
+ PRIO algorithm Configuration
+endef
+
+$(eval $(call KernelPackage,sched-prio))
+
+
+define KernelPackage/sched-red
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Random Early Detection (RED)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_RED
+  FILES:=$(LINUX_DIR)/net/sched/sch_red.ko
+  AUTOLOAD:=$(call AutoProbe,sch_red)
+endef
+
+define KernelPackage/sched-red/description
+ Random Early Detection (RED) algorithm Configuration
+endef
+
+$(eval $(call KernelPackage,sched-red))
+
+
 define KernelPackage/bpf-test
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Test Berkeley Packet Filter functionality
@@ -916,7 +948,7 @@ endef
 $(eval $(call KernelPackage,bpf-test))
 
 
-SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_prio 
sch_red sch_sfq sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple 
act_csum em_cmp em_nbyte em_meta em_text
+SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq 
sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple act_csum em_cmp 
em_nbyte em_meta em_text
 SCHED_FILES_EXTRA = $(foreach 
mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
 
 define KernelPackage/sched
@@ -928,8 +960,6 @@ define KernelPackage/sched
CONFIG_NET_SCH_DSMARK \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \
-   CONFIG_NET_SCH_PRIO \
-   CONFIG_NET_SCH_RED \
CONFIG_NET_SCH_SFQ \
CONFIG_NET_SCH_TEQL \
CONFIG_NET_SCH_FQ \
-- 
2.17.1


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


[PATCH v2 4/8] kernel: netsupport: kmod-sched: Reorder packages

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This puts the kmod-sched packages into an alphabetical order.
I kept the kmod-sched-core at the top as this is the main package.
No changes other than reordering were done.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 102 +++--
 1 file changed, 53 insertions(+), 49 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index e412a909b1..4bd988ad92 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -775,37 +775,6 @@ 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)
-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
-  DEPENDS:=+kmod-sched-core
-  KCONFIG:=CONFIG_NET_CLS_FLOWER
-  FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko
-  AUTOLOAD:=$(call AutoProbe, cls_flower)
-endef
-
-define KernelPackage/sched-flower/description
- Allows to classify packets based on a configurable combination of packet keys 
and masks.
-endef
-
-$(eval $(call KernelPackage,sched-flower))
-
-
 define KernelPackage/sched-act-vlan
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Traffic VLAN manipulation
@@ -822,20 +791,36 @@ endef
 $(eval $(call KernelPackage,sched-act-vlan))
 
 
-define KernelPackage/sched-mqprio
+define KernelPackage/sched-bpf
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
-  TITLE:=Multi-queue priority scheduler (MQPRIO)
+  TITLE:=Traffic shaper support for Berkeley Packet Filter
+  KCONFIG:= \
+   CONFIG_NET_CLS_BPF \
+   CONFIG_NET_ACT_BPF
+  FILES:= \
+   $(LINUX_DIR)/net/sched/cls_bpf.ko \
+   $(LINUX_DIR)/net/sched/act_bpf.ko
+  AUTOLOAD:=$(call AutoLoad,72,cls_bpf act_bpf)
+endef
+
+$(eval $(call KernelPackage,sched-bpf))
+
+
+define KernelPackage/sched-cake
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Cake fq_codel/blue derived shaper
   DEPENDS:=+kmod-sched-core
-  KCONFIG:=CONFIG_NET_SCH_MQPRIO
-  FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko
-  AUTOLOAD:=$(call AutoProbe, sch_mqprio)
+  KCONFIG:=CONFIG_NET_SCH_CAKE
+  FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko
+  AUTOLOAD:=$(call AutoProbe,sch_cake)
 endef
 
-define KernelPackage/sched-mqprio/description
-  This scheduler allows QOS to be offloaded on NICs that have support for 
offloading QOS schedulers.
+define KernelPackage/sched-cake/description
+ Common Applications Kept Enhanced fq_codel/blue derived shaper
 endef
 
-$(eval $(call KernelPackage,sched-mqprio))
+$(eval $(call KernelPackage,sched-cake))
+
 
 define KernelPackage/sched-connmark
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
@@ -847,6 +832,7 @@ define KernelPackage/sched-connmark
 endef
 $(eval $(call KernelPackage,sched-connmark))
 
+
 define KernelPackage/sched-ctinfo
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Traffic shaper ctinfo support
@@ -857,6 +843,23 @@ define KernelPackage/sched-ctinfo
 endef
 $(eval $(call KernelPackage,sched-ctinfo))
 
+
+define KernelPackage/sched-flower
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Flower traffic classifier
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_CLS_FLOWER
+  FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko
+  AUTOLOAD:=$(call AutoProbe, cls_flower)
+endef
+
+define KernelPackage/sched-flower/description
+ Allows to classify packets based on a configurable combination of packet keys 
and masks.
+endef
+
+$(eval $(call KernelPackage,sched-flower))
+
+
 define KernelPackage/sched-ipset
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Traffic shaper ipset support
@@ -871,19 +874,20 @@ endef
 $(eval $(call KernelPackage,sched-ipset))
 
 
-define KernelPackage/sched-bpf
+define KernelPackage/sched-mqprio
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
-  TITLE:=Traffic shaper support for Berkeley Packet Filter
-  KCONFIG:= \
-   CONFIG_NET_CLS_BPF \
-   CONFIG_NET_ACT_BPF
-  FILES:= \
-   $(LINUX_DIR)/net/sched/cls_bpf.ko \
-   $(LINUX_DIR)/net/sched/act_bpf.ko
-  AUTOLOAD:=$(call AutoLoad,72,cls_bpf act_bpf)
+  TITLE:=Multi-queue priority scheduler (MQPRIO)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_MQPRIO
+  FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko
+  AUTOLOAD:=$(call AutoProbe, sch_mqprio)
 endef
 
-$(eval $(call KernelPackage,sched-bpf))
+define KernelPackage/sched-mqprio/description
+  This scheduler allows QOS to 

[PATCH v2 5/8] kernel: netsupport: Add kmod-sched-drr

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This adds a package with the DRR scheduler.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 16 
 1 file changed, 16 insertions(+)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 4bd988ad92..ab358aeaaf 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -844,6 +844,22 @@ endef
 $(eval $(call KernelPackage,sched-ctinfo))
 
 
+define KernelPackage/sched-drr
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Deficit Round Robin scheduler (DRR)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_DRR
+  FILES:=$(LINUX_DIR)/net/sched/sch_drr.ko
+  AUTOLOAD:=$(call AutoProbe,sch_drr)
+endef
+
+define KernelPackage/sched-drr/description
+ DRR algorithm Configuration
+endef
+
+$(eval $(call KernelPackage,sched-drr))
+
+
 define KernelPackage/sched-flower
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Flower traffic classifier
-- 
2.17.1


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


[PATCH v2 7/8] kernel: netsupport: Add kmod-sched-act-sample

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Thomas Langer 

This adds the act_sample.ko and psample.ko kernel module which allows
traffic sampling.

Signed-off-by: Thomas Langer 
Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 8b984ec17f..d3aee7cc7b 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -775,6 +775,24 @@ endef
 $(eval $(call KernelPackage,sched-core))
 
 
+define KernelPackage/sched-act-sample
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Traffic Sampling
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_ACT_SAMPLE CONFIG_PSAMPLE
+  FILES:= \
+   $(LINUX_DIR)/net/sched/act_sample.ko \
+   $(LINUX_DIR)/net/psample/psample.ko
+  AUTOLOAD:=$(call AutoProbe, psample act_sample)
+endef
+
+define KernelPackage/sched-act-sample/description
+ Packet sampling tc action.
+endef
+
+$(eval $(call KernelPackage,sched-act-sample))
+
+
 define KernelPackage/sched-act-vlan
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Traffic VLAN manipulation
-- 
2.17.1


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


[PATCH v2 1/8] kernel: netsupport: kmod-sched: Remove sch_fq_codel and sch_fifo

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
The sch_fq_codel.ko and the sch_fifo.ko are always compiled into the
kernel, they are activated in the generic kernel configuration. There is
no need to activate the build of these kernel modules in the kmod-sched*
packages.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index af720128eb..cebc46daac 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -739,7 +739,7 @@ $(eval $(call KernelPackage,mppe))
 
 
 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard 
$(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf 
cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact 
act_mirred act_skbedit cls_matchall
+SCHED_MODULES_CORE = sch_ingress sch_hfsc sch_htb sch_tbf cls_basic cls_fw 
cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit 
cls_matchall
 SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake 
sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
 SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter 
$(SCHED_MODULES_CORE),$(SCHED_MODULES)))
@@ -754,7 +754,6 @@ define KernelPackage/sched-core
CONFIG_NET_SCH_HTB \
CONFIG_NET_SCH_TBF \
CONFIG_NET_SCH_INGRESS \
-   CONFIG_NET_SCH_FQ_CODEL \
CONFIG_NET_CLS=y \
CONFIG_NET_CLS_ACT=y \
CONFIG_NET_CLS_BASIC \
@@ -908,7 +907,6 @@ define KernelPackage/sched
   KCONFIG:= \
CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_DSMARK \
-   CONFIG_NET_SCH_FIFO \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \
CONFIG_NET_SCH_PRIO \
-- 
2.17.1


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


[PATCH v2 3/8] kernel: netsupport: kmod-sched: explicitly define included modules

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Thomas Langer 

Change SCHED_MODULES_EXTRA to an explicit list of modules
instead of taking everything that is not filtered out.
This removes the need of updating the filter each time an extra
sch_*, act_* or similar is added with an own kmod definition.

Signed-off-by: Thomas Langer 
Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index e51817b6cf..e412a909b1 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -738,12 +738,8 @@ endef
 $(eval $(call KernelPackage,mppe))
 
 
-SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard 
$(LINUX_DIR)/net/sched/*.ko))
 SCHED_MODULES_CORE = sch_ingress sch_hfsc sch_htb sch_tbf cls_basic cls_fw 
cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit 
cls_matchall
-SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake 
sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
-SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
-SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter 
$(SCHED_MODULES_CORE),$(SCHED_MODULES)))
-SCHED_FILES_EXTRA = $(patsubst 
%,$(LINUX_DIR)/net/sched/%.ko,$(SCHED_MODULES_EXTRA))
+SCHED_FILES_CORE = $(foreach 
mod,$(SCHED_MODULES_CORE),$(LINUX_DIR)/net/sched/$(mod).ko)
 
 define KernelPackage/sched-core
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
@@ -768,7 +764,7 @@ define KernelPackage/sched-core
CONFIG_NET_CLS_MATCHALL \
CONFIG_NET_EMATCH=y \
CONFIG_NET_EMATCH_U32
-  FILES:=$(SCHED_FILES)
+  FILES:=$(SCHED_FILES_CORE)
   AUTOLOAD:=$(call AutoLoad,70, $(SCHED_MODULES_CORE))
 endef
 
@@ -900,6 +896,9 @@ endef
 $(eval $(call KernelPackage,bpf-test))
 
 
+SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_prio 
sch_red sch_sfq sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple 
act_csum em_cmp em_nbyte em_meta em_text
+SCHED_FILES_EXTRA = $(foreach 
mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
+
 define KernelPackage/sched
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Extra traffic schedulers
-- 
2.17.1


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


[PATCH v2 0/8] kernel: netsupport: clenup kmod-sched*

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This cleans up the kmod-sched packages and also fixes some minor bugs.

Changes since v1:
 * Extract the following patches:
 ** kernel: netsupport: kmod-sched: Remove sch_fq_codel and sch_fifo
 ** kernel: netsupport: kmod-sched: Add kmod-lib-textsearch dependency
 * Add patch to reorder existing packages:
 ** kernel: netsupport: kmod-sched: Reorder packages
 * Add new kmod-sched packages to correct position


Hauke Mehrtens (5):
  kernel: netsupport: kmod-sched: Remove sch_fq_codel and sch_fifo
  kernel: netsupport: kmod-sched: Add kmod-lib-textsearch dependency
  kernel: netsupport: kmod-sched: Reorder packages
  kernel: netsupport: Add kmod-sched-drr
  kernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko

Thomas Langer (3):
  kernel: netsupport: kmod-sched: explicitly define included modules
  kernel: netsupport: Extract sched-prio and sched-red
  kernel: netsupport: Add kmod-sched-act-sample

 package/kernel/linux/modules/netfilter.mk  |   1 +
 package/kernel/linux/modules/netsupport.mk | 171 ++---
 2 files changed, 119 insertions(+), 53 deletions(-)

-- 
2.17.1


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


[PATCH v2 2/8] kernel: netsupport: kmod-sched: Add kmod-lib-textsearch dependency

2022-07-29 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
The CONFIG_NET_EMATCH_TEXT configuration option depends on the
kmod-lib-textsearch package.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index cebc46daac..e51817b6cf 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -903,7 +903,7 @@ $(eval $(call KernelPackage,bpf-test))
 define KernelPackage/sched
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Extra traffic schedulers
-  DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c
+  DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c 
+kmod-lib-textsearch
   KCONFIG:= \
CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_DSMARK \
-- 
2.17.1


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


[PATCH 5/5] kernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko

2022-07-18 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add the ipset/ip_set_hash_ipmac.ko file. The CONFIG_IP_SET_HASH_IPMAC
KConfig option is already set by the package.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netfilter.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/linux/modules/netfilter.mk 
b/package/kernel/linux/modules/netfilter.mk
index 9808649e70..22b7dbd285 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -348,6 +348,7 @@ IPSET_MODULES:= \
ipset/ip_set_bitmap_ipmac \
ipset/ip_set_bitmap_port \
ipset/ip_set_hash_ip \
+   ipset/ip_set_hash_ipmac \
ipset/ip_set_hash_ipmark \
ipset/ip_set_hash_ipport \
ipset/ip_set_hash_ipportip \
-- 
2.17.1


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


[PATCH 4/5] kernel: netsupport: Add kmod-sched-act-sample

2022-07-18 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Thomas Langer 

This adds the act_sample.ko and psample.ko kernel module which allows
traffic sampling.

Signed-off-by: Thomas Langer 
Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 40d304c52f..54c8d2dacd 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -855,6 +855,24 @@ endef
 $(eval $(call KernelPackage,sched-flower))
 
 
+define KernelPackage/sched-act-sample
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Traffic Sampling
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_ACT_SAMPLE CONFIG_PSAMPLE
+  FILES:= \
+   $(LINUX_DIR)/net/sched/act_sample.ko \
+   $(LINUX_DIR)/net/psample/psample.ko
+  AUTOLOAD:=$(call AutoProbe, psample act_sample)
+endef
+
+define KernelPackage/sched-act-sample/description
+ Packet sampling tc action.
+endef
+
+$(eval $(call KernelPackage,sched-act-sample))
+
+
 define KernelPackage/sched-act-vlan
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Traffic VLAN manipulation
-- 
2.17.1


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


[PATCH 0/5] kernel: netsupport: clenup kmod-sched*

2022-07-18 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This cleans up the kmod-sched packages and also fixes some minor bugs.

Hauke Mehrtens (2):
  kernel: netsupport: Add kmod-sched-drr
  kernel: ipt-ipset: Add ipset/ip_set_hash_ipmac.ko

Thomas Langer (3):
  kernel: netsupport: kmod-sched: explicitly define included modules
  kernel: netsupport: Extract sched-prio and sched-red
  kernel: netsupport: Add kmod-sched-act-sample

 package/kernel/linux/modules/netfilter.mk  |  1 +
 package/kernel/linux/modules/netsupport.mk | 86 +++---
 2 files changed, 75 insertions(+), 12 deletions(-)

-- 
2.17.1


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


[PATCH 2/5] kernel: netsupport: Add kmod-sched-drr

2022-07-18 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This adds a package with the DRR scheduler.

Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 17 +
 1 file changed, 17 insertions(+)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index e412a909b1..aae4094d44 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -790,6 +790,23 @@ endef
 
 $(eval $(call KernelPackage,sched-cake))
 
+
+define KernelPackage/sched-drr
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Deficit Round Robin scheduler (DRR)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_DRR
+  FILES:=$(LINUX_DIR)/net/sched/sch_drr.ko
+  AUTOLOAD:=$(call AutoProbe,sch_drr)
+endef
+
+define KernelPackage/sched-drr/description
+ DRR algorithm Configuration
+endef
+
+$(eval $(call KernelPackage,sched-drr))
+
+
 define KernelPackage/sched-flower
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Flower traffic classifier
-- 
2.17.1


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


[PATCH 3/5] kernel: netsupport: Extract sched-prio and sched-red

2022-07-18 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Thomas Langer 

Extract the kmod-sched-prio and kmod-sched-red kernel modules from the
big kmod-sched package. This allows adding the two kernel modules to
OpenWrt without adding the kmod-sched and all its depdnecy.

Signed-off-by: Thomas Langer 
Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 36 --
 1 file changed, 33 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index aae4094d44..40d304c52f 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -807,6 +807,38 @@ endef
 $(eval $(call KernelPackage,sched-drr))
 
 
+define KernelPackage/sched-prio
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Multi Band Priority Queueing (PRIO)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_PRIO
+  FILES:=$(LINUX_DIR)/net/sched/sch_prio.ko
+  AUTOLOAD:=$(call AutoProbe,sch_prio)
+endef
+
+define KernelPackage/sched-prio/description
+ PRIO algorithm Configuration
+endef
+
+$(eval $(call KernelPackage,sched-prio))
+
+
+define KernelPackage/sched-red
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Random Early Detection (RED)
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_RED
+  FILES:=$(LINUX_DIR)/net/sched/sch_red.ko
+  AUTOLOAD:=$(call AutoProbe,sch_red)
+endef
+
+define KernelPackage/sched-red/description
+ Random Early Detection (RED) algorithm Configuration
+endef
+
+$(eval $(call KernelPackage,sched-red))
+
+
 define KernelPackage/sched-flower
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Flower traffic classifier
@@ -913,7 +945,7 @@ endef
 $(eval $(call KernelPackage,bpf-test))
 
 
-SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_prio 
sch_red sch_sfq sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple 
act_csum em_cmp em_nbyte em_meta em_text
+SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq 
sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple act_csum em_cmp 
em_nbyte em_meta em_text
 SCHED_FILES_EXTRA = $(foreach 
mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
 
 define KernelPackage/sched
@@ -925,8 +957,6 @@ define KernelPackage/sched
CONFIG_NET_SCH_DSMARK \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \
-   CONFIG_NET_SCH_PRIO \
-   CONFIG_NET_SCH_RED \
CONFIG_NET_SCH_SFQ \
CONFIG_NET_SCH_TEQL \
CONFIG_NET_SCH_FQ \
-- 
2.17.1


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


[PATCH 1/5] kernel: netsupport: kmod-sched: explicitly define included modules

2022-07-18 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
From: Thomas Langer 

Change SCHED_MODULES_EXTRA to an explicit list of modules
instead of taking everything that is not filtered out.
This removes the need of updating the filter each time an extra
sch_*, act_* or similar is added with an own kmod definition.

CONFIG_NET_SCH_FQ_CODEL and CONFIG_NET_SCH_FIFO are already compiled
into the kernel using the generic linux configuration.

CONFIG_NET_EMATCH_TEXT depends on the kmod-lib-textsearch package.

Signed-off-by: Thomas Langer 
Signed-off-by: Hauke Mehrtens 
---
 package/kernel/linux/modules/netsupport.mk | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index af720128eb..e412a909b1 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -738,12 +738,8 @@ endef
 $(eval $(call KernelPackage,mppe))
 
 
-SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard 
$(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf 
cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact 
act_mirred act_skbedit cls_matchall
-SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake 
sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
-SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
-SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter 
$(SCHED_MODULES_CORE),$(SCHED_MODULES)))
-SCHED_FILES_EXTRA = $(patsubst 
%,$(LINUX_DIR)/net/sched/%.ko,$(SCHED_MODULES_EXTRA))
+SCHED_MODULES_CORE = sch_ingress sch_hfsc sch_htb sch_tbf cls_basic cls_fw 
cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit 
cls_matchall
+SCHED_FILES_CORE = $(foreach 
mod,$(SCHED_MODULES_CORE),$(LINUX_DIR)/net/sched/$(mod).ko)
 
 define KernelPackage/sched-core
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
@@ -754,7 +750,6 @@ define KernelPackage/sched-core
CONFIG_NET_SCH_HTB \
CONFIG_NET_SCH_TBF \
CONFIG_NET_SCH_INGRESS \
-   CONFIG_NET_SCH_FQ_CODEL \
CONFIG_NET_CLS=y \
CONFIG_NET_CLS_ACT=y \
CONFIG_NET_CLS_BASIC \
@@ -769,7 +764,7 @@ define KernelPackage/sched-core
CONFIG_NET_CLS_MATCHALL \
CONFIG_NET_EMATCH=y \
CONFIG_NET_EMATCH_U32
-  FILES:=$(SCHED_FILES)
+  FILES:=$(SCHED_FILES_CORE)
   AUTOLOAD:=$(call AutoLoad,70, $(SCHED_MODULES_CORE))
 endef
 
@@ -901,14 +896,16 @@ endef
 $(eval $(call KernelPackage,bpf-test))
 
 
+SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_prio 
sch_red sch_sfq sch_teql sch_fq sch_pie act_police act_ipt act_pedit act_simple 
act_csum em_cmp em_nbyte em_meta em_text
+SCHED_FILES_EXTRA = $(foreach 
mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
+
 define KernelPackage/sched
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Extra traffic schedulers
-  DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c
+  DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c 
+kmod-lib-textsearch
   KCONFIG:= \
CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_DSMARK \
-   CONFIG_NET_SCH_FIFO \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \
CONFIG_NET_SCH_PRIO \
-- 
2.17.1


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


[PATCH netifd] system-linux: Do not unconditionally activate IPv6 on devices

2022-02-02 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
IPv6 can only be activated and deactivated on an interface, not on a
device in netifd. When we call system_set_disable_ipv6(dev, "") in
system_if_clear_state() we will activate IPv6 unconditionally for
devices even when it was deactivated in sysfs before.

When we set this option in /etc/sysctl.d/
net.ipv6.conf.eth0_0.disable_ipv6 = 1
and add a device setting, but no interface setting in the UCI network
configuration IPv6 will still get activated.

With this change the IPv6 setting will not be changed any more when no
interface is configured. In the interface settings it can still be changed.

Signed-off-by: Hauke Mehrtens 
---
 system-linux.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/system-linux.c b/system-linux.c
index 0b768f8..df36b61 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -1271,7 +1271,6 @@ void system_if_clear_state(struct device *dev)
system_if_clear_entries(dev, RTM_GETADDR, AF_INET6);
system_if_clear_entries(dev, RTM_GETNEIGH, AF_INET);
system_if_clear_entries(dev, RTM_GETNEIGH, AF_INET6);
-   system_set_disable_ipv6(dev, "0");
 }
 
 static inline unsigned long
-- 
2.17.1


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


[PATCH] util-linux: Add taskset

2022-01-19 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This adds the taskset application from util Linux.
It is already build, but not packaged yet.

Signed-off-by: Hauke Mehrtens 
---
 package/utils/util-linux/Makefile | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/package/utils/util-linux/Makefile 
b/package/utils/util-linux/Makefile
index 74f3f17469..ded653e2c0 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -443,6 +443,15 @@ define Package/swap-utils/description
  contains: mkswap, swaplabel
 endef
 
+define Package/taskset
+$(call Package/util-linux/Default)
+  TITLE:=set or retrieve a process's CPU affinity
+endef
+
+define Package/taskset/description
+ contains: taskset
+endef
+
 define Package/unshare
 $(call Package/util-linux/Default)
   TITLE:=unshare userspace tool
@@ -761,6 +770,11 @@ define Package/swap-utils/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/
 endef
 
+define Package/taskset/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/taskset $(1)/usr/bin/
+endef
+
 define Package/unshare/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/unshare $(1)/usr/bin/
@@ -829,6 +843,7 @@ $(eval $(call BuildPackage,script-utils))
 $(eval $(call BuildPackage,setterm))
 $(eval $(call BuildPackage,sfdisk))
 $(eval $(call BuildPackage,swap-utils))
+$(eval $(call BuildPackage,taskset))
 $(eval $(call BuildPackage,unshare))
 $(eval $(call BuildPackage,uuidd))
 $(eval $(call BuildPackage,uuidgen))
-- 
2.17.1


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


[PATCH uci v2] cmake: Allow override of install directories

2021-10-05 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Use the GNUInstallDirs include to allow callers to override the install
directories. This is helpful when building uci in build systems like
Yocto which prefer to use /usr/lib64 for the 64 bit libraries.

Signed-off-by: Hauke Mehrtens 
---

Change since:
v1:
  overwrite -> override

 CMakeLists.txt | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 560ed65..50e7f51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
 cmake_minimum_required(VERSION 2.6)
+INCLUDE(GNUInstallDirs)
 
 PROJECT(uci C)
 
@@ -74,12 +75,12 @@ IF(UNIT_TESTING)
 ENDIF()
 
 INSTALL(FILES uci.h uci_config.h uci_blob.h ucimap.h
-   DESTINATION include
+   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
 )
 
 INSTALL(TARGETS uci cli
-   ARCHIVE DESTINATION lib
-   LIBRARY DESTINATION lib
-   RUNTIME DESTINATION bin
+   ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
 )
 
-- 
2.17.1


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


[PATCH uci] cmake: Allow overwrite of install directories

2021-10-01 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Use the GNUInstallDirs include to allow callers to overwrite the install
directories. This is helpful when building uci in build systems like
Yocto which prefer to use /usr/lib64 for the 64 bit libraries.

Signed-off-by: Hauke Mehrtens 
---
 CMakeLists.txt | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 560ed65..50e7f51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
 cmake_minimum_required(VERSION 2.6)
+INCLUDE(GNUInstallDirs)
 
 PROJECT(uci C)
 
@@ -74,12 +75,12 @@ IF(UNIT_TESTING)
 ENDIF()
 
 INSTALL(FILES uci.h uci_config.h uci_blob.h ucimap.h
-   DESTINATION include
+   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
 )
 
 INSTALL(TARGETS uci cli
-   ARCHIVE DESTINATION lib
-   LIBRARY DESTINATION lib
-   RUNTIME DESTINATION bin
+   ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
 )
 
-- 
2.17.1


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


[PATCH] toolchain: gdb: Add optional python support

2021-05-28 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Compile gdb with python support optionally.

To use the Python support in gdb some extra python files are needed,
install them too. While at it also install other shared files which we
did not install before.

If gdb is built without Python support the python folder does not
exists.

Signed-off-by: Hauke Mehrtens 
---
 toolchain/Config.in|  8 
 toolchain/gdb/Makefile | 11 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 6dda9af92d..8ff5438d79 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -259,6 +259,14 @@ config GDB
help
  Enable if you want to build the gdb.
 
+config GDB_PYTHON
+   bool
+   depends on GDB
+   prompt "Build gdb with python binding"
+   
+   help
+ Enable the python bindings for GDB to allow using python in the gdb 
shell.
+
 config USE_GLIBC
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN 
&& (arc)
bool
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index 05e3c7de3c..2708eff869 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -36,7 +36,6 @@ HOST_CONFIGURE_ARGS = \
--without-included-gettext \
--enable-threads \
--with-expat \
-   --without-python \
--disable-unit-tests \
--disable-ubsan \
--disable-binutils \
@@ -44,11 +43,21 @@ HOST_CONFIGURE_ARGS = \
--disable-gas \
--disable-sim
 
+ifneq ($(CONFIG_GDB_PYTHON),)
+  HOST_CONFIGURE_ARGS+= --with-python
+else
+  HOST_CONFIGURE_ARGS:= --without-python
+endif
+
 define Host/Install
mkdir -p $(TOOLCHAIN_DIR)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb 
$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
+   mkdir -p $(TOOLCHAIN_DIR)/share/gdb
+   -cp -R $(HOST_BUILD_DIR)/gdb/data-directory/python 
$(TOOLCHAIN_DIR)/share/gdb/
+   cp -R $(HOST_BUILD_DIR)/gdb/data-directory/syscalls 
$(TOOLCHAIN_DIR)/share/gdb/
+   cp -R $(HOST_BUILD_DIR)/gdb/data-directory/system-gdbinit 
$(TOOLCHAIN_DIR)/share/gdb/
 endef
 
 define Host/Clean
-- 
2.17.1


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


[no subject]

2020-12-03 Thread Hauke Mehrtens via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This adds the CONFIG_IRQSOFF_TRACER and the CONFIG_PREEMPT_TRACER kernel
configuration option to the OpenWrt menu. This can be used to debug
latencies in the system.
The CONFIG_PREEMPT_TRACER option needs the CONFIG_PREEMPT option which is
supposed to be used for Low-Latency Desktop and not used by many targets
in OpenWrt.

The help text is copied from the Linux kernel Kconfig.

Signed-off-by: Hauke Mehrtens 
---
 config/Config-kernel.in | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 1cd9da4d12..ba724a2266 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -266,6 +266,40 @@ config KERNEL_FUNCTION_PROFILER
depends on KERNEL_FUNCTION_TRACER
default n
 
+config KERNEL_IRQSOFF_TRACER
+   bool "Interrupts-off Latency Tracer"
+   depends on KERNEL_FTRACE
+   help
+ This option measures the time spent in irqs-off critical
+ sections, with microsecond accuracy.
+
+ The default measurement method is a maximum search, which is
+ disabled by default and can be runtime (re-)started
+ via:
+
+ echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
+
+ (Note that kernel size and overhead increase with this option
+ enabled. This option and the preempt-off timing option can be
+ used together or separately.)
+
+config KERNEL_PREEMPT_TRACER
+   bool "Preemption-off Latency Tracer"
+   depends on KERNEL_FTRACE
+   help
+ This option measures the time spent in preemption-off critical
+ sections, with microsecond accuracy.
+
+ The default measurement method is a maximum search, which is
+ disabled by default and can be runtime (re-)started
+ via:
+
+ echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
+
+ (Note that kernel size and overhead increase with this option
+ enabled. This option and the irqs-off timing option can be
+ used together or separately.)
+
 config KERNEL_DEBUG_KERNEL
bool
default n
-- 
2.17.1


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