Closed mipearlska closed 2 years ago
When T-Rex generates the traffic to port enp175s0f0 you need to have T-Rex set the destination MAC address to something like 40:a6:b7:19:f2:01 note the last octet now is :01 and cndpfwd will forward the traffic to port 1 or enp175s0f1. If you have T-Rex sending traffic to enp175s0f1 then set its destination last octet MAC address to :00 to forward the traffic to port 0.
This also means you need to set the interfaces into promiscuous mode ‘ifconfig enp175s0f0 promisc’ and ‘ifconfig enp175s0f1 promisc’.
I also noticed in the jsonc file you are using qid 0 for both ports. This means lcore 0 will be used for both ports and you need to change the second one to qid 1 or some other qid. The kernel uses the queue ID value as the lcore to run the NAPI thread in the kernel, which means the two threads will be competing for the same lcore and the performance will be low.
I do not see what the forwarding thread is set to in the jsonc file you are using, but this lcore-groups section needs to use different lcores then 0 or 1 and need to be unique for each thread.
"lcore-groups": {
"initial": [2],
"group0": [3],
"group1": [4],
"default": ["15-16"]
},
"threads": {
"main": {
"group": "initial",
"description": "CLI Thread"
},
"fwd:0": {
"group": "group0",
"lports": ["enp175s0f0:0"],
"description": "Thread 0"
},
"fwd:1": {
"group": "group1",
"lports": ["enp175s0f1:0"],
"description": "Thread 1"
}
}
Note lcore-groups initial, group0 and group1 are different and using different lcores from the QID values. The initial group is the main pthread created with the cndpfwd application is created.
Did my response answer your question and can I close this issue? Thanks
Yes, Thank you for the guidance. I can sucessfullyrun the application
Hello, I am trying the cndpfwd application in fwd mode, I'm generating packet using T-Rex Traffic Generator with the src/dst mac address are:
- dest_mac: 40:a6:b7:19:f2:39 src_mac: 40:a6:b7:19:f2:38
My current fwd.jsonc configuration for the 2 ports of the cndpfwd app is: "lports": { "enp175s0f0:0": { "pmd": "net_af_xdp", "qid": 0, "umem": "umem0", "region": 0, "description": "LAN 0 port" }, "enp175s0f1:0": { "pmd": "net_af_xdp", "qid": 0, "umem": "umem0", "region": 1, "description": "LAN 1 port" } Traffic was generated to port enp175s0f0. The app forwarded the traffic back to this port as it cannot find the corresponding lport as said in the document "In forward mode (‘fwd’), the destination logical port on which to forward the packet is specified by the last octet of the destination MAC address. It should be a valid lport number 0-N. If the destination port does not exist the packet is sent back out the port on which it was received"I would like to know how to configure the second lport number of (enp175s0f1) so that the cndpfwd app can forward the packet to this one according to the last octet 39 of the destination MAC address?
Thanks,