From: Georgios Amanakis <gamanakis@gmail.com>
To: Cake List <cake@lists.bufferbloat.net>
Subject: [Cake] Fwd: Compiling under net-next
Date: Mon, 19 Mar 2018 12:09:41 -0400 [thread overview]
Message-ID: <CACvFP_gSCtDaYHdvegMuFumFgYVQLyB4C+yLnKZNe_n1OsMX+Q@mail.gmail.com> (raw)
In-Reply-To: <CACvFP_ijNbkUU8mRCyAwe16qZ=SYMStq=9QiyTBizNhLx-vZtw@mail.gmail.com>
---------- 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
next prev parent reply other threads:[~2018-03-19 16:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-18 20:00 [Cake] " 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 ` Georgios Amanakis [this message]
2018-03-19 16:52 ` [Cake] Fwd: " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACvFP_gSCtDaYHdvegMuFumFgYVQLyB4C+yLnKZNe_n1OsMX+Q@mail.gmail.com \
--to=gamanakis@gmail.com \
--cc=cake@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox