Skip to contentSkip to conversation

um: Add a "ucast" ethernet transport

PATCH In review Nolan Leake 2 participants 5 messages Apr 13, 2011 – Apr 20, 2011

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

PATCH 1/1 um: Add a "ucast" ethernet transport

The "ucast" transport is similar to the mcast transport (and, in fact, shares most of its code), only it uses UDP unicast to move packets.

Obviously this is only useful for point-to-point connections between virtual ethernet devices.

---
 Documentation/uml/UserModeLinux-HOWTO.txt |   10 +++
 arch/um/drivers/mcast.h                   |    7 ++-
 arch/um/drivers/mcast_kern.c              |   82 +++++++++++++++++++--
 arch/um/drivers/mcast_user.c              |  113 +++++++++++++++++------------
 4 files changed, 157 insertions(+), 55 deletions(-)
Documentation/uml/UserModeLinux-HOWTO.txt +10 -0
index 9b7e190..5d0fc8b 100644
@@ -1182,6 +1182,16 @@
   forge.net/>  and explains these in detail, as well as
   some other issues.
 
+  There is also a related point-to-point only "ucast" transport.
+  This is useful when your network does not support multicast, and
+  all network connections are simple point to point links.
+
+  The full set of command line options for this transport are
+
+
+       ethn=ucast,ethernet address,remote address,listen port,remote port
+
+
 
 
   66..66..  TTUUNN//TTAAPP wwiitthh tthhee uummll__nneett hheellppeerr
arch/um/drivers/mcast.h +5 -2
index 6fa282e..4510d6f 100644
@@ -10,9 +10,12 @@
 
 struct mcast_data {
 	char *addr;
-	unsigned short port;
-	void *mcast_addr;
+	unsigned short lport;
+	unsigned short rport;
+	void *listen_addr;
+	void *remote_addr;
 	int ttl;
+	int unicast;
 	void *dev;
 };
 
arch/um/drivers/mcast_kern.c +75 -7

126 lines not on this page · raw message

arch/um/drivers/mcast_user.c +67 -46

167 lines not on this page · raw message

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw

Hi,

Am Mittwoch 13 April 2011, 01:51:33 schrieb Nolan Leake:

Quoted 6 lines

The "ucast" transport is similar to the mcast transport (and, in fact, shares most of its code), only it uses UDP unicast to move packets.

Obviously this is only useful for point-to-point connections between virtual ethernet devices.

Quoted 9 lines
---
 Documentation/uml/UserModeLinux-HOWTO.txt |   10 +++
 arch/um/drivers/mcast.h                   |    7 ++-
 arch/um/drivers/mcast_kern.c              |   82 +++++++++++++++++++--
 arch/um/drivers/mcast_user.c              |  113

+++++++++++++++++------------ 4 files changed, 157 insertions(+), 55 deletions(-)

Sorry, your mailer screwed the patch.
Please use git send-email.

With your patch drivers/mcast* would contain unicast stuff. This is a bit confusing.
Either rename the mcast files or put everything which have mcast and ucast in common into a separate file.

Are you using this patch in a production environment?

Thanks,
//richard

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 9 lines · Richard Weinberger

Am Mittwoch 13 April 2011, 01:51:33 schrieb Nolan Leake:

Quoted 5 lines

The "ucast" transport is similar to the mcast transport (and, in fact, shares most of its code), only it uses UDP unicast to move packets.

Obviously this is only useful for point-to-point connections between virtual ethernet devices.

Sorry, your mailer screwed the patch.
Please use git send-email.

Weird, I used the same settings I've used in the past for linux kernel patches. I'll try git send-email.

Quoted 4 lines

With your patch drivers/mcast* would contain unicast stuff. This is a bit confusing.
Either rename the mcast files or put everything which have mcast and ucast in common into a separate file.

OK, I'll do the rename.

Quoted 1 line

Are you using this patch in a production environment?

I use it for testing.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw

PATCH 1/1 um: Add a "ucast" ethernet transport.

In reply to Richard Weinberger

From: Nolan Leake <[email protected]>

The "ucast" transport is similar to the mcast transport (and, in fact, shares most of its code), only it uses UDP unicast to move packets.

Obviously this is only useful for point-to-point connections between virtual ethernet devices.

---
 Documentation/uml/UserModeLinux-HOWTO.txt |   10 ++
 arch/um/drivers/Makefile                  |    4 +-
 arch/um/drivers/mcast.h                   |   24 ----
 arch/um/drivers/mcast_kern.c              |  120 ------------------
 arch/um/drivers/mcast_user.c              |  165 -------------------------
 arch/um/drivers/umcast.h                  |   27 ++++
 arch/um/drivers/umcast_kern.c             |  188 +++++++++++++++++++++++++++++
 arch/um/drivers/umcast_user.c             |  186 ++++++++++++++++++++++++++++
 8 files changed, 413 insertions(+), 311 deletions(-)
 delete mode 100644 arch/um/drivers/mcast.h
 delete mode 100644 arch/um/drivers/mcast_kern.c
 delete mode 100644 arch/um/drivers/mcast_user.c
 create mode 100644 arch/um/drivers/umcast.h
 create mode 100644 arch/um/drivers/umcast_kern.c
 create mode 100644 arch/um/drivers/umcast_user.c
Documentation/uml/UserModeLinux-HOWTO.txt +10 -0
index 9b7e190..5d0fc8b 100644
@@ -1182,6 +1182,16 @@
   forge.net/>  and explains these in detail, as well as
   some other issues.
 
+  There is also a related point-to-point only "ucast" transport.
+  This is useful when your network does not support multicast, and
+  all network connections are simple point to point links.
+
+  The full set of command line options for this transport are
+
+
+       ethn=ucast,ethernet address,remote address,listen port,remote port
+
+
 
 
   66..66..  TTUUNN//TTAAPP wwiitthh tthhee uummll__nneett hheellppeerr
arch/um/drivers/Makefile +2 -2
index 1d9b6ae..dece93b 100644
@@ -9,7 +9,7 @@
 slip-objs := slip_kern.o slip_user.o
 slirp-objs := slirp_kern.o slirp_user.o
 daemon-objs := daemon_kern.o daemon_user.o
-mcast-objs := mcast_kern.o mcast_user.o
+umcast-objs := umcast_kern.o umcast_user.o
 net-objs := net_kern.o net_user.o
 mconsole-objs := mconsole_kern.o mconsole_user.o
 hostaudio-objs := hostaudio_kern.o
@@ -44,7 +44,7 @@ obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o
 obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o
 obj-$(CONFIG_UML_NET_DAEMON) += daemon.o 
 obj-$(CONFIG_UML_NET_VDE) += vde.o
-obj-$(CONFIG_UML_NET_MCAST) += mcast.o 
+obj-$(CONFIG_UML_NET_MCAST) += umcast.o 
 obj-$(CONFIG_UML_NET_PCAP) += pcap.o
 obj-$(CONFIG_UML_NET) += net.o 
 obj-$(CONFIG_MCONSOLE) += mconsole.o
arch/um/drivers/mcast.h deleted +0 -24
deleted file mode 100644
index 6fa282e..0000000
@@ -1,24 +0,0 @@
-/* 
- * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
- * Licensed under the GPL
- */
-
-#ifndef __DRIVERS_MCAST_H
-#define __DRIVERS_MCAST_H
-
-#include "net_user.h"
-
-struct mcast_data {
-	char *addr;
-	unsigned short port;
-	void *mcast_addr;
-	int ttl;
-	void *dev;
-};
-
-extern const struct net_user_info mcast_user_info;
-
-extern int mcast_user_write(int fd, void *buf, int len, 
-			    struct mcast_data *pri);
-
-#endif
arch/um/drivers/mcast_kern.c deleted +0 -120

120 lines not on this page · raw message

arch/um/drivers/mcast_user.c deleted +0 -165

165 lines not on this page · raw message

arch/um/drivers/umcast.h new file +27 -0
new file mode 100644
index 0000000..e1d21d4
@@ -0,0 +1,27 @@
+/* 
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
+ * Licensed under the GPL
+ */
+
+#ifndef __DRIVERS_UMCAST_H
+#define __DRIVERS_UMCAST_H
+
+#include "net_user.h"
+
+struct umcast_data {
+	char *addr;
+	unsigned short lport;
+	unsigned short rport;
+	void *listen_addr;
+	void *remote_addr;
+	int ttl;
+	int unicast;
+	void *dev;
+};
+
+extern const struct net_user_info umcast_user_info;
+
+extern int umcast_user_write(int fd, void *buf, int len,
+			     struct umcast_data *pri);
+
+#endif
arch/um/drivers/umcast_kern.c new file +188 -0

188 lines not on this page · raw message

arch/um/drivers/umcast_user.c new file +186 -0

186 lines not on this page · raw message

Signature · 13 lines
1.7.1


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#4 lore raw

Re: [uml-devel] [PATCH] um: Add a "ucast" ethernet transport.

Am Dienstag 19 April 2011, 02:46:26 schrieb Nolan Leake:

Quoted 18 lines

From: Nolan Leake <[email protected]>

The "ucast" transport is similar to the mcast transport (and, in fact, shares most of its code), only it uses UDP unicast to move packets.

Obviously this is only useful for point-to-point connections between virtual ethernet devices.

---
 Documentation/uml/UserModeLinux-HOWTO.txt |   10 ++
 arch/um/drivers/Makefile                  |    4 +-
 arch/um/drivers/mcast.h                   |   24 ----
 arch/um/drivers/mcast_kern.c              |  120 ------------------
 arch/um/drivers/mcast_user.c              |  165 -------------------------
 arch/um/drivers/umcast.h                  |   27 ++++
 arch/um/drivers/umcast_kern.c             |  188

+++++++++++++++++++++++++++++ arch/um/drivers/umcast_user.c |

Quoted 9 lines

186 ++++++++++++++++++++++++++++ 8 files changed, 413 insertions(+), 311 deletions(-)

 delete mode 100644 arch/um/drivers/mcast.h
 delete mode 100644 arch/um/drivers/mcast_kern.c
 delete mode 100644 arch/um/drivers/mcast_user.c
 create mode 100644 arch/um/drivers/umcast.h
 create mode 100644 arch/um/drivers/umcast_kern.c
 create mode 100644 arch/um/drivers/umcast_user.c

One small nit-pick, please use "git format-patch --find-renames ...". Otherwise tools like git-blame will produce bad results.

Thanks,
//richard

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel