aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@citrix.com>2014-03-24 19:59:50 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-26 16:33:42 -0400
commit0e59a4a553df312b5308c75085f7f02b12680d12 (patch)
tree90fb5cc34b7f9185b50af68ef22f2dd4c1563e6d /drivers/net/xen-netback/interface.c
parent869b9b19b3affd81cee853d33c0b124797f3c387 (diff)
xen-netback: Non-functional follow-up patch for grant mapping series
Ian made some late comments about the grant mapping series, I incorporated the non-functional outcomes into this patch: - typo fixes in a comment of xenvif_free(), and add another one there as well - typo fix for comment of rx_drain_timeout_msecs - remove stale comment before calling xenvif_grant_handle_reset() Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
-rw-r--r--drivers/net/xen-netback/interface.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index e71fb1ac5c4d..cdc298e3b747 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -574,15 +574,15 @@ void xenvif_disconnect(struct xenvif *vif)
574void xenvif_free(struct xenvif *vif) 574void xenvif_free(struct xenvif *vif)
575{ 575{
576 int i, unmap_timeout = 0; 576 int i, unmap_timeout = 0;
577 /* Here we want to avoid timeout messages if an skb can be legitimatly 577 /* Here we want to avoid timeout messages if an skb can be legitimately
578 * stucked somewhere else. Realisticly this could be an another vif's 578 * stuck somewhere else. Realistically this could be an another vif's
579 * internal or QDisc queue. That another vif also has this 579 * internal or QDisc queue. That another vif also has this
580 * rx_drain_timeout_msecs timeout, but the timer only ditches the 580 * rx_drain_timeout_msecs timeout, but the timer only ditches the
581 * internal queue. After that, the QDisc queue can put in worst case 581 * internal queue. After that, the QDisc queue can put in worst case
582 * XEN_NETIF_RX_RING_SIZE / MAX_SKB_FRAGS skbs into that another vif's 582 * XEN_NETIF_RX_RING_SIZE / MAX_SKB_FRAGS skbs into that another vif's
583 * internal queue, so we need several rounds of such timeouts until we 583 * internal queue, so we need several rounds of such timeouts until we
584 * can be sure that no another vif should have skb's from us. We are 584 * can be sure that no another vif should have skb's from us. We are
585 * not sending more skb's, so newly stucked packets are not interesting 585 * not sending more skb's, so newly stuck packets are not interesting
586 * for us here. 586 * for us here.
587 */ 587 */
588 unsigned int worst_case_skb_lifetime = (rx_drain_timeout_msecs/1000) * 588 unsigned int worst_case_skb_lifetime = (rx_drain_timeout_msecs/1000) *
@@ -597,6 +597,13 @@ void xenvif_free(struct xenvif *vif)
597 netdev_err(vif->dev, 597 netdev_err(vif->dev,
598 "Page still granted! Index: %x\n", 598 "Page still granted! Index: %x\n",
599 i); 599 i);
600 /* If there are still unmapped pages, reset the loop to
601 * start checking again. We shouldn't exit here until
602 * dealloc thread and NAPI instance release all the
603 * pages. If a kernel bug causes the skbs to stall
604 * somewhere, the interface cannot be brought down
605 * properly.
606 */
600 i = -1; 607 i = -1;
601 } 608 }
602 } 609 }