On Thursday 03 February 2005 05:47, Shane Hathaway wrote:
The attached patch enhances the kernel's DHCP client support (in
net/ipv4/ipconfig.c) to set the interface MTU if provided by the
DHCP server. Without this patch, it's difficult to netboot on a
network that uses jumbo frames. The patch is based on 2.6.10, but
I'll update it to the latest testing kernel if that would expedite
its inclusion in the kernel.
Well, I've been there before, and asked for exact the same back in June 2003, but had much less luck, nobody of kernel fame even responded:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105624464918574&w=4
For what is worth it, I ported my patch to current 2.6, which raised some comments compared to yours:
- Is it really necessary to protect the dev_set_mtu call, since it is
just setting up the device?
- I prefer to call dev_set_mtu only, if a change mtu request is
sent..
- Are you sure, you got the endianess right?
Here's the "cost": ipconfig.o without my patch on x86:
3 .init.data 0000005a 00000000 00000000 00000220 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
4 .rodata.str1.1 000001a2 00000000 00000000 0000027a 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rodata.str1.4 000003ad 00000000 00000000 0000041c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .init.text 00001a45 00000000 00000000 000007d0 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
With patch:
3 .init.data 0000005e 00000000 00000000 00000220 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
4 .rodata.str1.1 000001ab 00000000 00000000 0000027e 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rodata.str1.4 000003e5 00000000 00000000 0000042c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .init.text 00001ab5 00000000 00000000 00000820 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
Difference: 181 Bytes (padding ignored)
The whole module takes about 9K, compared to dhcp in initrd, which takes a few hundred K! Hmm.
May the linux gods indulge on this topic one day or remove the ipconfig module completely.