Re: Routing



stas.ibragimov@xxxxxxxxx wrote:
Hi, hackers :) In /usr/src/sys/netinet/tcp_output.c if function tcp_output() there are
code: error = ip_output(m, tp->t_inpcb->inp_options, NULL, ((so->so_options &
SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, tp->t_inpcb); In this function there are only one
call ip_output function, but struct route is null. I think, that more optimaly is to
keep the pointer to struct route in tcpcb.And not to search route every time, when
tcp_output called.

We had what you describe in FreeBSD prior to version 5.2 and it was a mess.
There were routing table pointers and references all over the place and when
routes changed we had to scan all tcpcb's to nuke old references. Also the
cached host information moved from the routing table to the tcp_hostcache.
While the route loopup per segment send is a very small overhead it outweights
the drawbacks of the previous system quite a bit. And the code is much nicer.

--
Andre

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Orchid Box ... routing problem
    ... Brian A wrote: ... good pointer. ... I do route all '00' but I could use route 02 and route ... Jon ...
    (uk.telecom)
  • Re: Orchid Box ... routing problem
    ... Brian A wrote: ... good pointer. ... I do route all '00' but I could use route 02 and route ... Jon ...
    (uk.telecom)
  • Re: Directions in space?
    ... Now, I have at least some direction sense, so I surprise people by being ... I may know that there is another road west of where I am ... system you may be able to, since you have a lot of references, but if you ... masses en route. ...
    (rec.arts.sf.written)
  • Re: Wisconsin: US-151s Business Routes - Help!
    ... I've seen a few references to such a route online. ... US-18 back to US-151 at Exit 47? ...
    (misc.transport.road)
  • Re: Route caching ?
    ... ip_outputwill still call rtalloc() if you pass it a filled out 'struct route', a structure which is not a route, but an internal request to look up a route. ... This is a wrapper for rtalloc_ign, which in turn is a wrapper for rtalloc1, the function which does the actual lookup. ...
    (freebsd-net)