]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commit
poller: fix event channels when backends do not support multi-queue
authorChris Patterson <cjp256@gmail.com>
Wed, 21 Feb 2018 09:54:57 +0000 (09:54 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Wed, 21 Feb 2018 09:54:57 +0000 (09:54 +0000)
commit16002b8f2412b4ed42c77157677b1c59df69246c
tree3ecc8b595b2d9f059a5c65cb21a8300b446796c7
parent58a8c505edcc13a92fa0444310c632334dbfb0b9
poller: fix event channels when backends do not support multi-queue

The event channels for rx & tx are written to a multi-queue formatted
path even when multiple queues are not supported. This results in a hung
VM with the following logs:
XENBUS|EvtchnWait: TIMED OUT: Count = 00000001 Channel->Count = 00000000
...

This can be reproduced by having a Linux VM network backend with 1 vCPU.

If FrontendGetNumQueues() is 1 and multiple queues are not supported,
the following paths are used for the poller event channel:
    device/vif/1/queue-0/event-channel-[rx|tx]

However, the proper xenstore path in this case is:
    device/vif/1/event-channel-[rx|tx]

PollerInstanceInitialize() sets its path using FrontendFormatPath(),
which assumes a multi-queue path layout.  This is done in a fashion
similar to the transmitter and receiver rings.  However, the tx/rx rings
check for the mutually supported number of queues to determine the
actual path written to xenstore, using FrontendGetNumQueues(). See
__TransmitterRingStoreWrite() and __ReceiverRingStoreWrite().  This patch
adds a similar procedure for the poller to write to the appropriate path
in xenstore.

Signed-off-by: Chris Patterson <cjp256@gmail.com>
src/xenvif/poller.c