From: Damjan Marion Date: Wed, 5 Jul 2017 16:13:10 +0000 (+0200) Subject: memif: mask interrupts on startup if we are in the polling mode X-Git-Tag: v17.10-rc1~361 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F7427%2F3;p=vpp.git memif: mask interrupts on startup if we are in the polling mode Change-Id: Ief02eb1109a1bc463665d9747e9fa4e0c0e3d7e0 Signed-off-by: Damjan Marion --- 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;