summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/cp')
-rw-r--r--src/stateless/cp/trex_stateless_port.cpp14
-rw-r--r--src/stateless/cp/trex_stateless_port.h13
2 files changed, 12 insertions, 15 deletions
diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp
index ff83087c..d4bc5c36 100644
--- a/src/stateless/cp/trex_stateless_port.cpp
+++ b/src/stateless/cp/trex_stateless_port.cpp
@@ -888,16 +888,6 @@ TrexStatelessPort::get_port_effective_rate(double &pps,
}
void
-TrexStatelessPort::get_macaddr(std::string &hw_macaddr,
- std::string &src_macaddr,
- std::string &dst_macaddr) {
-
- utl_macaddr_to_str(m_api_info.mac_info.hw_macaddr, hw_macaddr);
- utl_macaddr_to_str(m_api_info.mac_info.src_macaddr, src_macaddr);
- utl_macaddr_to_str(m_api_info.mac_info.dst_macaddr, dst_macaddr);
-}
-
-void
TrexStatelessPort::get_pci_info(std::string &pci_addr, int &numa_node) {
pci_addr = m_api_info.pci_addr;
numa_node = m_api_info.numa_node;
@@ -980,6 +970,10 @@ TrexStatelessPort::stop_rx_queue() {
RxPacketBuffer *
TrexStatelessPort::get_rx_queue_pkts() {
+ if (m_rx_features_info.m_rx_queue_info.is_empty()) {
+ return NULL;
+ }
+
/* ask RX core for the pkt queue */
TrexStatelessMsgReply<RxPacketBuffer *> msg_reply;
diff --git a/src/stateless/cp/trex_stateless_port.h b/src/stateless/cp/trex_stateless_port.h
index d71ba932..cf6b2716 100644
--- a/src/stateless/cp/trex_stateless_port.h
+++ b/src/stateless/cp/trex_stateless_port.h
@@ -362,11 +362,6 @@ public:
double &bps_L2,
double &percentage);
-
- void get_macaddr(std::string &hw_macaddr,
- std::string &src_macaddr,
- std::string &dst_macaddr);
-
void get_pci_info(std::string &pci_addr, int &numa_node);
@@ -413,6 +408,14 @@ public:
*/
RxPacketBuffer *get_rx_queue_pkts();
+ /**
+ * return the port attribute object
+ *
+ */
+ TRexPortAttr *getPortAttrObj() {
+ return m_platform_api->getPortAttrObj(m_port_id);
+ }
+
private:
bool is_core_active(int core_id);