Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Jun 19, 2023

Conversation

fruffy
Copy link
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
@jafingerhut
Copy link
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
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 marked this pull request as ready for review June 17, 2023 17:59
Copy link
Contributor

@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