MTU/MRU

Post Reply
zigg
Posts: 28
Joined: Wed Jul 01, 2009 2:42 pm

MTU/MRU

Post by zigg » Thu Jul 16, 2009 3:46 pm

As I understand it, the MTU for dswifi is 1460 (SGIP_MTU_OVERRIDE in sgIP_Config.h).

Is the MRU the same? More to the point, what is the biggest UDP payload I can expect to recvfrom() (MRU - IP - UDP)?

(edited; MRU doesn't include Ethernet headers)
Last edited by zigg on Thu Jul 16, 2009 6:08 pm, edited 1 time in total.

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: MTU/MRU

Post by elhobbs » Thu Jul 16, 2009 5:48 pm

If I understand your question correctly - then I believe it is limited by the cache size that dswifi is initialized with. 128k is the default. so it will something less than that. and obviously less than or equal to the the buffer that you pass to recvfrom. it is a 2 mbit connection so if you are calling it every frame you are looking at ~4k at most... but probably a lot less.

zigg
Posts: 28
Joined: Wed Jul 01, 2009 2:42 pm

Re: MTU/MRU

Post by zigg » Thu Jul 16, 2009 6:07 pm

Well, not precisely. MTU/MRU dictate the maximum size of a single packet.

MTU is the biggest packet that can be sent—this is where the 1420-byte TCP sends I got was coming from (or at least I believe so) since the MTU appears to be 1460 and the IP+TCP headers add up to 40 bytes if TCP options aren't used.

MRU would tell me how big a buffer I should allocate in order to be able to accept a packet of indeterminate size from another host. In the case of UDP I would subtract 20 IP header bytes and 8 UDP header bytes from this number to get the maximum receivable UDP payload.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests