summaryrefslogtreecommitdiffstats
path: root/src/main_dpdk.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-12-01 15:24:58 +0200
committerimarom <imarom@cisco.com>2016-12-01 15:30:29 +0200
commit452e9d470b09513fff00b4a0c3600c33c3e4f76a (patch)
tree90d100a4d84de5b1009a277fa29857d2c697acc4 /src/main_dpdk.cpp
parentc420d1fd8c17118f2ccaee4b05b81ec3dd515fa6 (diff)
bug found by valgrind
also an issue with 40G deleting no exisiting rules with recv_all Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r--src/main_dpdk.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index c02d6760..2fa5af85 100644
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -132,7 +132,7 @@ static char global_master_id_str[10];
class CTRexExtendedDriverBase {
public:
-
+
/* by default NIC driver adds CRC */
virtual bool has_crc_added() {
return true;
@@ -7341,6 +7341,10 @@ TRexPortAttr *TrexDpdkPlatformApi::getPortAttrObj(uint8_t port_id) const {
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);