Re: git: network - Move socket from netmsg ext to netmsg header,

看板DFBSD_commit作者時間16年前 (2009/12/10 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串11/11 (看更多)
Matthew Dillon wrote: > :... > :if (taop->tao_mssopt != 0 && taop->tao_mssopt < maxopd) > : maxopd = taop->tao_mssopt; > : > :Looks like it could be moved in rt_metrics too, but I haven't thought > :this through yet. > : > :Opinions? > : > :Thanks, > :Aggelos > > Hmm. The problem with moving it to rt_metrics is that tao_mssopt > is going to wind up being assigned by nearly every single tcp > connection via tcp_mss(), and not just from ICMP-based MTU discovery. tao_mssopt is not currently set from MTU discovery. It is only set in tcp_mss(), i.e. it is already being set by every tcp connection. The only place where it's used IS in the MTU discovery code that I pasted above. So moving it to rt_metrics implies no functional change. > I'm not sure how rt_metrics works but if it allocates space for > all the metrics we could wind up making the route table bigger > instead of smaller. The metrics are part of the rt_entry structure and I noticed that the TAO information is already stored there: #define rmx_taop(rt) ((struct rmxp_tao *)(rt).rmx_filler) So what I did is: - u_long rmx_filler[4]; /* will be used for T/TCP later */ + u_short rmx_mssopt; /* peer's cached MSS */ + u_long rmx_filler[3]; /* for future expansion */ BTW, an easy way to shrink the route table is to get rid of the rmx_filler field, though that would change the size of the whole struct rtentry (I'm not sure what code depends on that, but a full buildworld/buildkernel should be enough). Aggelos
文章代碼(AID): #1B84-MYT (DFBSD_commit)
討論串 (同標題文章)
完整討論串 (本文為第 11 之 11 篇):
文章代碼(AID): #1B84-MYT (DFBSD_commit)