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

Add support to run trafgen in Kubernetes pods with pinned CPU #235

Open
amitpd opened this issue Jun 23, 2022 · 0 comments
Open

Add support to run trafgen in Kubernetes pods with pinned CPU #235

amitpd opened this issue Jun 23, 2022 · 0 comments

Comments

@amitpd
Copy link

amitpd commented Jun 23, 2022

I am trying to run trafgen from a Kubernetes pod with pinned CPU. The VM has 16 vCPUs and the pod is allocated only vCPUs 6-7,14-15

The trafgen.cfg file is configured to send packets to CPU 6 only.

cpu(6):
{
...
}

When I run below trafgen command, it fails with error message Can't set this cpu affinity!

trafgen --dev eth0 --conf trafgen.cfg --no-sock-mem -n 16

Output:

Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!
Can't set this cpu affinity!

The message is printed exactly 12 times (16 - 4) for the CPUs not available to the pod.

Expected Result:

  1. The trafgen should try to send packet only using CPU id defined in the trafgen.cfg
  2. If CPU is not set in trafgen.cfg, trafgen should only use CPU allocated to the pod
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

No branches or pull requests

1 participant