summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/memif.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-07-05 18:13:10 +0200
committerNeale Ranns <nranns@cisco.com>2017-07-12 21:00:42 +0000
commit18ee167809d68e16e45098eafb5f7acb48c5e66a (patch)
tree9e42f22814a8b004a1bf10ecce4212c748f2dd13 /src/plugins/memif/memif.c
parent50e28107bff234b4eb5e637abc22d0ece80ba23d (diff)
memif: mask interrupts on startup if we are in the polling mode
Change-Id: Ief02eb1109a1bc463665d9747e9fa4e0c0e3d7e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/memif/memif.c')
-rw-r--r--src/plugins/memif/memif.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index fffb94c952b..ba1231495c8 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -227,6 +227,14 @@ memif_connect (memif_if_t * mif)
clib_warning
("Warning: unable to set rx mode for interface %d queue %d: "
"rc=%d", mif->hw_if_index, i, rv);
+ else
+ {
+ vnet_hw_interface_rx_mode rxmode;
+ vnet_hw_interface_get_rx_mode (vnm, mif->hw_if_index, i, &rxmode);
+
+ if (rxmode == VNET_HW_INTERFACE_RX_MODE_POLLING)
+ mq->ring->flags |= MEMIF_RING_FLAG_MASK_INT;
+ }
}
mif->flags &= ~MEMIF_IF_FLAG_CONNECTING;