public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] drop_monitor: convert to modular building
Date: Wed, 16 May 2012 16:48:01 +0200	[thread overview]
Message-ID: <1337179681.8512.1212.camel@edumazet-glaptop> (raw)
In-Reply-To: <1337178426-2470-1-git-send-email-nhorman@tuxdriver.com>

On Wed, 2012-05-16 at 10:27 -0400, Neil Horman wrote:
> When I first wrote drop monitor I wrote it to just build monolithically.  There
> is no reason it can't be built modularly as well, so lets give it that
> flexibiity.

> +	for_each_present_cpu(cpu) {
> +		data = &per_cpu(dm_cpu_data, cpu);
> +		del_timer(&data->send_timer);
> +		cancel_work_sync(&data->dm_alert_work);
> +		/*
> +		 * At this point, we should have exclusive access
> +		 * to this struct and can free the skb inside it
> +		 */
> +		kfree_skb(data->skb);
> +	}
> +

I dont think for_each_present_cpu(cpu) is right 

(I realize drop_monitor already uses this, but its a bug)

To use it, you must have a notifier to react to cpu HOTPLUG events.

-> for_each_possible_cpu() is more correct.

Also, please dont add new printk(KERN_WARNING ...), use pr_warn(...)
instead

  reply	other threads:[~2012-05-16 14:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 14:27 [PATCH] drop_monitor: convert to modular building Neil Horman
2012-05-16 14:48 ` Eric Dumazet [this message]
2012-05-16 15:16   ` Neil Horman
2012-05-16 15:01 ` Ben Hutchings
2012-05-16 15:19   ` Neil Horman
2012-05-16 15:34     ` Ben Hutchings
2012-05-17 17:49 ` [PATCH v2] " Neil Horman
2012-05-17 18:14   ` Ben Hutchings
2012-05-17 19:33     ` Neil Horman
2012-05-17 20:04 ` [PATCH v3] " Neil Horman
2012-05-17 20:08   ` Ben Hutchings
2012-05-17 20:09   ` David Miller
2012-05-17 20:21     ` Neil Horman
2012-05-22 13:05       ` Eric Dumazet
2012-05-22 13:57         ` Neil Horman
2012-05-29 19:33         ` Neil Horman
2012-05-30  5:29           ` Eric Dumazet

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=1337179681.8512.1212.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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