DragonFly BSD
DragonFly kernel List (threaded) for 2012-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: some kernel hacking tasks


From: Sepherosa Ziehau <sepherosa@xxxxxxxxx>
Date: Tue, 2 Oct 2012 18:22:28 +0800

On Tue, Oct 2, 2012 at 5:57 AM, Antonio Huete Jimenez
<ahuete.devel@gmail.com> wrote:
> Hi Sephe,
>
> Here's a patch for bpf:
> http://island.quantumachine.net/~antonioh/archive/patches/bpf_token01.diff
> Not sure if I'm missing something.

I have looked at the patch.  I think there are still something missing:
- bpf code actually assumes that mplock is held on the device node
interfaces, so you probably need to protect them w/ the bpf token.
- bpfattach/bpfdetach should probably be protected by bpf token
- Macros like BPF_TAP() and ETHER_BPF_MTAP() probably will need the
check-hold_token-recheck sequence, e.g.:
if (ifp->if_bpf) {
    bpf_gettoken();
    if (ifp->if_bpf)
        bpf_tap(...);
    bpf_reltoken();
}

Best Regards,
sephe

>
> I've tested it with netperf in one ssh session and tcpdump in another
> (thanks sjg)
>
> Cheers,
> Antonio Huete
>
> 2012/9/29 Sepherosa Ziehau <sepherosa@gmail.com>:
>> Hi all,
>>
>> I have several kernel hacking tasks; any helping hands are welcome.
>> - Replace bpf's mplock w/ its own token
>> - Support busdma(9) in some network drivers, the most commonly
>> used/available ones:
>> o  dc(4)
>> o  fxp(4)
>> o  vr(4)
>> There are actually more drivers that do not support busdma(9):
>> find /usr/src/sys/dev/netif -type f -name "*.c" -exec grep -l
>> "contigmalloc" "{}" ";"
>>
>> I could help to review, test and commit the patch.
>>
>> Best Regards,
>> sephe
>>
>> --
>> Tomorrow Will Never Die



-- 
Tomorrow Will Never Die



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