NetBSD-Users archive

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

Re: UDP Lite Support on NetBSD 6.0



On Tue, Jan 15, 2013 at 12:11 AM, Matt Thomas wrote:
>
> On Jan 14, 2013, at 5:45 AM, Greg Troxel wrote:
>
>>
>> dave jones <s.dave.jones%gmail.com@localhost> writes:
>>
>>> I'd work on it and learn NetBSD network internals, but it seems
>>> like there is a lot of duplicated code in order to implement UDP-Lite.
>>> For example, in udp_output(), to fill in mbuf with extended UDP-Lite header,
>>> I'd add the following code:
>>>
>>> #ifdef UDPLITE
>>>        ui->ui_pr = IPPROTO_UDPLITE;
>>> #else
>>>        ui->ui_pr = IPPROTO_UDP;
>>> #endif
>>>
>>> Is it a good idea? or any some suggestions? Thank you.
>>
>> Adding support for UDP-Lite should not involve removing support for
>> UDP.
>
> Indeed.  I have untested diffs for UDP-lite 
> (http://www.netbsd.org/~matt/udplite-diffs.txt) but realized that without 
> corresponding changes to all the network drivers, what's the point?
>
> For UDPlite to be useful, the network drivers would need to stop discarding 
> packets with CRC errors and instead pass them up the stack.  We'd need a 
> M_BADCRC flag to tag packets with bad CRCs.  We also need code to identify 
> packets as UDPlite.  Then each common if_xxxsubr needs to test that flag and 
> if set check for udplite, and if not discard.
>
> I thought about it and realized the additional overhead and complexity just 
> wasn't worth it so I stopped working on it.

Awesome! I tried to compile kernel with your diff. I got an error
while running a testing program:

udpliteclient: setsockopt(UDPLITE_SEND_CSCOV): Protocol option not available

Should I need to recompile libc as well or did I miss something? Thank you.

Regards,
Dave.


Home | Main Index | Thread Index | Old Index