On Tue, May 26, 2015 at 7:55 PM, Mihai Chelaru <[email protected]> wrote: > On 26/05/15 05:42, Ryota Ozaki wrote: >> >> Hi, >> >> The mail subject may recall someone an old thread: >> https://mail-index.netbsd.org/tech-net/2013/02/01/msg003847.html >> >> Yes, I'm taking over the task :) >> >> >> http://www.netbsd.org/~ozaki-r/refactor_l2_output.diff >> >> The patch is basically the same as dyoung's patch with some >> tweaks to make it work on -current; it gets rid of route >> lookups from L2 output routines such as ether_output >> and puts them between ip_output and L2 output routines. >> >> One known issue of the change is that it adds an mbuf flag >> to tell ether_output that mbuf is to be set MPLS ether >> type. I don't think it's the best way but I don't have >> another better approach for now. >> >> Any comments or suggestions are welcome. >> >> Thanks, >> ozaki-r >> > > Hi there, > > I have some questions/observations: > > * This cod is generic enough to be linked apart from ip_output.c Maybe it > can be reused by other protocols as well ? (hint nd6_output)
I think so, but not tried yet. I'll try tomorrow. > * did this patch passed the current net tests ? Yes! > > Now about MPLS: > > * I'm kinda reluctant in using flags to describe protocol specifics, maybe > should use a tag for now instead of flags even if this interface is slower ? Sure. So we can postpone to add something. We would have a better solution then. > * I think flagging/tagging should also be used in mpls LSE - probably in > send_frame. I'm not sure. Without flagging/tagging for LSE, all tests of MPLS pass. > * and also in ip6 output path. I'll try to find time this week to write some > tests for ip6/mpls - but you can test using route. > * mpls/gre needs also to be hacked because it uses the same test (have to > write a test for mpls+gre, too) Such tests are welcome! We need much more tests for networking. Thanks, ozaki-r
