Flent-users discussion archives
 help / color / mirror / Atom feed
* Re: [Flent-users] [tohojo/flent] --netperf-data-port option/functionality? (#212)
       [not found] <tohojo/flent/issues/212@github.com>
@ 2020-11-10 12:07 ` Toke Høiland-Jørgensen
  0 siblings, 0 replies; only message in thread
From: Toke Høiland-Jørgensen @ 2020-11-10 12:07 UTC (permalink / raw)
  To: tohojo/flent; +Cc: Subscribed


[-- Attachment #1.1: Type: text/plain, Size: 2625 bytes --]

John Sommerville <notifications@github.com> writes:

> Similar to the --netperf-control-port parameter, it would be nice if we could specify --netperf-data-port during runtime also. This would change the data-port that the netperf tests are being passed through to, IE:
>
> ```
> root@99be1c32d2fa:/home# netperf -H 10.11.12.195 -p 12865 -t TCP_STREAM
> MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to 10.11.12.195 () port 0 AF_INET : demo
> netperf: send_omni: connect_data_socket failed: Connection refused
>
>
> root@99be1c32d2fa:/home# netperf -H 10.11.12.195 -p 12865 -t TCP_STREAM -- -P 12866
> MIGRATED TCP STREAM TEST from 0.0.0.0 () port 12866 AF_INET to 10.11.12.195 () port 12866 AF_INET : demo
> Recv   Send    Send
> Socket Socket  Message  Elapsed
> Size   Size    Size     Time     Throughput
> bytes  bytes   bytes    secs.    10^6bits/sec
>
> 131072  16384  16384    10.05     281.20
> ```
>
>  Only some netperf tests support this, but I don't think the tests
>  that don't support it fail when -P <someotherport> is passed in on
>  them.  I'll see if I can put something together, but could be useful
>  for those who are testing netperf between firewalls and don't want to
>  open 30000-40000 (or whatever netserver chooses for the data port
>  during specific tests)

You're right that netperf does have an option to pick a particular port,
but the problem is that this option can only be supplied to the
*client*. There is no way to tell netserver to stay within a particular
range. And so if we were to support this in Flent, it would require that
(a) Flent keeps track of how many ports it needs for each test, and (b)
if used, it will prevent multiple Flent tests to run against the same
server at the same time.

Also, the failure mode is really ugly (netperf can request a port, but
if that is not available, it will just silently use a different one).

So it's kind of a deliberate omission that this is not supported in
Flent, unfortunately :(

A workaround is to use iptables to conditionally open the data port
range when you see a control port connection. I use something like:

  -A INPUT -p tcp --dport 12865 -m conntrack --ctstate NEW -j SET --add-set netperf src
  -A INPUT -p tcp --dport 12865 -m conntrack --ctstate NEW -j ACCEPT
  -A INPUT -m set --match-set netperf src -p udp --dport 32768:61000 -j ACCEPT
  -A INPUT -m set --match-set netperf src -p tcp --dport 32768:61000 -j ACCEPT


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/issues/212#issuecomment-724660352

[-- Attachment #1.2: Type: text/html, Size: 3819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-10 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tohojo/flent/issues/212@github.com>
2020-11-10 12:07 ` [Flent-users] [tohojo/flent] --netperf-data-port option/functionality? (#212) Toke Høiland-Jørgensen

Flent-users discussion archives

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.flent.org/flent-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 flent-users flent-users/ https://lists.flent.org/flent-users \
		flent-users@flent.org
	public-inbox-index flent-users

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git