netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nhorman@tuxdriver.com
Cc: netdev@vger.kernel.org, john.r.fastabend@intel.com,
	robert.w.love@intel.com
Subject: Re: [PATCH 1/2] net: add network priority cgroup infrastructure (v3)
Date: Mon, 21 Nov 2011 15:39:23 -0500 (EST)	[thread overview]
Message-ID: <20111121.153923.1130612299870337625.davem@davemloft.net> (raw)
In-Reply-To: <1321632821-11640-2-git-send-email-nhorman@tuxdriver.com>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 18 Nov 2011 11:13:40 -0500


> +#ifdef CONFIG_CGROUPS
> +void skb_update_prio(struct sk_buff *skb)
> +{
> +	struct netprio_map *map = rcu_dereference(skb->dev->priomap);
> +
> +	if ((!skb->priority) && (skb->sk) && map)
> +		skb->priority = map->priomap[skb->sk->sk_cgrp_prioidx];
> +}
> +EXPORT_SYMBOL_GPL(skb_update_prio);
> +#endif

skb_update_prio() has one call site, right here in this dev.c file.
Mark it static, kill the symbol export, and use the ifdef here to nop
out the implementation when the config option isn't set.

> +	struct netprio_map *map;
> +
> +	rtnl_lock();
> +
> +
> +	for_each_netdev(&init_net, dev) {

There are a few instances of extra empty lines in the code added by
this patch, please do a quick audit and get rid of them.

Otherwise seems ok to me.

Thanks.

  reply	other threads:[~2011-11-21 20:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 20:51 [PATCH 0/2] net: Add network priority cgroup Neil Horman
2011-11-16 20:51 ` [PATCH 1/2] net: add network priority cgroup infrastructure Neil Horman
2011-11-17  9:29   ` WANG Cong
2011-11-17 11:25   ` John Fastabend
2011-11-17 11:56     ` Neil Horman
2011-11-16 20:51 ` [PATCH 2/2] net: add documentation for net_prio cgroups Neil Horman
2011-11-17 21:47 ` [PATCH 0/2] net: Add network priority cgroup (v2) Neil Horman
2011-11-17 21:47   ` [PATCH 1/2] net: add network priority cgroup infrastructure (v2) Neil Horman
2011-11-18  3:17     ` John Fastabend
2011-11-18 11:50       ` Neil Horman
2011-11-17 21:47   ` [PATCH 2/2] net: add documentation for net_prio cgroups (v2) Neil Horman
2011-11-18 16:13 ` [PATCH 0/2] net: Add network priority cgroup (v3) Neil Horman
2011-11-18 16:13   ` [PATCH 1/2] net: add network priority cgroup infrastructure (v3) Neil Horman
2011-11-21 20:39     ` David Miller [this message]
2011-11-21 20:43       ` Neil Horman
2011-11-18 16:13   ` [PATCH 2/2] net: add documentation for net_prio cgroups (v3) Neil Horman
2011-11-22 15:10 ` [PATCH 0/2] net: Add network priority cgroup (v4) Neil Horman
2011-11-22 15:10   ` [PATCH 1/2] net: add network priority cgroup infrastructure (v4) Neil Horman
2011-11-22 15:10   ` [PATCH 2/2] net: add documentation for net_prio cgroups (v4) Neil Horman
2011-11-22 20:23   ` [PATCH 0/2] net: Add network priority cgroup (v4) David Miller
2011-11-22 20:39     ` Neil Horman
2011-11-22 20:45       ` David Miller
2011-11-22 21:00         ` Neil Horman
2011-11-23 10:19           ` Kirill Smelkov
2011-11-23 11:49             ` Neil Horman

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=20111121.153923.1130612299870337625.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=robert.w.love@intel.com \
    /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).