Hi,
I encountered a strange issue, the xennet interface in DomU stopped sending out anything in some rare cases.
I got chance to get more information on one reproduce, here are some findings.
The netfront driver check there isn’t available TX slot any more, and it stopped the TX queue.
static inline int netfront_tx_slot_available(struct netfront_info *np)
{
return ((np->tx.req_prod_pvt - np->tx.rsp_cons) <
(TX_MAX_TARGET - MAX_SKB_FRAGS - 2));
}
Here is some runtime debugging information after that issue occurred:
[3833225.489956] tx.req_prod_pvt=0x210daaa tx.rsp_cons=0x210d9be
[3833225.489958] TX_MAX_TARGET = 0x100, MAX_SKB_FRAGS = 0x12 dev->state=0x7
[3833225.489961] np->tx.sring->rsp_prod = 0x210d9be np->tx.sring->req_prod=0x210daaa
[3833225.489964] np->tx.sring->req_event=0x210d9bf np->tx.sring->rsp_event=0x210da35
The “dev->state” of xennet interface in DomU:
[3833225.489968] __LINK_STATE_XOFF: yes
[3833225.489970] __LINK_STATE_START: yes
[3833225.489971] __LINK_STATE_PRESENT: yes
[3833225.489973] __LINK_STATE_SCHED: no
[3833225.489975] __LINK_STATE_NOCARRIER: no
[3833225.489976] __LINK_STATE_RX_SCHED: no
[3833225.489978] __LINK_STATE_LINKWATCH_PENDING: no
[3833225.489979] __LINK_STATE_DORMANT: no
[3833225.489981] __LINK_STATE_QDISC_RUNNING: no
Due to tx.rsp_cons == np->tx.sring->rsp_prod == 0x210d9be, the network_tx_buf_gc() will do nothing.
The problem is, the TX queue will never been enable any more.
Could anybody helps to understand this, any inputs are appreciated.
The platform information:
Xen: 3.4.2 x86_64 8GB MEM + 8 CPU cores.
Dom0: 2.6.28.8(xenified kernel) x86 1 GB MEM + 1 CPU cores
DomU: 2.6.28.8(xenified kernel) x86 3 GB MEM + 2 CPU cores
<there are other two DomUs running without any problems>
Thanks,
-Shunli