tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: nexthop cache separation



On Wed, Mar 23, 2016 at 5:16 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
(snip)
>
> I don't have examples of route get outputs now. I'll provide
> them later. (I think we need some tests for it.)

Here it is. The differences of "route get" between -current
kernel and the new implementation are:
- Flag CLONING is changed to CONNECTED.
- If a nexthop entry is cached, "route get" to it was changed
  from a cloning route to a cloned route (nexthop entry) while
  the new implementation always shows a connected route.

During collecting the outputs, I found a bug route get <nexthop>
was broken. So I fixed it:
  http://www.netbsd.org/~ozaki-r/separate-nexthop-caches-v4.diff
  http://www.netbsd.org/~ozaki-r/separate-nexthop-caches-v4-diff.diff

In order to fix the issue, I needed a workaround to keep
backward compatibility (for old binaries of arp/ndp -d).
See the comment of the 2nd patch for details.

Thanks,
  ozaki-r

======================================
[before]
tc-so:Routing tables
tc-so:
tc-so:Internet:
tc-so:Destination        Gateway            Flags    Refs      Use
Mtu Interface
tc-so:default            10.0.1.1           UGS         -        -
 -  shmif0
tc-so:10.0.1/24          link#2             UC          -        -
 -  shmif0
tc-so:10.0.1.1           b2:a0:5d:cb:b1:c0  UHLc        -        -
 -  shmif0
tc-so:10.0.1.2           b2:a0:2a:6c:41:19  UHLl        -        -      -  lo0
tc-so:127.0.0.1          lo0                UHl         -        -  33648  lo0

tc-so:   route to: 10.0.1.2
tc-so:destination: 10.0.1.2
tc-so: local addr: 10.0.1.2
tc-so:  interface: lo0
tc-so:      flags: <UP,HOST,DONE,LLINFO,LOCAL>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

tc-so:   route to: 10.0.1.1
tc-so:destination: 10.0.1.0
tc-so:       mask: 255.255.255.0
tc-so: local addr: 10.0.1.2
tc-so:  interface: shmif0
tc-so:      flags: <UP,DONE,CLONING>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

tc-so:   route to: 10.0.2.2
tc-so:destination: default
tc-so:       mask: default
tc-so:    gateway: 10.0.1.1
tc-so: local addr: 10.0.1.2
tc-so:  interface: shmif0
tc-so:      flags: <UP,GATEWAY,DONE,STATIC>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

[before (cached)]
tc-so:Routing tables
tc-so:
tc-so:Internet:
tc-so:Destination        Gateway            Flags    Refs      Use
Mtu Interface
tc-so:default            10.0.1.1           UGS         -        -
 -  shmif0
tc-so:10.0.1/24          link#2             UC          -        -
 -  shmif0
tc-so:10.0.1.1           b2:a0:5d:cb:b1:c0  UHLc        -        -
 -  shmif0
tc-so:10.0.1.2           b2:a0:2a:6c:41:19  UHLl        -        -      -  lo0
tc-so:127.0.0.1          lo0                UHl         -        -  33648  lo0

tc-so:   route to: 10.0.1.2
tc-so:destination: 10.0.1.2
tc-so: local addr: 10.0.1.2
tc-so:  interface: lo0
tc-so:      flags: <UP,HOST,DONE,LLINFO,LOCAL>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

tc-so:   route to: 10.0.1.1
tc-so:destination: 10.0.1.1
tc-so: local addr: 10.0.1.2
tc-so:  interface: shmif0
tc-so:      flags: <UP,HOST,DONE,LLINFO,CLONED>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0      1199

tc-so:   route to: 10.0.2.2
tc-so:destination: default
tc-so:       mask: default
tc-so:    gateway: 10.0.1.1
tc-so: local addr: 10.0.1.2
tc-so:  interface: shmif0
tc-so:      flags: <UP,GATEWAY,DONE,STATIC>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

[after]
tc-so:Routing tables
tc-so:
tc-so:Internet:
tc-so:Destination        Gateway            Flags    Refs      Use
Mtu Interface
tc-so:default            10.0.1.1           UGS         -        -
 -  shmif0
tc-so:10.0.1/24          link#2             UC          -        -
 -  shmif0
tc-so:10.0.1.2           link#2             UHl         -        -      -  lo0
tc-so:127.0.0.1          lo0                UHl         -        -  33648  lo0

tc-so:   route to: 10.0.1.2
tc-so:destination: 10.0.1.2
tc-so: local addr: 10.0.1.2
tc-so:  interface: lo0
tc-so:      flags: <UP,HOST,DONE,LLINFO,LOCAL>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

tc-so:   route to: 10.0.1.1
tc-so:destination: 10.0.1.0
tc-so:       mask: 255.255.255.0
tc-so: local addr: 10.0.1.2
tc-so:  interface: shmif0
tc-so:      flags: <UP,DONE,CONNECTED>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0

tc-so:   route to: 10.0.2.2
tc-so:destination: default
tc-so:       mask: default
tc-so:    gateway: 10.0.1.1
tc-so: local addr: 10.0.1.2
tc-so:  interface: shmif0
tc-so:      flags: <UP,GATEWAY,DONE,STATIC>
tc-so: recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount
mtu     expire
tc-so:       0         0         0         0         0         0
  0         0
======================================


Home | Main Index | Thread Index | Old Index