Skip to contentSkip to conversation

User mode linux bump maximum MTU tuntap interface

PATCH New Алексей 4 participants 6 messages Jul 1, 2019 – Jul 12, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 User mode linux bump maximum MTU tuntap interface

Hello, the parameter  ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames.

This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver.

PATCH:

-------------------

diff -ruNp ./src/1/linux-5.1/arch/um/include/shared/net_user.h ./src/linux-5.1/$

arch/um/include/shared/net_user.h 2019-07-01 16:09:20.316666597 +0000 renamed from arch/um/include/shared/net_user.h 2019-05-06 00:42:58.000000000 +0000 +0 -0
@@ -9,7 +9,7 @@

 #define ETH_ADDR_LEN (6)
 #define ETH_HEADER_ETHERTAP (16)
 #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for crazy peopl$
-#define ETH_MAX_PACKET (1500)
+#define ETH_MAX_PACKET (65535)

 #define UML_NET_VERSION (4)

#1 lore raw

PATCH 1/1 User mode linux bump maximum MTU tuntap interface [RESAND]

Hello, the parameter  ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames.

This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver.

PATCH:

-------------------

diff -ruNP ../linux_orig/linux-5.1/arch/um/include/shared/net_user.h ./arch/um/include/shared/net_user.h
--- a/arch/um/include/shared/net_user.h    2019-05-06 00:42:58.000000000 +0000
+++ b/arch/um/include/shared/net_user.h    2019-07-02 07:14:13.593333356 +0000
@@ -9,7 +9,7 @@
 #define ETH_ADDR_LEN (6)
 #define ETH_HEADER_ETHERTAP (16)
 #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for crazy people */
-#define ETH_MAX_PACKET (1500)
+#define ETH_MAX_PACKET (65535)

 #define UML_NET_VERSION (4)

-------------------

#2 lore raw

Re: [PATCH] User mode linux bump maximum MTU tuntap interface [RESAND]

CC'ing um folks.

Quoted 32 lines · Алексей

Hello, the parameter ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames.

This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver.

PATCH:

-------------------

diff -ruNP ../linux_orig/linux-5.1/arch/um/include/shared/net_user.h ./arch/um/include/shared/net_user.h
--- a/arch/um/include/shared/net_user.h 2019-05-06 00:42:58.000000000
+0000
+++ b/arch/um/include/shared/net_user.h 2019-07-02 07:14:13.593333356
+0000

(quoted diff) +0 -0
@@ -9,7 +9,7 @@
 #define ETH_ADDR_LEN (6)
 #define ETH_HEADER_ETHERTAP (16)
 #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for

crazy people */

(quoted diff) +1 -2
-#define ETH_MAX_PACKET (1500)
+#define ETH_MAX_PACKET (65535)
 
 #define UML_NET_VERSION (4)
 
-------------------
Signature · 7 lines
Thanks,
//richard

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
#3 lore raw

Re: [PATCH] User mode linux bump maximum MTU tuntap interface [RESAND]

Quoted 30 lines · Richard Weinberger

CC'ing um folks.

Quoted 27 lines · Алексей

Hello, the parameter ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames.

This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver.

PATCH:

-------------------

diff -ruNP ../linux_orig/linux-5.1/arch/um/include/shared/net_user.h ./arch/um/include/shared/net_user.h
--- a/arch/um/include/shared/net_user.h 2019-05-06 00:42:58.000000000
+0000
+++ b/arch/um/include/shared/net_user.h 2019-07-02 07:14:13.593333356
+0000

(quoted diff) +0 -0
@@ -9,7 +9,7 @@
  #define ETH_ADDR_LEN (6)
  #define ETH_HEADER_ETHERTAP (16)
  #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for

crazy people */

(quoted diff) +1 -1
-#define ETH_MAX_PACKET (1500)
+#define ETH_MAX_PACKET (65535)
Quoted 7 lines
Quoted 5 lines
  #define UML_NET_VERSION (4)

-------------------

The vector version for tap already allows mtu > 1500. It does not have a check to limit it to 65535 max though and it should.

I will add this one to the queue of stuff for the network drivers. IMHO we should start migrating some of the older ones to vector IO.

Signature · 2 lines
Anton R. Ivanov
https://www.kot-begemot.co.uk/
maintainer
#4 lore raw

Re: [PATCH] User mode linux bump maximum MTU tuntap interface [RESAND]

In reply to Richard Weinberger
Quoted 30 lines · Richard Weinberger

CC'ing um folks.

Quoted 27 lines · Алексей

Hello, the parameter ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames.

This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver.

PATCH:

-------------------

diff -ruNP ../linux_orig/linux-5.1/arch/um/include/shared/net_user.h ./arch/um/include/shared/net_user.h
--- a/arch/um/include/shared/net_user.h 2019-05-06 00:42:58.000000000
+0000
+++ b/arch/um/include/shared/net_user.h 2019-07-02 07:14:13.593333356
+0000

(quoted diff) +0 -0
@@ -9,7 +9,7 @@
  #define ETH_ADDR_LEN (6)
  #define ETH_HEADER_ETHERTAP (16)
  #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for

crazy people */

(quoted diff) +1 -1
-#define ETH_MAX_PACKET (1500)
+#define ETH_MAX_PACKET (65535)
Quoted 7 lines
Quoted 5 lines
  #define UML_NET_VERSION (4)

-------------------

This does not quite work because in some of the drivers you get extra added on top of this constant.

I am going to see what can be done to fix the old net* drivers, imho we should start phasing them out in favor of the vector ones.

Signature · 8 lines
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
maintainer
#5 lore raw

Re: [PATCH] User mode linux bump maximum MTU tuntap interface [RESAND]

Quoted 39 lines · Anton Ivanov
Quoted 30 lines · Richard Weinberger

CC'ing um folks.

Quoted 27 lines · Алексей

Hello, the parameter  ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames.

This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver.

PATCH:

-------------------

diff -ruNP ../linux_orig/linux-5.1/arch/um/include/shared/net_user.h ./arch/um/include/shared/net_user.h
--- a/arch/um/include/shared/net_user.h    2019-05-06 00:42:58.000000000 +0000
+++ b/arch/um/include/shared/net_user.h    2019-07-02 07:14:13.593333356 +0000

(quoted diff) +0 -0
@@ -9,7 +9,7 @@
   #define ETH_ADDR_LEN (6)
   #define ETH_HEADER_ETHERTAP (16)
   #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for

crazy people */

(quoted diff) +1 -1
-#define ETH_MAX_PACKET (1500)
+#define ETH_MAX_PACKET (65535)
Quoted 7 lines
Quoted 5 lines

  #define UML_NET_VERSION (4)

-------------------

Quoted 4 lines

This does not quite work because in some of the drivers you get extra added on top of this constant.

I am going to see what can be done to fix the old net* drivers, imho we should start phasing them out in favor of the vector ones.

In fact it does not work even for lower values because the old net_ family assumes a contiguous skb buffer and uses read/write functions which read the whole packet into it at once. That is the buffer it get if it asks for anything less than SKB_WITH_OVERHEAD(PAGE_SIZE).

If it asks for more there is no guarantee that the resulting buffer will be contiguous - it may get a segmented skb and will need to use appropriate functions to read/write into segments.

If you just up the MTU without fixing the underlying transport you get memory corruption.

If we are to support this I have to rewrite the whole driver set and it will frankly be easier to just make them use vector drivers underneath and set the names to be ethX instead.

In fact, I will probably do a patch that does that the moment I finish adding all existing socket transports to vector_user.c.

Signature · 8 lines
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um