diff mbox

[ovs-dev,3/3] ovsschema: Limits the range of the MTU.

Message ID 1481518137-3134-3-git-send-email-nic@opencloud.tech
State Accepted
Headers show

Commit Message

nickcooper-zhangtonghao Dec. 12, 2016, 4:48 a.m. UTC
According to RFC 791, every internet module must be
able to forward a datagram of 68 octets without further
fragmentation.  This is because an internet header may
be up to 60 octets, and the minimum fragment is 8 octets.
The maximum size of IP packets is 65535 bytes. The range
of MTU values allowes for the MTU configuration parameter
is 68 to 65535.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
---
 vswitchd/vswitch.ovsschema | 5 +++--
 vswitchd/vswitch.xml       | 6 +++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

Comments

Ben Pfaff Dec. 13, 2016, 1:10 a.m. UTC | #1
On Sun, Dec 11, 2016 at 08:48:57PM -0800, nickcooper-zhangtonghao wrote:
> According to RFC 791, every internet module must be
> able to forward a datagram of 68 octets without further
> fragmentation.  This is because an internet header may
> be up to 60 octets, and the minimum fragment is 8 octets.
> The maximum size of IP packets is 65535 bytes. The range
> of MTU values allowes for the MTU configuration parameter
> is 68 to 65535.
> 
> Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>

I don't think it's worthwhile to restrict the range of the requested MTU
in this way.  There just doesn't seem to be a lot of value to it.

However, the documentation is valuable, so I applied that part of the
patch to master.

Thank you!
nickcooper-zhangtonghao Dec. 13, 2016, 1:26 a.m. UTC | #2
Thanks for your working and tips. :)

Thanks.
Nick

> On Dec 13, 2016, at 9:10 AM, Ben Pfaff <blp@ovn.org> wrote:
> 
> On Sun, Dec 11, 2016 at 08:48:57PM -0800, nickcooper-zhangtonghao wrote:
>> According to RFC 791, every internet module must be
>> able to forward a datagram of 68 octets without further
>> fragmentation.  This is because an internet header may
>> be up to 60 octets, and the minimum fragment is 8 octets.
>> The maximum size of IP packets is 65535 bytes. The range
>> of MTU values allowes for the MTU configuration parameter
>> is 68 to 65535.
>> 
>> Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech <mailto:nic@opencloud.tech>>
> 
> I don't think it's worthwhile to restrict the range of the requested MTU
> in this way.  There just doesn't seem to be a lot of value to it.
> 
> However, the documentation is valuable, so I applied that part of the
> patch to master.
> 
> Thank you!
diff mbox

Patch

diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema
index b04d360..f63ebfc 100644
--- a/vswitchd/vswitch.ovsschema
+++ b/vswitchd/vswitch.ovsschema
@@ -1,6 +1,6 @@ 
 {"name": "Open_vSwitch",
  "version": "7.14.0",
- "cksum": "3374030633 22987",
+ "cksum": "4218713702 23028",
  "tables": {
    "Open_vSwitch": {
      "columns": {
@@ -326,7 +326,8 @@ 
        "mtu_request": {
          "type": {
            "key": {"type": "integer",
-                   "minInteger": 1},
+                   "minInteger": 68,
+                   "maxInteger": 65535},
            "min": 0,
            "max": 1}},
        "error": {
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index d10fc1d..15ef954 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -2392,7 +2392,11 @@ 
               type='{"type": "integer", "minInteger": 1}'>
         <p>
           Requested MTU (Maximum Transmission Unit) for the interface. A client
-          can fill this column to change the MTU of an interface.
+          can fill this column to change the MTU of an interface. According to
+          RFC 791, every internet module must be able to forward a datagram of
+          68 octets without further fragmentation. The maximum size of IP packets
+          is 65535 bytes. The range of MTU values allowes for the mtu_request
+          parameter is 68 to 65535.
         </p>
 
         <p>