]> git.tuebingen.mpg.de Git - paraslash.git/commit
dccp_send: send data in MPS-sized chunks
authorGerrit Renker <grenker@cscs.ch>
Sun, 23 May 2010 05:43:04 +0000 (07:43 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 7 Jun 2010 21:24:53 +0000 (23:24 +0200)
commit1fa9dbea57d2dbc5d9b728a83a583c3a8f675410
tree1b25fc30ac8654f7e6559b736423682706736b04
parent666243e5776fd4609ef81ec6781f9eb9d9999700
dccp_send: send data in MPS-sized chunks

As mandated by RFC 4340, 14., DCCP maintains an internal variable called
'Maximum Packet Size', which can be queried via the DCCP_SOCKOPT_GET_CUR_MPS
socket option. This option has been available since 2007-10-04 (v2.6.23)
and is documented in Documentation/networking/dccp.txt.

The Maximum Packet Size takes into account the path MTU, size of headers and
the estimated overhead for DCCP options. The following table shows various
values that were determined experimentally between two hosts:

     +----------+------------+--------------+--------------------+
     | Medium   | IP version | MTU in bytes | Resulting DCCP MPS |
     +----------+------------+--------------+--------------------+
     | Ethernet |    IPv4    |     1500     |     1424 bytes     |
     | Ethernet |    IPv6    |     1500     |     1404 bytes     |
     +----------+------------+--------------+--------------------+
     | WiFi     |    IPv4    |      576     |      500 bytes     |
     | WiFi     |    IPv4    |     1280     |     1204 bytes     |
     | WiFi     |    IPv4    |     1500     |     1424 bytes     |
     | WiFi (a) |    IPv4    |     2048     |     1972 bytes     |
     +----------+------------+--------------+--------------------+
     | WiFi     |    IPv6    |      576     |      see (b)       |
     | WiFi     |    IPv6    |     1280     |     1184 bytes     |
     | WiFi     |    IPv6    |     1500     |     1404 bytes     |
     | WiFi (a) |    IPv6    |     2048     |     1952 bytes     |
     +----------+------------+--------------+--------------------+

Notes:
 (a) WiFi normally uses Ethernet MTU of 1500 bytes, but the medium
     supports a much larger MTU (Fragmentation threshold) of up to
     about 2300 bytes (system used 802.11g).
 (b) 576 byte MTU not tested for IPv6 since IPv6 mandates a minimum
     MTU of 1280 bytes, as per RFC 2460 section 5 (also RFC 5405, 3.2).

The patch implements the dccp init_fec() function based on the DCCP MPS.
dccp_send.c
net.h