Flent-users discussion archives
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <notifications@github.com>
To: tohojo/flent <flent@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [Flent-users] [tohojo/flent] --netperf-data-port option/functionality? (#212)
Date: Tue, 10 Nov 2020 04:07:04 -0800	[thread overview]
Message-ID: <tohojo/flent/issues/212/724660352@github.com> (raw)
In-Reply-To: <tohojo/flent/issues/212@github.com>

[-- 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 -p 12865 -t TCP_STREAM
> MIGRATED TCP STREAM TEST from () port 0 AF_INET to () port 0 AF_INET : demo
> netperf: send_omni: connect_data_socket failed: Connection refused
> root@99be1c32d2fa:/home# netperf -H -p 12865 -t TCP_STREAM -- -P 12866
> MIGRATED TCP STREAM TEST from () port 12866 AF_INET to () 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:

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

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

Flent-users mailing list

           reply	other threads:[~2020-11-10 12:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <tohojo/flent/issues/212@github.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://lists.flent.org/postorius/lists/flent-users.flent.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tohojo/flent/issues/212/724660352@github.com \
    --to=notifications@github.com \
    --cc=flent@noreply.github.com \
    --cc=reply+AHVNJP4OPWHS6INQ6N6I3RV5WZRWREVBNHHCYE4MQM@reply.github.com \
    --cc=subscribed@noreply.github.com \
    --subject='Re: [Flent-users] [tohojo/flent] --netperf-data-port option/functionality? (#212)' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox