cisco-system-traffic-generator / trex-core

trex-core site
https://trex-tgn.cisco.com/
Other
1.29k stars 461 forks source link

ASTF traffic profile does not work while service mode is on. #828

Open jsmoon opened 2 years ago

jsmoon commented 2 years ago

Hi, I think the following code block could cause ASTF traffic flow failure. https://github.com/cisco-system-traffic-generator/trex-core/blob/42c368a6af101a587e7c224f96fa281c5057eee7/src/44bsd/flow_table.cpp#L270-L273

When I test the ASTF traffic profile during service mode, I could not get the expected result. @hhaim what do you think about this issue?

hhaim commented 2 years ago

@jsmoon this is confusing, in ASTF there is no need to move to service mode for normal capturing you can just capture to memory ring.

see this a few lines after.

    TrexCaptureMngr::getInstance().handle_pkt_rx_dp(mbuf, port_id);

The service mode is just to copy all the packets to EMU/service mode (and by that losing causing the ASTF traffic to fail)

However, now I see that the new fast feature of ZMQ capture is limited to Rx core which will not work in ASTF RXCapturePort::handle_pkt(const rte_mbuf_t *m)

maybe we could merge the features and Rx can sample the buffer and send it throw the zmq (in both ASTF/STL software mode)

jsmoon commented 2 years ago

@hhaim, in this thread, I'd like to discuss about the service mode effect only. Since service mode can be used anytime, I think that the unexpected traffic result due to service mode needs to be avoided.

hhaim commented 2 years ago

@jsmoon understood. The reason for service-mode in ASTF is for debug purposes of EMU filter. For example, let's say you have a new EMU plugin and you can't see the packets, this means that the current filter does not work so you can change to service-mode ON to move all the packets to EMU and debug this.

other than debug mode I don't see a reason to change it

hhaim commented 2 years ago

@jsmoon maybe we can disable service-mode ON and add another debug feature to move all the packets to Rx core ..