diff mbox series

[1/1] package/busybox: patch to fix tc build on 6.8+ kernels

Message ID 20240823090939.79455-1-joey.t.reinhart@gmail.com
State Changes Requested
Headers show
Series [1/1] package/busybox: patch to fix tc build on 6.8+ kernels | expand

Commit Message

Un1q32 Aug. 23, 2024, 9:09 a.m. UTC
Signed-off-by: Un1q32 <joey.t.reinhart@gmail.com>
---
 .../0010-tc-build-fails-on-kernel-6.8.patch   | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 package/busybox/0010-tc-build-fails-on-kernel-6.8.patch

Comments

Thomas Petazzoni Aug. 23, 2024, 3:48 p.m. UTC | #1
Hello,

On Fri, 23 Aug 2024 05:09:39 -0400
Un1q32 <joey.t.reinhart@gmail.com> wrote:

> Signed-off-by: Un1q32 <joey.t.reinhart@gmail.com>

Thanks a lot for the patch!

We need patches to be sent with a real-name... especially when in fact
your real name is clearly visible in your e-mail address.

> diff --git a/package/busybox/0010-tc-build-fails-on-kernel-6.8.patch b/package/busybox/0010-tc-build-fails-on-kernel-6.8.patch
> new file mode 100644
> index 0000000000..95f2585c21
> --- /dev/null
> +++ b/package/busybox/0010-tc-build-fails-on-kernel-6.8.patch
> @@ -0,0 +1,55 @@
> +http://lists.busybox.net/pipermail/busybox/2024-March/090678.html
> +https://bugs.gentoo.org/926872
> +
> +Linux v6.8-rc1 removed the definitions related to CBQ making tc fail to
> +build. Add some #ifdefs to handle this missing support.
> +
> +Signed-off-by: Un1q32 <joey.t.reinhart@gmail.com>

Could you please send a patch generated by Git format-patch, and that
keep the original authorship? It should have an Upstream: tag pointing
to where it has been submitted upstream, and indeed your Signed-off-by
line.

See
package/busybox/0009-menuconfig-gcc-failing-saying-ncurses-is-not-found.patch
for an example where it has been done the way we expect.

Could you come up with a v2 of your patch that addresses those small
details?

Thanks a lot!

Thomas
diff mbox series

Patch

diff --git a/package/busybox/0010-tc-build-fails-on-kernel-6.8.patch b/package/busybox/0010-tc-build-fails-on-kernel-6.8.patch
new file mode 100644
index 0000000000..95f2585c21
--- /dev/null
+++ b/package/busybox/0010-tc-build-fails-on-kernel-6.8.patch
@@ -0,0 +1,55 @@ 
+http://lists.busybox.net/pipermail/busybox/2024-March/090678.html
+https://bugs.gentoo.org/926872
+
+Linux v6.8-rc1 removed the definitions related to CBQ making tc fail to
+build. Add some #ifdefs to handle this missing support.
+
+Signed-off-by: Un1q32 <joey.t.reinhart@gmail.com>
+
+--- a/networking/tc.c
++++ b/networking/tc.c
+@@ -231,6 +231,13 @@
+ 	return 0;
+ }
+ #endif
++
++#ifndef TCA_CBQ_MAX
++/*
++ * Linux v6.8-rc1~131^2~60^2^2 removed the uapi definitions for CBQ.
++ * See <A HREF="https://git.kernel.org/linus/33241dca48626">https://git.kernel.org/linus/33241dca48626</A>
++ */
++#else
+ static int cbq_print_opt(struct rtattr *opt)
+ {
+ 	struct rtattr *tb[TCA_CBQ_MAX+1];
+@@ -322,6 +329,7 @@
+  done:
+ 	return 0;
+ }
++#endif
+ 
+ static FAST_FUNC int print_qdisc(
+ 		const struct sockaddr_nl *who UNUSED_PARAM,
+@@ -372,8 +380,10 @@
+ 		int qqq = index_in_strings(_q_, name);
+ 		if (qqq == 0) { /* pfifo_fast aka prio */
+ 			prio_print_opt(tb[TCA_OPTIONS]);
++#ifdef TCA_CBQ_MAX
+ 		} else if (qqq == 1) { /* class based queuing */
+ 			cbq_print_opt(tb[TCA_OPTIONS]);
++#endif
+ 		} else {
+ 			/* don't know how to print options for this qdisc */
+ 			printf("(options for %s)", name);
+@@ -442,9 +452,11 @@
+ 		int qqq = index_in_strings(_q_, name);
+ 		if (qqq == 0) { /* pfifo_fast aka prio */
+ 			/* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/
++#ifdef TCA_CBQ_MAX
+ 		} else if (qqq == 1) { /* class based queuing */
+ 			/* cbq_print_copt() is identical to cbq_print_opt(). */
+ 			cbq_print_opt(tb[TCA_OPTIONS]);
++#endif
+ 		} else {
+ 			/* don't know how to print options for this class */
+ 			printf("(options for %s)", name);