From: Daniel Wagner <wagi@monom.org>
To: Tejun Heo <tj@kernel.org>
Cc: serge.hallyn@canonical.com, ebiederm@xmission.com,
nhorman@tuxdriver.com, tgraf@suug.ch, davem@davemloft.net,
lizefan@huawei.com, cgroups@vger.kernel.org,
containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] netcls_cgroup: introduce cgroup_cls_state->is_local
Date: Mon, 19 Nov 2012 13:54:26 +0100 [thread overview]
Message-ID: <50AA2C02.1000702@monom.org> (raw)
In-Reply-To: <1353123062-23193-3-git-send-email-tj@kernel.org>
Hi Tejun,
On 17.11.2012 04:31, Tejun Heo wrote:
> -static int write_classid(struct cgroup *cgrp, struct cftype *cft, u64 value)
> +static int write_classid(struct cgroup *cgrp, struct cftype *cft,
> + const char *buf)
> {
> + struct cgroup_cls_state *cs = cgrp_cls_state(cgrp);
> + s64 v;
> +
> + if (sscanf(buf, "%lld", &v) != 1)
> + return -EINVAL;
> +
This changes the user API slightly. cgroup_write_u64() uses
simple_stroull() to parse the string. simple_stroull() allows to use
either 0x1234 or 1234 as input. sscanf() will only handle the later type
of input.
I noticed this because my test script stopped working:
mkdir /sys/fs/cgroup/net_cls/a
echo 0x100002 > /sys/fs/cgroup/net_cls/a/net_cls.classid # 10:2
tc qdisc add dev $DEV root handle 10: htb
tc class add dev $DEV parent 10: classid 10:2 htb rate 1mbit
tc qdisc add dev $DEV parent 10:2 handle 20: sfq perturb 10
I am not completely sure if my setup is 100% correct, but at least
it seems to make something :)
cheers,
daniel
next prev parent reply other threads:[~2012-11-19 12:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 3:30 [PATCHSET cgroup/for-3.8] netcls_cgroup: implement hierarchy support Tejun Heo
[not found] ` <1353123062-23193-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-17 3:31 ` [PATCH 1/3] netcls_cgroup: introduce netcls_mutex Tejun Heo
[not found] ` <1353123062-23193-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-19 14:01 ` Daniel Wagner
2012-11-17 3:31 ` [PATCH 2/3] netcls_cgroup: introduce cgroup_cls_state->is_local Tejun Heo
2012-11-19 12:54 ` Daniel Wagner [this message]
[not found] ` <1353123062-23193-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-19 17:30 ` [PATCH v2 " Tejun Heo
[not found] ` <20121119173026.GJ15971-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-19 19:18 ` Daniel Wagner
2012-11-17 3:31 ` [PATCH 3/3] netcls_cgroup: implement proper hierarchy support Tejun Heo
[not found] ` <1353123062-23193-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-11-19 13:47 ` Daniel Wagner
[not found] ` <50AA385A.90503-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-11-19 17:08 ` Tejun Heo
[not found] ` <20121119170859.GI15971-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-19 19:17 ` Daniel Wagner
2012-11-18 3:04 ` [PATCHSET cgroup/for-3.8] netcls_cgroup: implement " David Miller
[not found] ` <20121117.220421.1904738911212014470.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-11-18 14:25 ` Tejun Heo
2012-11-19 13:59 ` Daniel Wagner
[not found] ` <50AA3B5E.3080701-98C5kh4wR6ohFhg+JK9F0w@public.gmane.org>
2012-11-19 19:01 ` Tejun Heo
2012-11-19 15:07 ` Neil Horman
2012-11-19 19:21 ` Tejun Heo
[not found] ` <20121119192142.GM15971-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-11-20 5:44 ` Tejun Heo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50AA2C02.1000702@monom.org \
--to=wagi@monom.org \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=nhorman@tuxdriver.com \
--cc=serge.hallyn@canonical.com \
--cc=tgraf@suug.ch \
--cc=tj@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).