fi
export VALGRIND_LIB=/auto/proj-pcube-b/apps/PL-b/tools/valgrind-dpdk/lib/valgrind
+export VALGRIND_BIN="/auto/proj-pcube-b/apps/PL-b/tools/valgrind-dpdk/bin/valgrind --leak-check=full"
if [ -t 0 ] && [ -t 1 ]; then
export is_tty=true
# if we have a new core run optimized trex
if grep -q avx /proc/cpuinfo ; then
- /auto/proj-pcube-b/apps/PL-b/tools/valgrind-dpdk/bin/valgrind ./_t-rex-64 $INPUT_ARGS
+ $VALGRIND_BIN ./_t-rex-64 $INPUT_ARGS
RESULT=$?
if [ $RESULT -eq 132 ]; then
echo " WARNING this program is optimized for the new Intel processors. "
echo " try the ./t-rex-64-o application that should work for any Intel processor but might be slower. "
echo " try to run t-rex-64-o .. "
- /auto/proj-pcube-b/apps/PL-b/tools/valgrind-dpdk/bin/valgrind ./_t-rex-64-o $INPUT_ARGS
+
+ $VALGRIND_BIN ./_t-rex-64 $INPUT_ARGS
RESULT=$?
fi
else
- /auto/proj-pcube-b/apps/PL-b/tools/valgrind-dpdk/bin/valgrind ./_t-rex-64-o $INPUT_ARGS
+ $VALGRIND_BIN ./_t-rex-64 $INPUT_ARGS
RESULT=$?
fi
if (m_num_started_streams == 0) {
send_start_stop_msg_to_rx(true); // First transmitting stream. Rx core should start reading packets;
- assert(m_rx_core->is_working());
//also good time to zero global counters
memset(m_rx_cant_count_err, 0, sizeof(m_rx_cant_count_err));
m_ring_to_rx->Enqueue((CGenNode *)msg);
/* hold until message was ack'ed - otherwise we might lose packets */
- reply.wait_for_reply();
+ if (m_rx_core) {
+ reply.wait_for_reply();
+ assert(m_rx_core->is_working());
+ }
} else {
msg = new TrexStatelessRxDisableLatency();
class CTRexExtendedDriverBase {
public:
-
+
/* by default NIC driver adds CRC */
virtual bool has_crc_added() {
return true;
int DpdkTRexPortAttr::set_rx_filter_mode(rx_filter_mode_e rx_filter_mode) {
+ if (rx_filter_mode == m_rx_filter_mode) {
+ return (0);
+ }
+
CPhyEthIF *_if = &g_trex.m_ports[m_port_id];
bool recv_all = (rx_filter_mode == RX_FILTER_MODE_ALL);
int rc = CTRexExtendedDriverDb::Ins()->get_drv()->set_rcv_all(_if, recv_all);
const RXPacketBuffer *pkt_buffer = port->get_rx_queue_pkts();
if (pkt_buffer) {
result["result"]["pkts"] = pkt_buffer->to_json();
+ delete pkt_buffer;
+
} else {
result["result"]["pkts"] = Json::arrayValue;
}