* [Cake] Compiling under net-next
@ 2018-03-18 20:00 Georgios Amanakis
2018-03-19 2:29 ` George Amanakis
0 siblings, 1 reply; 8+ messages in thread
From: Georgios Amanakis @ 2018-03-18 20:00 UTC (permalink / raw)
To: cake
Hello All,
I just received a notice that in archlinux running 4.16-rc1 cake fails
to build (https://aur.archlinux.org/packages/sch_cake-dkms). I can also
confirm the same error with net-next and the cobalt tree:
============8<============
DKMS make.log for sch_cake-r427.d2d6780 for kernel 4.16.0-rc1-
61deb7d0dddd (x86_64)
Sun Mar 18 10:08:24 IST 2018
make: Entering directory '/usr/lib/modules/4.16.0-rc1-
61deb7d0dddd/build'
CC [M] /var/lib/dkms/sch_cake/r427.d2d6780/build/sch_cake.o
/var/lib/dkms/sch_cake/r427.d2d6780/build/sch_cake.c:2708:11: error:
initialization from incompatible pointer type [-Werror=incompatible-
pointer-types]
.init = cake_init,
^~~~~~~~~
/var/lib/dkms/sch_cake/r427.d2d6780/build/sch_cake.c:2708:11: note:
(near initialization for ‘cake_qdisc_ops.init’)
/var/lib/dkms/sch_cake/r427.d2d6780/build/sch_cake.c:2711:13: error:
initialization from incompatible pointer type [-Werror=incompatible-
pointer-types]
.change = cake_change,
^~~~~~~~~~~
/var/lib/dkms/sch_cake/r427.d2d6780/build/sch_cake.c:2711:13: note:
(near initialization for ‘cake_qdisc_ops.change’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:323:
/var/lib/dkms/sch_cake/r427.d2d6780/build/sch_cake.o] Error 1
make: *** [Makefile:1549:
_module_/var/lib/dkms/sch_cake/r427.d2d6780/build] Error 2
make: Leaving directory '/usr/lib/modules/4.16.0-rc1-
61deb7d0dddd/build'
============8<============
I see that the init function type changed from (eg tbf_init):
static int tbf_init(struct Qdisc *sch, struct nlattr *opt)
to:
static int tbf_init(struct Qdisc *sch, struct nlattr *opt,
struct netlink_ext_ack *extack)
The same applies for the change function type (eg tbf_change), from:
static int tbf_change(struct Qdisc *sch, struct nlattr *opt)
to:
static int tbf_change(struct Qdisc *sch, struct nlattr *opt,
struct netlink_ext_ack *extack)
George
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Cake] Compiling under net-next
2018-03-18 20:00 [Cake] Compiling under net-next Georgios Amanakis
@ 2018-03-19 2:29 ` George Amanakis
2018-03-19 10:16 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 8+ messages in thread
From: George Amanakis @ 2018-03-19 2:29 UTC (permalink / raw)
To: cake
It seems the change was introduced here:
https://patchwork.kernel.org/patch/9671147/
I drafted the following very simplistic patch, could somebody take a
look at it?
From 0c3c135cc65fa1fdd2521490c8f1edee41edcea2 Mon Sep 17 00:00:00 2001
From: gamanakis <g_amanakis@yahoo.com>
Date: Sun, 18 Mar 2018 22:20:38 -0400
Subject: [PATCH] Fixes for 4.16
---
sch_cake.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sch_cake.c b/sch_cake.c
index 9f2acb5..f18273b 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -2364,7 +2364,12 @@ static void cake_reconfigure(struct Qdisc *sch)
q->buffer_limit = min(q->buffer_limit, max(sch->limit *
psched_mtu(qdisc_dev(sch)), q->buffer_config_limit));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
static int cake_change(struct Qdisc *sch, struct nlattr *opt)
+#else
+static int cake_change(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack)
+#endif
{
struct cake_sched_data *q = qdisc_priv(sch);
struct nlattr *tb[TCA_CAKE_MAX + 1];
@@ -2500,7 +2505,12 @@ static void cake_destroy(struct Qdisc *sch)
cake_free(q->tins);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
static int cake_init(struct Qdisc *sch, struct nlattr *opt)
+#else
+static int cake_init(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack)
+#endif
{
struct cake_sched_data *q = qdisc_priv(sch);
int i, j;
@@ -2520,7 +2530,11 @@ static int cake_init(struct Qdisc *sch, struct
nlattr *opt)
q->cur_flow = 0;
if (opt) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
int err = cake_change(sch, opt);
+#else
+ int err = cake_change(sch, opt, extack);
+#endif
if (err)
return err;
--
2.16.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Cake] Compiling under net-next
2018-03-19 2:29 ` George Amanakis
@ 2018-03-19 10:16 ` Toke Høiland-Jørgensen
2018-03-19 10:40 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 8+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-03-19 10:16 UTC (permalink / raw)
To: George Amanakis, cake
George Amanakis <gamanakis@gmail.com> writes:
> It seems the change was introduced here:
> https://patchwork.kernel.org/patch/9671147/
>
> I drafted the following very simplistic patch, could somebody take a
> look at it?
LGTM. We may want to actually use the extack feature at some point, but
we're not really returning error messages from the configuration except
when parsing fails, so I guess it doesn't matter too much in this
instance...
-Toke
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Cake] Compiling under net-next
2018-03-19 10:16 ` Toke Høiland-Jørgensen
@ 2018-03-19 10:40 ` Toke Høiland-Jørgensen
[not found] ` <CACvFP_ijNbkUU8mRCyAwe16qZ=SYMStq=9QiyTBizNhLx-vZtw@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-03-19 10:40 UTC (permalink / raw)
To: George Amanakis, cake
Toke Høiland-Jørgensen <toke@toke.dk> writes:
> George Amanakis <gamanakis@gmail.com> writes:
>
>> It seems the change was introduced here:
>> https://patchwork.kernel.org/patch/9671147/
>>
>> I drafted the following very simplistic patch, could somebody take a
>> look at it?
>
> LGTM. We may want to actually use the extack feature at some point, but
> we're not really returning error messages from the configuration except
> when parsing fails, so I guess it doesn't matter too much in this
> instance...
Ah, wait, nla_parse_nested() takes an extack parameter now, so we should
pass that through in cake_change() after this change.
-Toke
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Cake] Fwd: Compiling under net-next
[not found] ` <CACvFP_ijNbkUU8mRCyAwe16qZ=SYMStq=9QiyTBizNhLx-vZtw@mail.gmail.com>
@ 2018-03-19 16:09 ` Georgios Amanakis
2018-03-19 16:52 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 8+ messages in thread
From: Georgios Amanakis @ 2018-03-19 16:09 UTC (permalink / raw)
To: Cake List
---------- Forwarded message ----------
From: Georgios Amanakis <gamanakis@gmail.com>
Date: Mon, Mar 19, 2018 at 12:08 PM
Subject: Re: [Cake] Compiling under net-next
To: Toke Høiland-Jørgensen <toke@toke.dk>
> Ah, wait, nla_parse_nested() takes an extack parameter now, so we should
> pass that through in cake_change() after this change.
From 0c3c135cc65fa1fdd2521490c8f1edee41edcea2 Mon Sep 17 00:00:00 2001
From: gamanakis <g_amanakis@yahoo.com>
Date: Sun, 18 Mar 2018 22:20:38 -0400
Subject: [PATCH 1/2] Fixes for 4.16
---
sch_cake.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sch_cake.c b/sch_cake.c
index 9f2acb5..f18273b 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -2364,7 +2364,12 @@ static void cake_reconfigure(struct Qdisc *sch)
q->buffer_limit = min(q->buffer_limit, max(sch->limit *
psched_mtu(qdisc_dev(sch)), q->buffer_config_limit));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
static int cake_change(struct Qdisc *sch, struct nlattr *opt)
+#else
+static int cake_change(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack)
+#endif
{
struct cake_sched_data *q = qdisc_priv(sch);
struct nlattr *tb[TCA_CAKE_MAX + 1];
@@ -2500,7 +2505,12 @@ static void cake_destroy(struct Qdisc *sch)
cake_free(q->tins);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
static int cake_init(struct Qdisc *sch, struct nlattr *opt)
+#else
+static int cake_init(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack)
+#endif
{
struct cake_sched_data *q = qdisc_priv(sch);
int i, j;
@@ -2520,7 +2530,11 @@ static int cake_init(struct Qdisc *sch, struct
nlattr *opt)
q->cur_flow = 0;
if (opt) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
int err = cake_change(sch, opt);
+#else
+ int err = cake_change(sch, opt, extack);
+#endif
if (err)
return err;
--
2.16.2
From 6b9e5b18d1cdc8d8a4e4e76dafd6e9b8555eee6f Mon Sep 17 00:00:00 2001
From: gamanakis <g_amanakis@yahoo.com>
Date: Mon, 19 Mar 2018 12:01:24 -0400
Subject: [PATCH 2/2] Fixes for 4.16 (2)
---
sch_cake.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sch_cake.c b/sch_cake.c
index f18273b..22197e0 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -2380,8 +2380,10 @@ static int cake_change(struct Qdisc *sch,
struct nlattr *opt,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, NULL);
+#else
+ err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, extack);
#endif
if (err < 0)
return err;
--
2.16.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Cake] Fwd: Compiling under net-next
2018-03-19 16:09 ` [Cake] Fwd: " Georgios Amanakis
@ 2018-03-19 16:52 ` Toke Høiland-Jørgensen
2018-03-19 17:11 ` [Cake] [PATCH] Fixes for 4.16 George Amanakis
0 siblings, 1 reply; 8+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-03-19 16:52 UTC (permalink / raw)
To: Georgios Amanakis, Cake List
Georgios Amanakis <gamanakis@gmail.com> writes:
> #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
> err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy);
> -#else
> +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
> err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, NULL);
> +#else
> + err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, extack);
> #endif
Yes, exactly!
Could you squash the two patches into one, add a Signed-off-by tag and
send it using git send-email? It's somewhat mangled in transit, it
seems; but otherwise looks good to apply :)
-Toke
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Cake] [PATCH] Fixes for 4.16
2018-03-19 16:52 ` Toke Høiland-Jørgensen
@ 2018-03-19 17:11 ` George Amanakis
2018-03-20 9:33 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 8+ messages in thread
From: George Amanakis @ 2018-03-19 17:11 UTC (permalink / raw)
To: cake, toke
From: gamanakis <gamanakis@gmail.com>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
---
sch_cake.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/sch_cake.c b/sch_cake.c
index 9f2acb5..22197e0 100644
--- a/sch_cake.c
+++ b/sch_cake.c
@@ -2364,7 +2364,12 @@ static void cake_reconfigure(struct Qdisc *sch)
q->buffer_limit = min(q->buffer_limit, max(sch->limit * psched_mtu(qdisc_dev(sch)), q->buffer_config_limit));
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
static int cake_change(struct Qdisc *sch, struct nlattr *opt)
+#else
+static int cake_change(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack)
+#endif
{
struct cake_sched_data *q = qdisc_priv(sch);
struct nlattr *tb[TCA_CAKE_MAX + 1];
@@ -2375,8 +2380,10 @@ static int cake_change(struct Qdisc *sch, struct nlattr *opt)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, NULL);
+#else
+ err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, extack);
#endif
if (err < 0)
return err;
@@ -2500,7 +2507,12 @@ static void cake_destroy(struct Qdisc *sch)
cake_free(q->tins);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
static int cake_init(struct Qdisc *sch, struct nlattr *opt)
+#else
+static int cake_init(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack)
+#endif
{
struct cake_sched_data *q = qdisc_priv(sch);
int i, j;
@@ -2520,7 +2532,11 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt)
q->cur_flow = 0;
if (opt) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
int err = cake_change(sch, opt);
+#else
+ int err = cake_change(sch, opt, extack);
+#endif
if (err)
return err;
--
2.16.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Cake] [PATCH] Fixes for 4.16
2018-03-19 17:11 ` [Cake] [PATCH] Fixes for 4.16 George Amanakis
@ 2018-03-20 9:33 ` Toke Høiland-Jørgensen
0 siblings, 0 replies; 8+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-03-20 9:33 UTC (permalink / raw)
To: George Amanakis, cake
Pushed to git; thanks! :)
-Toke
George Amanakis <gamanakis@gmail.com> writes:
> From: gamanakis <gamanakis@gmail.com>
>
> Signed-off-by: George Amanakis <gamanakis@gmail.com>
> ---
> sch_cake.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/sch_cake.c b/sch_cake.c
> index 9f2acb5..22197e0 100644
> --- a/sch_cake.c
> +++ b/sch_cake.c
> @@ -2364,7 +2364,12 @@ static void cake_reconfigure(struct Qdisc *sch)
> q->buffer_limit = min(q->buffer_limit, max(sch->limit * psched_mtu(qdisc_dev(sch)), q->buffer_config_limit));
> }
>
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
> static int cake_change(struct Qdisc *sch, struct nlattr *opt)
> +#else
> +static int cake_change(struct Qdisc *sch, struct nlattr *opt,
> + struct netlink_ext_ack *extack)
> +#endif
> {
> struct cake_sched_data *q = qdisc_priv(sch);
> struct nlattr *tb[TCA_CAKE_MAX + 1];
> @@ -2375,8 +2380,10 @@ static int cake_change(struct Qdisc *sch, struct nlattr *opt)
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
> err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy);
> -#else
> +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
> err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, NULL);
> +#else
> + err = nla_parse_nested(tb, TCA_CAKE_MAX, opt, cake_policy, extack);
> #endif
> if (err < 0)
> return err;
> @@ -2500,7 +2507,12 @@ static void cake_destroy(struct Qdisc *sch)
> cake_free(q->tins);
> }
>
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
> static int cake_init(struct Qdisc *sch, struct nlattr *opt)
> +#else
> +static int cake_init(struct Qdisc *sch, struct nlattr *opt,
> + struct netlink_ext_ack *extack)
> +#endif
> {
> struct cake_sched_data *q = qdisc_priv(sch);
> int i, j;
> @@ -2520,7 +2532,11 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt)
> q->cur_flow = 0;
>
> if (opt) {
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
> int err = cake_change(sch, opt);
> +#else
> + int err = cake_change(sch, opt, extack);
> +#endif
>
> if (err)
> return err;
> --
> 2.16.2
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-03-20 9:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 20:00 [Cake] Compiling under net-next Georgios Amanakis
2018-03-19 2:29 ` George Amanakis
2018-03-19 10:16 ` Toke Høiland-Jørgensen
2018-03-19 10:40 ` Toke Høiland-Jørgensen
[not found] ` <CACvFP_ijNbkUU8mRCyAwe16qZ=SYMStq=9QiyTBizNhLx-vZtw@mail.gmail.com>
2018-03-19 16:09 ` [Cake] Fwd: " Georgios Amanakis
2018-03-19 16:52 ` Toke Høiland-Jørgensen
2018-03-19 17:11 ` [Cake] [PATCH] Fixes for 4.16 George Amanakis
2018-03-20 9:33 ` Toke Høiland-Jørgensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox