Skip to content

Use a version of simple switch that uses nanomsg instead of virtual interfaces for PTF tests.#3951

Merged
fruffy merged 4 commits intomainfrom
fruffy/nanomsg_ptf
Jun 19, 2023
Merged

Use a version of simple switch that uses nanomsg instead of virtual interfaces for PTF tests.#3951
fruffy merged 4 commits intomainfrom
fruffy/nanomsg_ptf

Conversation

@fruffy
Copy link
Copy Markdown
Collaborator

@fruffy fruffy commented Mar 30, 2023

This PR adds support for nanomsg to the run-bmv2-ptf-test.py script. It does not yet add support to create a large number of ports. The behavior of the script is the same as the veth interfaces for now.

@fruffy fruffy force-pushed the fruffy/nanomsg_ptf branch 2 times, most recently from dad6f54 to 2099f15 Compare March 31, 2023 12:44
@fruffy fruffy changed the title Use to a version of simple switch that uses nanomsg instead of virtual interfaces for PTF tests. Use a version of simple switch that uses nanomsg instead of virtual interfaces for PTF tests. Mar 31, 2023
@fruffy fruffy force-pushed the fruffy/nanomsg_ptf branch from 2099f15 to 950855c Compare June 10, 2023 18:24
@jafingerhut
Copy link
Copy Markdown
Contributor

What is the motivation for such a change? Is it that since veth interfaces are no longer required for packets into and out of simple_switch, that PTF tests can be run without root privileges?

@fruffy
Copy link
Copy Markdown
Collaborator Author

fruffy commented Jun 10, 2023

What is the motivation for such a change? Is it that since veth interfaces are no longer required for packets into and out of simple_switch, that PTF tests can be run without root privileges?

There are three advantages to this approach.

  1. No root privileges required since we just create files.
  2. Full support of the 511 BMv2 ports. PTF is tied to veth interfaces and creating 511 interfaces per test is overwhelming.
  3. No minimum packet size. The Linux veth interfaces have strange behavior (either dropping the packet or producing garbage) if the packet is too short (do not quite remember the size, 40 bits?). This is not the case with nanomsg.

The downside is that we are not "emulating" real network conditions anymore. However, for testing the tool chain I would say nanomsg is sufficient. And we can make this a toggle option for the script (either run veth or nanomsg).

@fruffy fruffy force-pushed the fruffy/nanomsg_ptf branch 6 times, most recently from fd31b1f to 6d1b610 Compare June 14, 2023 14:25
@fruffy fruffy force-pushed the fruffy/nanomsg_ptf branch 2 times, most recently from 62651ed to fc278c4 Compare June 16, 2023 19:36
@fruffy fruffy force-pushed the fruffy/nanomsg_ptf branch from fc278c4 to 137f7d1 Compare June 16, 2023 19:54
@fruffy fruffy marked this pull request as ready for review June 17, 2023 17:59
@fruffy fruffy requested review from jnfoster and pkotikal as code owners June 17, 2023 17:59
Copy link
Copy Markdown

@jnfoster jnfoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants