Re: Max Packet Size in Kernel
From: Kevin Buhr (buhr_at_telus.net)
Date: 03/12/04
- Next message: Kasper Dupont: "Re: Provide info about Registry in Linux or emulation of registryof Windows in Linux"
- Previous message: Grant Edwards: "Re: Provide info about Registry in Linux or emulation of registry of Windows in Linux"
- In reply to: Kasper Dupont: "Re: Max Packet Size in Kernel"
- Next in thread: Kasper Dupont: "Re: Max Packet Size in Kernel"
- Reply: Kasper Dupont: "Re: Max Packet Size in Kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 12 Mar 2004 20:16:42 GMT
Kasper Dupont <kasperd@daimi.au.dk> writes:
>
> cjfoste@asu.edu wrote:
>>
>> I have the problem where I can only send packets with a MAX of 256
>> bytes in my network device driver.
This is very intriguing. Can you explain why you have this problem,
exactly? Do you mean that you're developing a driver for a network
whose packets are limited to 256 bytes, or do you mean something else?
> It is called mtu and is a field in struct net_device.
> I don't know the details about programing a network
> driver, but I can see many existing drivers just
> initialize this field to 1500. You probably just need
> to initialize it to 256. However the IP standard has
> a minimum requirement for the mtu which AFAIR is 512,
> so setting MTU to 256 might be a violation of IP.
You're pretty much right (except the minimum size you're thinking of
is 576 bytes---a 512-byte payload plus 64 bytes of header). Also, the
exact requirement is that all hosts must be prepared to accept a
datagram of up to 576 octets, but it can be fragmented. The official
minimum MTU is only 68 bytes.
If Christopher is developing a driver and wants to make sure it never
gets a packet from the kernel that's bigger than 256 bytes, he
should---as you say---set the driver's mtu to 256. He should also
implement a "change_mtu" callback that rejects user requests to change
the MTU to a value outside the range 68 to 256.
-- Kevin <buhr@telus.net>
- Next message: Kasper Dupont: "Re: Provide info about Registry in Linux or emulation of registryof Windows in Linux"
- Previous message: Grant Edwards: "Re: Provide info about Registry in Linux or emulation of registry of Windows in Linux"
- In reply to: Kasper Dupont: "Re: Max Packet Size in Kernel"
- Next in thread: Kasper Dupont: "Re: Max Packet Size in Kernel"
- Reply: Kasper Dupont: "Re: Max Packet Size in Kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|