iproute2: re-nice patch

This commit is contained in:
coolsnowwolf 2021-07-05 22:46:11 +08:00
parent c4b625f3bb
commit 9c78339ab5
2 changed files with 22 additions and 29 deletions

View File

@ -1,8 +1,6 @@
Index: iproute2-4.0.0/include/linux/pkt_sched.h
===================================================================
--- a/include/uapi/linux/pkt_sched.h 2018-06-22 16:26:27.026460232 -0700
+++ b/include/uapi/linux/pkt_sched.h 2018-06-22 16:26:27.022460063 -0700
@@ -119,6 +119,251 @@
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -119,6 +119,251 @@ enum {
#define TCA_STAB_MAX (__TCA_STAB_MAX - 1)
@ -254,23 +252,19 @@ Index: iproute2-4.0.0/include/linux/pkt_sched.h
/* FIFO section */
struct tc_fifo_qopt {
Index: iproute2-4.0.0/tc/Makefile
===================================================================
--- a/tc/Makefile 2018-06-22 16:26:27.026460232 -0700
+++ b/tc/Makefile 2018-06-22 16:26:27.022460063 -0700
@@ -81,6 +81,7 @@ TCMODULES += q_etf.o
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -82,6 +82,7 @@ TCMODULES += q_etf.o
TCMODULES += q_taprio.o
TCMODULES += q_plug.o
TCMODULES += q_ets.o
+TCMODULES += q_nss.o
TCSO :=
ifeq ($(TC_CONFIG_ATM),y)
Index: iproute2-4.0.0/tc/q_nss.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ b/tc/q_nss.c 2018-06-22 16:28:11.650913251 -0700
@@ -0,0 +1,1828 @@
--- /dev/null
+++ b/tc/q_nss.c
@@ -0,0 +1,1826 @@
+/*
+ **************************************************************************
+ * Copyright (c) 2015, 2018 The Linux Foundation. All rights reserved.
@ -1118,7 +1112,6 @@ Index: iproute2-4.0.0/tc/q_nss.c
+{
+ struct rtattr *tb[TCA_NSSTBL_MAX + 1];
+ struct tc_nsstbl_qopt *qopt;
+ SPRINT_BUF(b1);
+
+ if (opt == NULL)
+ return 0;
@ -1133,9 +1126,9 @@ Index: iproute2-4.0.0/tc/q_nss.c
+
+ qopt = RTA_DATA(tb[TCA_NSSTBL_PARMS]);
+
+ fprintf(f, "buffer/maxburst %s ", sprint_size(qopt->burst, b1));
+ print_size(PRINT_FP, NULL, "buffer/maxburst %s ", qopt->burst);
+ tc_print_rate(PRINT_FP, NULL, "rate %s ", qopt->rate);
+ fprintf(f, "mtu %s ", sprint_size(qopt->mtu, b1));
+ print_size(PRINT_FP, NULL, "mtu %s ", qopt->mtu);
+ fprintf(f, "accel_mode %d ", qopt->accel_mode);
+
+ return 0;
@ -1424,7 +1417,6 @@ Index: iproute2-4.0.0/tc/q_nss.c
+{
+ struct rtattr *tb[TCA_NSSBF_MAX + 1];
+ struct tc_nssbf_class_qopt *qopt;
+ SPRINT_BUF(b1);
+
+ if (opt == NULL)
+ return 0;
@ -1439,10 +1431,10 @@ Index: iproute2-4.0.0/tc/q_nss.c
+
+ qopt = RTA_DATA(tb[TCA_NSSBF_CLASS_PARMS]);
+
+ fprintf(f, "burst %s ", sprint_size(qopt->burst, b1));
+ print_size(PRINT_FP, NULL, "burst %s ", qopt->burst);
+ tc_print_rate(PRINT_FP, NULL, "rate %s ", qopt->rate);
+ fprintf(f, "quantum %s ", sprint_size(qopt->quantum, b1));
+ fprintf(f, "mtu %s ", sprint_size(qopt->mtu, b1));
+ print_size(PRINT_FP, NULL, "quantum %s ", qopt->quantum);
+ print_size(PRINT_FP, NULL, "mtu %s ", qopt->mtu);
+
+ return 0;
+}
@ -1998,13 +1990,13 @@ Index: iproute2-4.0.0/tc/q_nss.c
+
+ qopt = RTA_DATA(tb[TCA_NSSHTB_CLASS_PARMS]);
+
+ fprintf(f, "burst %s ", sprint_size(qopt->burst, b1));
+ print_size(PRINT_FP, NULL, "burst %s ", qopt->burst);
+ tc_print_rate(PRINT_FP, NULL, "rate %s ", qopt->rate);
+ fprintf(f, "cburst %s ", sprint_size(qopt->cburst, b1));
+ print_size(PRINT_FP, NULL, "cburst %s ", qopt->cburst);
+ tc_print_rate(PRINT_FP, NULL, "crate %s ", qopt->crate);
+ fprintf(f, "priority %u ", qopt->priority);
+ fprintf(f, "quantum %s ", sprint_size(qopt->quantum, b1));
+ fprintf(f, "overhead %s ", sprint_size(qopt->overhead, b1));
+ print_size(PRINT_FP, NULL, "quantum %s ", qopt->quantum);
+ print_size(PRINT_FP, NULL, "overhead %s ", qopt->overhead);
+
+ return 0;
+}
@ -2099,3 +2091,4 @@ Index: iproute2-4.0.0/tc/q_nss.c
+ .parse_qopt = nssblackhole_parse_opt,
+ .print_qopt = nssblackhole_print_opt,
+};

View File

@ -1,13 +1,13 @@
--- a/tc/Makefile 2019-04-08 12:48:15.425854828 +0530
+++ b/tc/Makefile 2019-04-08 13:03:17.204741000 +0530
@@ -54,6 +54,7 @@ TCMODULES += m_bpf.o
TCMODULES += m_tunnel_key.o
TCMODULES += m_sample.o
TCMODULES += m_ct.o
+TCMODULES += m_nssmirred.o
TCMODULES += m_gate.o
+TCMODULES += m_nssmirred.o
TCMODULES += p_ip.o
TCMODULES += p_ip6.o
TCMODULES += p_icmp.o
--- /dev/null 1970-01-01 05:30:00.000000000 +0530
+++ b/tc/m_nssmirred.c 2019-06-19 14:25:51.369793000 +0530
@@ -0,0 +1,183 @@