All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] net: Add UDP multicast support
@ 2013-07-19 18:24 Shawn Bohrer
  2013-07-19 18:24 ` [PATCH 2/5] net: Allow setting network interface to use for multicast Shawn Bohrer
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-19 18:24 UTC (permalink / raw)
  To: fio; +Cc: tomk, Shawn Bohrer

Allow UDP readers to listen to UDP multicast traffic if hostname is set
to a valid UDP multicast address.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 HOWTO         |    8 +++++-
 engines/net.c |   58 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 fio.1         |    7 +++--
 3 files changed, 59 insertions(+), 14 deletions(-)

diff --git a/HOWTO b/HOWTO
index 4fd0251..3791e7d 100644
--- a/HOWTO
+++ b/HOWTO
@@ -1438,7 +1438,8 @@ that defines them is selected.
 [netsplice] hostname=str
 [net] hostname=str The host name or IP address to use for TCP or UDP based IO.
 		If the job is a TCP listener or UDP reader, the hostname is not
-		used and must be omitted.
+		used and must be omitted unless it is a valid UDP multicast
+		address.
 
 [netsplice] port=int
 [net] port=int	The TCP or UDP port to bind to or connect to.
@@ -1463,7 +1464,7 @@ that defines them is selected.
 [net] listen	For TCP network connections, tell fio to listen for incoming
 		connections rather than initiating an outgoing connection. The
 		hostname must be omitted if this option is used.
-[net] pingpong	Normal a network writer will just continue writing data, and
+[net] pingpong	Normaly a network writer will just continue writing data, and
 		a network reader will just consume packages. If pingpong=1
 		is set, a writer will send its normal payload to the reader,
 		then wait for the reader to send the same payload back. This
@@ -1471,6 +1472,9 @@ that defines them is selected.
 		and completion latencies then measure local time spent
 		sending or receiving, and the completion latency measures
 		how long it took for the other end to receive and send back.
+		For UDP multicast traffic pingpong=1 should only be set for a
+		single reader when multiple readers are listening to the same
+		address.
 
 [e4defrag] donorname=str
 	        File will be used as a block donor(swap extents between files)
diff --git a/engines/net.c b/engines/net.c
index d5a5f36..dd376cc 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -164,6 +164,20 @@ static int poll_wait(struct thread_data *td, int fd, short events)
 	return -1;
 }
 
+static int fio_netio_is_multicast(const char *mcaddr)
+{
+	in_addr_t addr = inet_network(mcaddr);
+	if (addr == -1)
+		return 0;
+
+	if (inet_network("224.0.0.0") <= addr &&
+	    inet_network("239.255.255.255") >= addr)
+		return 1;
+
+	return 0;
+}
+
+
 static int fio_netio_prep(struct thread_data *td, struct io_u *io_u)
 {
 	struct netio_options *o = td->eo;
@@ -378,11 +392,20 @@ static int fio_netio_recv(struct thread_data *td, struct io_u *io_u)
 
 	do {
 		if (o->proto == FIO_TYPE_UDP) {
-			socklen_t len = sizeof(nd->addr);
-			struct sockaddr *from = (struct sockaddr *) &nd->addr;
+			socklen_t l;
+			socklen_t *len = &l;
+			struct sockaddr *from;
+
+			if (o->listen) {
+				from = (struct sockaddr *) &nd->addr;
+				*len = sizeof(nd->addr);
+			} else {
+				from = NULL;
+				len = NULL;
+			}
 
 			ret = recvfrom(io_u->file->fd, io_u->xfer_buf,
-					io_u->xfer_buflen, flags, from, &len);
+					io_u->xfer_buflen, flags, from, len);
 			if (is_udp_close(io_u, ret)) {
 				td->done = 1;
 				return 0;
@@ -777,8 +800,11 @@ static int fio_netio_setup_listen_inet(struct thread_data *td, short port)
 {
 	struct netio_data *nd = td->io_ops->data;
 	struct netio_options *o = td->eo;
+	struct ip_mreq mr;
+	struct sockaddr_in sin;
 	int fd, opt, type;
 
+	memset(&sin, 0, sizeof(sin));
 	if (o->proto == FIO_TYPE_TCP)
 		type = SOCK_STREAM;
 	else
@@ -802,8 +828,27 @@ static int fio_netio_setup_listen_inet(struct thread_data *td, short port)
 	}
 #endif
 
+	if (td->o.filename){
+		if(o->proto != FIO_TYPE_UDP ||
+		   !fio_netio_is_multicast(td->o.filename)) {
+			log_err("fio: hostname not valid for non-multicast inbound network IO\n");
+			close(fd);
+			return 1;
+		}
+
+		inet_aton(td->o.filename, &sin.sin_addr);
+
+		mr.imr_multiaddr = sin.sin_addr;
+		mr.imr_interface.s_addr = htonl(INADDR_ANY);
+		if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr, sizeof(mr)) < 0) {
+			td_verror(td, errno, "setsockopt IP_ADD_MEMBERSHIP");
+			close(fd);
+			return 1;
+		}
+	}
+
 	nd->addr.sin_family = AF_INET;
-	nd->addr.sin_addr.s_addr = htonl(INADDR_ANY);
+	nd->addr.sin_addr.s_addr = sin.sin_addr.s_addr ? sin.sin_addr.s_addr : htonl(INADDR_ANY);
 	nd->addr.sin_port = htons(port);
 
 	if (bind(fd, (struct sockaddr *) &nd->addr, sizeof(nd->addr)) < 0) {
@@ -880,11 +925,6 @@ static int fio_netio_init(struct thread_data *td)
 		o->listen = td_read(td);
 	}
 
-	if (o->proto != FIO_TYPE_UNIX && o->listen && td->o.filename) {
-		log_err("fio: hostname not valid for inbound network IO\n");
-		return 1;
-	}
-
 	if (o->listen)
 		ret = fio_netio_setup_listen(td);
 	else
diff --git a/fio.1 b/fio.1
index 91fd531..eba748b 100644
--- a/fio.1
+++ b/fio.1
@@ -1216,7 +1216,7 @@ iodepth_batch_complete=0).
 .BI (net,netsplice)hostname \fR=\fPstr
 The host name or IP address to use for TCP or UDP based IO.
 If the job is a TCP listener or UDP reader, the hostname is not
-used and must be omitted.
+used and must be omitted unless it is a valid UDP multicast address.
 .TP
 .BI (net,netsplice)port \fR=\fPint
 The TCP or UDP port to bind to or connect to.
@@ -1251,13 +1251,14 @@ connections rather than initiating an outgoing connection. The
 hostname must be omitted if this option is used.
 .TP
 .BI (net, pingpong) \fR=\fPbool
-Normal a network writer will just continue writing data, and a network reader
+Normaly a network writer will just continue writing data, and a network reader
 will just consume packages. If pingpong=1 is set, a writer will send its normal
 payload to the reader, then wait for the reader to send the same payload back.
 This allows fio to measure network latencies. The submission and completion
 latencies then measure local time spent sending or receiving, and the
 completion latency measures how long it took for the other end to receive and
-send back.
+send back. For UDP multicast traffic pingpong=1 should only be set for a single
+reader when multiple readers are listening to the same address.
 .TP
 .BI (e4defrag,donorname) \fR=\fPstr
 File will be used as a block donor (swap extents between files)
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] net: Allow setting network interface to use for multicast
  2013-07-19 18:24 [PATCH 1/5] net: Add UDP multicast support Shawn Bohrer
@ 2013-07-19 18:24 ` Shawn Bohrer
  2013-07-19 18:24 ` [PATCH 3/5] net: Add option to set outgoing multicast TTL Shawn Bohrer
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-19 18:24 UTC (permalink / raw)
  To: fio; +Cc: tomk, Shawn Bohrer

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 HOWTO         |    4 ++++
 engines/net.c |   37 ++++++++++++++++++++++++++++++++++---
 fio.1         |    4 ++++
 3 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/HOWTO b/HOWTO
index 3791e7d..38eafdd 100644
--- a/HOWTO
+++ b/HOWTO
@@ -1444,6 +1444,10 @@ that defines them is selected.
 [netsplice] port=int
 [net] port=int	The TCP or UDP port to bind to or connect to.
 
+[netsplice] interface=str
+[net] interface=str  The IP address of the network interface used to send or
+		receive UDP multicast
+
 [netsplice] nodelay=bool
 [net] nodelay=bool	Set TCP_NODELAY on TCP connections.
 
diff --git a/engines/net.c b/engines/net.c
index dd376cc..645285d 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -37,6 +37,7 @@ struct netio_options {
 	unsigned int listen;
 	unsigned int pingpong;
 	unsigned int nodelay;
+	char * interface;
 };
 
 struct udp_close_msg {
@@ -129,6 +130,15 @@ static struct fio_option options[] = {
 		.group	= FIO_OPT_G_NETIO,
 	},
 	{
+		.name	= "interface",
+		.lname	= "net engine interface",
+		.type	= FIO_OPT_STR_STORE,
+		.off1	= offsetof(struct netio_options, interface),
+		.help	= "Network interface to use",
+		.category = FIO_OPT_C_ENGINE,
+		.group	= FIO_OPT_G_NETIO,
+	},
+	{
 		.name	= NULL,
 	},
 };
@@ -531,9 +541,22 @@ static int fio_netio_connect(struct thread_data *td, struct fio_file *f)
 	}
 #endif
 
-	if (o->proto == FIO_TYPE_UDP)
+	if (o->proto == FIO_TYPE_UDP) {
+		if (o->interface && fio_netio_is_multicast(td->o.filename)) {
+			struct in_addr interface_addr;
+			if (inet_aton(o->interface, &interface_addr) == 0) {
+				log_err("fio: interface not valid interface IP\n");
+				close(f->fd);
+				return 1;
+			}
+			if (setsockopt(f->fd, IPPROTO_IP, IP_MULTICAST_IF, &interface_addr, sizeof(interface_addr)) < 0) {
+				td_verror(td, errno, "setsockopt IP_MULTICAST_IF");
+				close(f->fd);
+				return 1;
+			}
+		}
 		return 0;
-	else if (o->proto == FIO_TYPE_TCP) {
+	} else if (o->proto == FIO_TYPE_TCP) {
 		socklen_t len = sizeof(nd->addr);
 
 		if (connect(f->fd, (struct sockaddr *) &nd->addr, len) < 0) {
@@ -839,7 +862,15 @@ static int fio_netio_setup_listen_inet(struct thread_data *td, short port)
 		inet_aton(td->o.filename, &sin.sin_addr);
 
 		mr.imr_multiaddr = sin.sin_addr;
-		mr.imr_interface.s_addr = htonl(INADDR_ANY);
+		if (o->interface) {
+			if (inet_aton(o->interface, &mr.imr_interface) == 0) {
+				log_err("fio: interface not valid interface IP\n");
+				close(fd);
+				return 1;
+			}
+		} else {
+			mr.imr_interface.s_addr = htonl(INADDR_ANY);
+		}
 		if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr, sizeof(mr)) < 0) {
 			td_verror(td, errno, "setsockopt IP_ADD_MEMBERSHIP");
 			close(fd);
diff --git a/fio.1 b/fio.1
index eba748b..ca8a5ca 100644
--- a/fio.1
+++ b/fio.1
@@ -1221,6 +1221,10 @@ used and must be omitted unless it is a valid UDP multicast address.
 .BI (net,netsplice)port \fR=\fPint
 The TCP or UDP port to bind to or connect to.
 .TP
+.BI (net,netsplice)interface \fR=\fPstr
+The IP address of the network interface used to send or receive UDP multicast
+packets.
+.TP
 .BI (net,netsplice)nodelay \fR=\fPbool
 Set TCP_NODELAY on TCP connections.
 .TP
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] net: Add option to set outgoing multicast TTL
  2013-07-19 18:24 [PATCH 1/5] net: Add UDP multicast support Shawn Bohrer
  2013-07-19 18:24 ` [PATCH 2/5] net: Allow setting network interface to use for multicast Shawn Bohrer
@ 2013-07-19 18:24 ` Shawn Bohrer
  2013-07-19 18:24 ` [PATCH 4/5] net: fix recvfrom error message Shawn Bohrer
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-19 18:24 UTC (permalink / raw)
  To: fio; +Cc: tomk, Shawn Bohrer

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 HOWTO         |    4 ++++
 engines/net.c |   22 +++++++++++++++++++++-
 fio.1         |    3 +++
 3 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/HOWTO b/HOWTO
index 38eafdd..a2de470 100644
--- a/HOWTO
+++ b/HOWTO
@@ -1448,6 +1448,10 @@ that defines them is selected.
 [net] interface=str  The IP address of the network interface used to send or
 		receive UDP multicast
 
+[netsplice] ttl=int
+[net] ttl=int	Time-to-live value for outgoing UDP multicast packets.
+		Default: 1
+
 [netsplice] nodelay=bool
 [net] nodelay=bool	Set TCP_NODELAY on TCP connections.
 
diff --git a/engines/net.c b/engines/net.c
index 645285d..257ab8f 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -37,6 +37,7 @@ struct netio_options {
 	unsigned int listen;
 	unsigned int pingpong;
 	unsigned int nodelay;
+	unsigned int ttl;
 	char * interface;
 };
 
@@ -139,6 +140,17 @@ static struct fio_option options[] = {
 		.group	= FIO_OPT_G_NETIO,
 	},
 	{
+		.name	= "ttl",
+		.lname	= "net engine multicast ttl",
+		.type	= FIO_OPT_INT,
+		.off1	= offsetof(struct netio_options, ttl),
+		.def    = "1",
+		.minval	= 0,
+		.help	= "Time-to-live value for outgoing UDP multicast packets",
+		.category = FIO_OPT_C_ENGINE,
+		.group	= FIO_OPT_G_NETIO,
+	},
+	{
 		.name	= NULL,
 	},
 };
@@ -542,7 +554,10 @@ static int fio_netio_connect(struct thread_data *td, struct fio_file *f)
 #endif
 
 	if (o->proto == FIO_TYPE_UDP) {
-		if (o->interface && fio_netio_is_multicast(td->o.filename)) {
+		if (!fio_netio_is_multicast(td->o.filename))
+			return 0;
+
+		if (o->interface) {
 			struct in_addr interface_addr;
 			if (inet_aton(o->interface, &interface_addr) == 0) {
 				log_err("fio: interface not valid interface IP\n");
@@ -555,6 +570,11 @@ static int fio_netio_connect(struct thread_data *td, struct fio_file *f)
 				return 1;
 			}
 		}
+		if (setsockopt(f->fd, IPPROTO_IP, IP_MULTICAST_TTL, &o->ttl, sizeof(o->ttl)) < 0) {
+			td_verror(td, errno, "setsockopt IP_MULTICAST_TTL");
+			close(f->fd);
+			return 1;
+		}
 		return 0;
 	} else if (o->proto == FIO_TYPE_TCP) {
 		socklen_t len = sizeof(nd->addr);
diff --git a/fio.1 b/fio.1
index ca8a5ca..62f7bb6 100644
--- a/fio.1
+++ b/fio.1
@@ -1225,6 +1225,9 @@ The TCP or UDP port to bind to or connect to.
 The IP address of the network interface used to send or receive UDP multicast
 packets.
 .TP
+.BI (net,netsplice)ttl \fR=\fPint
+Time-to-live value for outgoing UDP multicast packets. Default: 1
+.TP
 .BI (net,netsplice)nodelay \fR=\fPbool
 Set TCP_NODELAY on TCP connections.
 .TP
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] net: fix recvfrom error message
  2013-07-19 18:24 [PATCH 1/5] net: Add UDP multicast support Shawn Bohrer
  2013-07-19 18:24 ` [PATCH 2/5] net: Allow setting network interface to use for multicast Shawn Bohrer
  2013-07-19 18:24 ` [PATCH 3/5] net: Add option to set outgoing multicast TTL Shawn Bohrer
@ 2013-07-19 18:24 ` Shawn Bohrer
  2013-07-21  2:41   ` Jens Axboe
  2013-07-19 18:24 ` [PATCH 5/5] net: close socket on error Shawn Bohrer
  2013-07-20  3:07 ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe
  4 siblings, 1 reply; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-19 18:24 UTC (permalink / raw)
  To: fio; +Cc: tomk, Shawn Bohrer

The error is from recvfrom not sendto.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 engines/net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/engines/net.c b/engines/net.c
index 257ab8f..5bd98df 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -685,7 +685,7 @@ static int fio_netio_udp_recv_open(struct thread_data *td, struct fio_file *f)
 
 	ret = recvfrom(f->fd, (void *) &msg, sizeof(msg), MSG_WAITALL, to, &len);
 	if (ret < 0) {
-		td_verror(td, errno, "sendto udp link open");
+		td_verror(td, errno, "recvfrom udp link open");
 		return ret;
 	}
 
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] net: close socket on error
  2013-07-19 18:24 [PATCH 1/5] net: Add UDP multicast support Shawn Bohrer
                   ` (2 preceding siblings ...)
  2013-07-19 18:24 ` [PATCH 4/5] net: fix recvfrom error message Shawn Bohrer
@ 2013-07-19 18:24 ` Shawn Bohrer
  2013-07-20  3:07 ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe
  4 siblings, 0 replies; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-19 18:24 UTC (permalink / raw)
  To: fio; +Cc: tomk, Shawn Bohrer

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 engines/net.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/engines/net.c b/engines/net.c
index 5bd98df..0c90e1c 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -862,11 +862,13 @@ static int fio_netio_setup_listen_inet(struct thread_data *td, short port)
 	opt = 1;
 	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *) &opt, sizeof(opt)) < 0) {
 		td_verror(td, errno, "setsockopt");
+		close(fd);
 		return 1;
 	}
 #ifdef SO_REUSEPORT
 	if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (void *) &opt, sizeof(opt)) < 0) {
 		td_verror(td, errno, "setsockopt");
+		close(fd);
 		return 1;
 	}
 #endif
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] net: Add UDP multicast support
  2013-07-19 18:24 [PATCH 1/5] net: Add UDP multicast support Shawn Bohrer
                   ` (3 preceding siblings ...)
  2013-07-19 18:24 ` [PATCH 5/5] net: close socket on error Shawn Bohrer
@ 2013-07-20  3:07 ` Jens Axboe
  2013-07-22 14:54   ` Shawn Bohrer
  4 siblings, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2013-07-20  3:07 UTC (permalink / raw)
  To: Shawn Bohrer; +Cc: fio, tomk

On Fri, Jul 19 2013, Shawn Bohrer wrote:
> Allow UDP readers to listen to UDP multicast traffic if hostname is set
> to a valid UDP multicast address.

Looks good! Can I get you to include a sample job file as well, plus
update the fio.1 man page in parallel with the HOWTO too?

I'm talking about the whole series, there was no 0/5 header patch
include so replying to this one.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/5] net: fix recvfrom error message
  2013-07-19 18:24 ` [PATCH 4/5] net: fix recvfrom error message Shawn Bohrer
@ 2013-07-21  2:41   ` Jens Axboe
  0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2013-07-21  2:41 UTC (permalink / raw)
  To: Shawn Bohrer; +Cc: fio, tomk

On Fri, Jul 19 2013, Shawn Bohrer wrote:
> The error is from recvfrom not sendto.

Applied 4/5 from your series.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] net: Add UDP multicast support
  2013-07-20  3:07 ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe
@ 2013-07-22 14:54   ` Shawn Bohrer
  2013-07-22 14:57     ` [PATCH] net: Add UDP multicast example job file Shawn Bohrer
  2013-07-22 15:03     ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe
  0 siblings, 2 replies; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-22 14:54 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio, tomk

On Fri, Jul 19, 2013 at 09:07:26PM -0600, Jens Axboe wrote:
> On Fri, Jul 19 2013, Shawn Bohrer wrote:
> > Allow UDP readers to listen to UDP multicast traffic if hostname is set
> > to a valid UDP multicast address.
> 
> Looks good! Can I get you to include a sample job file as well, plus
> update the fio.1 man page in parallel with the HOWTO too?

Hi Jens,

Take a closer look, patches 1,2,3 already update fio.1 and HOWTO.  I'll
send a follow up patch with an example job file.

--
Shawn

-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] net: Add UDP multicast example job file
  2013-07-22 14:54   ` Shawn Bohrer
@ 2013-07-22 14:57     ` Shawn Bohrer
  2013-07-22 15:03     ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe
  1 sibling, 0 replies; 10+ messages in thread
From: Shawn Bohrer @ 2013-07-22 14:57 UTC (permalink / raw)
  To: axboe; +Cc: fio, tomk, Shawn Bohrer

This adds a pingpong UDP multicast example with two readers.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
 examples/netio_multicast.fio |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 examples/netio_multicast.fio

diff --git a/examples/netio_multicast.fio b/examples/netio_multicast.fio
new file mode 100644
index 0000000..f7d9d26
--- /dev/null
+++ b/examples/netio_multicast.fio
@@ -0,0 +1,23 @@
+# netio UDP multicast example. Writers and readers can be run on separate hosts.
+[global]
+ioengine=net
+protocol=udp
+bs=64
+size=100m
+# Set interface IP to send/receive traffic through specific network interface
+#interface=10.8.16.22
+port=10000
+hostname=239.0.0.0
+ttl=1
+
+[pingpong_reader]
+pingpong=1
+rw=read
+
+[normal_reader]
+rw=read
+
+[pingpong_writer]
+startdelay=1
+pingpong=1
+rw=write
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] net: Add UDP multicast support
  2013-07-22 14:54   ` Shawn Bohrer
  2013-07-22 14:57     ` [PATCH] net: Add UDP multicast example job file Shawn Bohrer
@ 2013-07-22 15:03     ` Jens Axboe
  1 sibling, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2013-07-22 15:03 UTC (permalink / raw)
  To: Shawn Bohrer; +Cc: fio, tomk

On Mon, Jul 22 2013, Shawn Bohrer wrote:
> On Fri, Jul 19, 2013 at 09:07:26PM -0600, Jens Axboe wrote:
> > On Fri, Jul 19 2013, Shawn Bohrer wrote:
> > > Allow UDP readers to listen to UDP multicast traffic if hostname is set
> > > to a valid UDP multicast address.
> > 
> > Looks good! Can I get you to include a sample job file as well, plus
> > update the fio.1 man page in parallel with the HOWTO too?
> 
> Hi Jens,
> 
> Take a closer look, patches 1,2,3 already update fio.1 and HOWTO.  I'll
> send a follow up patch with an example job file.

Indeed, looks like I need my vision checked instead. Thanks, I'll apply
1-3 and the job file patch you sent as well.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-22 15:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19 18:24 [PATCH 1/5] net: Add UDP multicast support Shawn Bohrer
2013-07-19 18:24 ` [PATCH 2/5] net: Allow setting network interface to use for multicast Shawn Bohrer
2013-07-19 18:24 ` [PATCH 3/5] net: Add option to set outgoing multicast TTL Shawn Bohrer
2013-07-19 18:24 ` [PATCH 4/5] net: fix recvfrom error message Shawn Bohrer
2013-07-21  2:41   ` Jens Axboe
2013-07-19 18:24 ` [PATCH 5/5] net: close socket on error Shawn Bohrer
2013-07-20  3:07 ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe
2013-07-22 14:54   ` Shawn Bohrer
2013-07-22 14:57     ` [PATCH] net: Add UDP multicast example job file Shawn Bohrer
2013-07-22 15:03     ` [PATCH 1/5] net: Add UDP multicast support Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.