* iproute2 caching and batch mode
@ 2011-01-08 20:09 denys
2011-01-08 20:36 ` denys
2011-01-09 17:53 ` Stephen Hemminger
0 siblings, 2 replies; 3+ messages in thread
From: denys @ 2011-01-08 20:09 UTC (permalink / raw)
To: Stephen Hemminger, netdev
Hi,
noticed some issue a while ago, and because of recent patches decided to
post my thoughts:
This issue can happen if ip or tc running in some kind of "daemon" batch
mode, or processing large batch file on computer where interfaces can
reappear with same name but different index (pppoe NAS for example).
It is easy to reproduce the problem:
centaur iproute2-2.6.37 # ip/ip -force -batch -
tunnel add test0 mode ipip remote 1.1.1.2 local 1.1.1.1
link show dev test0
201: test0: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN
link/ipip 1.1.1.1 peer 1.1.1.2
tunnel del test0
Unsupported family:17
Or:
centaur iproute2-2.6.37 # ip/ip -force -batch -
tunnel del test0
tunnel add test0 mode ipip remote 1.1.1.2 local 1.1.1.1
link show dev test0
202: test0: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN
link/ipip 1.1.1.1 peer 1.1.1.2
(another console, delete and create again test0)
link show dev test0
(nothing will appear)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iproute2 caching and batch mode
2011-01-08 20:09 iproute2 caching and batch mode denys
@ 2011-01-08 20:36 ` denys
2011-01-09 17:53 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: denys @ 2011-01-08 20:36 UTC (permalink / raw)
To: denys; +Cc: Stephen Hemminger, netdev
On Sat, 08 Jan 2011 22:09:39 +0200, <denys@visp.net.lb> wrote:
> Hi,
>
> noticed some issue a while ago, and because of recent patches decided to
> post my thoughts:
>
> This issue can happen if ip or tc running in some kind of "daemon" batch
> mode, or processing large batch file on computer where interfaces can
> reappear with same name but different index (pppoe NAS for example).
>
> It is easy to reproduce the problem:
>
> centaur iproute2-2.6.37 # ip/ip -force -batch -
> tunnel add test0 mode ipip remote 1.1.1.2 local 1.1.1.1
> link show dev test0
> 201: test0: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN
> link/ipip 1.1.1.1 peer 1.1.1.2
> tunnel del test0
> Unsupported family:17
>
> Or:
>
> centaur iproute2-2.6.37 # ip/ip -force -batch -
> tunnel del test0
> tunnel add test0 mode ipip remote 1.1.1.2 local 1.1.1.1
> link show dev test0
> 202: test0: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN
> link/ipip 1.1.1.1 peer 1.1.1.2
> (another console, delete and create again test0)
> link show dev test0
> (nothing will appear)
Sorry, just got mail sent before i finish it.
Is it appropriate to implement some kind of "flush" command, to flush
internal cache?
I can try to do that, if this way is ok.
Sure maybe best way to monitor interface updates over netlink, in batch
mode, and update cache accordingly.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iproute2 caching and batch mode
2011-01-08 20:09 iproute2 caching and batch mode denys
2011-01-08 20:36 ` denys
@ 2011-01-09 17:53 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2011-01-09 17:53 UTC (permalink / raw)
To: denys; +Cc: netdev
On Sat, 08 Jan 2011 22:09:39 +0200
<denys@visp.net.lb> wrote:
> Hi,
>
> noticed some issue a while ago, and because of recent patches decided to
> post my thoughts:
>
> This issue can happen if ip or tc running in some kind of "daemon" batch
> mode, or processing large batch file on computer where interfaces can
> reappear with same name but different index (pppoe NAS for example).
>
> It is easy to reproduce the problem:
>
> centaur iproute2-2.6.37 # ip/ip -force -batch -
> tunnel add test0 mode ipip remote 1.1.1.2 local 1.1.1.1
> link show dev test0
> 201: test0: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN
> link/ipip 1.1.1.1 peer 1.1.1.2
> tunnel del test0
> Unsupported family:17
>
> Or:
>
> centaur iproute2-2.6.37 # ip/ip -force -batch -
> tunnel del test0
> tunnel add test0 mode ipip remote 1.1.1.2 local 1.1.1.1
> link show dev test0
> 202: test0: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN
> link/ipip 1.1.1.1 peer 1.1.1.2
> (another console, delete and create again test0)
> link show dev test0
> (nothing will appear)
>
This is one of the reasons caching names seems to be a bad idea.
Caching ifindex is okay because it normally does not change.
The point of batch mode was to allow complex setup scripts to
avoid the overhead of repeated invocations. Using it as a long
running daemon was not something I thought about, and frankly
seems like a bad idea for general usage.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-09 17:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-08 20:09 iproute2 caching and batch mode denys
2011-01-08 20:36 ` denys
2011-01-09 17:53 ` Stephen Hemminger
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).