netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Denys Fedoryshchenko <denys@visp.net.lb>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
	netdev@vger.kernel.org
Subject: Re: iproute2 proposal
Date: Wed, 06 Aug 2008 12:25:48 +0200	[thread overview]
Message-ID: <48997C2C.8050208@trash.net> (raw)
In-Reply-To: <200808061322.54655.denys@visp.net.lb>

Denys Fedoryshchenko wrote:
> On Wednesday 06 August 2008, Patrick McHardy wrote:
> 
>> No patch attached ..
> 
> Sorry :-) Now must be attached

> +++ iproute2-patched/tc/m_mirred.c	2008-08-06 09:49:39.000000000 +0000
> @@ -27,6 +27,7 @@
>  #include <linux/tc_act/tc_mirred.h>
>  
>  int mirred_d = 1;
> +extern int link_cache;
>  
>  static void
>  explain(void)
> @@ -146,7 +147,10 @@
>  
>  	if (d[0])  {
>  		int idx;
> -		ll_init_map(&rth);
> +		if (!link_cache) {
> + 		    ll_init_map(&rth);
> +		    link_cache = 1;
> +		}

It would be nicer to avoid the initialization in ll_init_map() as
you did in your first patch and add an explicit ll_invalidate_map()
and call it when necessary (ip link add/del/change(?), ip tunnel
add/del/change(?)).

  reply	other threads:[~2008-08-06 10:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05 22:25 iproute2 proposal Denys Fedoryshchenko
2008-08-06  8:28 ` Patrick McHardy
2008-08-06 10:04   ` Denys Fedoryshchenko
2008-08-06 10:09     ` Patrick McHardy
2008-08-06 10:09       ` Patrick McHardy
2008-08-06 10:22       ` Denys Fedoryshchenko
2008-08-06 10:25         ` Patrick McHardy [this message]
2008-08-06 10:38           ` Denys Fedoryshchenko

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=48997C2C.8050208@trash.net \
    --to=kaber@trash.net \
    --cc=denys@visp.net.lb \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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).