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

p4rt performance test application #267

Merged
merged 14 commits into from
Sep 21, 2023
Merged

p4rt performance test application #267

merged 14 commits into from
Sep 21, 2023

Conversation

satish153
Copy link
Collaborator

@satish153 satish153 commented Sep 1, 2023

p4rt_perf_test is a test application designed to assess the performance of a P4Runtime server across various P4 profiles. The application's primary focus is on measuring the time required to program a specified number of entries.

$IPDK_RECIPE/install/bin/p4rt_perf_test -t 1 -o 1 -n 4000000 -p 1
Total num of entries: 4000000
Number of threads: 1
Operation: 1
Test Profile: 1
Thread data - Core: 20 start_index: 0 num_entries: 4000000
count: 4000000
Num of entries added: 4000000
Time taken: 37.4511 seconds
number of entires per second: 106806

Note:
p4rt_perf.cc/h and p4rt_perf_simple_l2_demo.cc/h are new coded. The code in the rest of the files is repurposed from ovs-p4rt module.
Programming with multiple threads doesn't really work as Stratum currently supports 'write' by only the master.

@n-sandeep
Copy link
Contributor

n-sandeep commented Sep 1, 2023

Hi @satish153 , any sample command on how to test this performance will be helpful
There are these options "t : o : n : p :", looks like all testing scale is based on these options.

@satish153
Copy link
Collaborator Author

Hi @satish153 , any sample command on how to test this performance will be helpful There are these options "t : o : n : p :", looks like all testing scale is based on these options.

Updated the description.

Copy link
Contributor

@ffoulkes ffoulkes left a comment

Choose a reason for hiding this comment

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

I'm going to go ahead and submit this initial review now. I still need to review the code itself.

@ffoulkes
Copy link
Contributor

Nuts. I meant to leave a clarifying comment when I closed my review.

The issues I'm chiefly concerned about (the "blockers") are the latent bugs:

  • Missing input validation, especially where out-of-bounds values could lead to array overrun.
  • Missing error returns, especially where continuing execution can lead to catastrophic failure.

Plus the compiler warnings.

Copy link
Contributor

@ffoulkes ffoulkes left a comment

Choose a reason for hiding this comment

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

LGTM

The user guide needs some work, but that can be taken care of in a later commit.

@ffoulkes
Copy link
Contributor

ffoulkes commented Sep 20, 2023

BTW, you need to do git commit -s to sign your commits.

The failed DCO check is because one or more of them are unsigned.

No need to try to fix this PR; I'll bypass the requirement at merge time. Please remember to sign your commits in the future.

@ffoulkes
Copy link
Contributor

Change of plans (and Now for Something Completely Different): I've submitted a PR against your PR to bring the user guide in line with current documentation conventions.

Copy link
Contributor

@n-sandeep n-sandeep left a comment

Choose a reason for hiding this comment

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

LGTM

@satish153 satish153 merged commit 3860bdd into main Sep 21, 2023
@satish153 satish153 deleted the perf_test branch September 21, 2023 06:11
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