ia64/xen-unstable

changeset 93:a555f7a1f075

bitkeeper revision 1.15.1.5 (3e280e17xqZ75-O3H14dqvzIc20XAQ)

dev.c:
Fix receive queue boundedness
author kaf24@labyrinth.cl.cam.ac.uk
date Fri Jan 17 14:07:19 2003 +0000 (2003-01-17)
parents f295e57142a0
children e84c63b9a807
files xen-2.4.16/net/dev.c
line diff
     1.1 --- a/xen-2.4.16/net/dev.c	Thu Jan 16 23:37:53 2003 +0000
     1.2 +++ b/xen-2.4.16/net/dev.c	Fri Jan 17 14:07:19 2003 +0000
     1.3 @@ -690,6 +690,7 @@ int netif_rx(struct sk_buff *skb)
     1.4  	int this_cpu = smp_processor_id();
     1.5  	struct softnet_data *queue;
     1.6  	unsigned long flags;
     1.7 +        net_vif_t *vif;
     1.8  
     1.9  	if (skb->stamp.tv_sec == 0)
    1.10  		get_fast_time(&skb->stamp);
    1.11 @@ -703,13 +704,13 @@ int netif_rx(struct sk_buff *skb)
    1.12          
    1.13  	netdev_rx_stat[this_cpu].total++;
    1.14  
    1.15 -        if (skb->src_vif == VIF_UNKNOWN_INTERFACE)
    1.16 +        if ( skb->src_vif == VIF_UNKNOWN_INTERFACE )
    1.17              skb->src_vif = VIF_PHYSICAL_INTERFACE;
    1.18  
    1.19 -        if (skb->dst_vif == VIF_UNKNOWN_INTERFACE)
    1.20 +        if ( skb->dst_vif == VIF_UNKNOWN_INTERFACE )
    1.21              net_get_target_vif(skb);
    1.22          
    1.23 -        if (sys_vif_list[skb->dst_vif] == NULL)
    1.24 +        if ( (vif = sys_vif_list[skb->dst_vif]) == NULL )
    1.25          {
    1.26              // the target vif does not exist.
    1.27              goto drop;
    1.28 @@ -730,8 +731,9 @@ int netif_rx(struct sk_buff *skb)
    1.29              read_lock(&tasklist_lock);
    1.30              p = &idle0_task;
    1.31              do {
    1.32 -                if ( p->domain != sys_vif_list[skb->dst_vif]->domain ) continue;
    1.33 -                skb_queue_tail(&sys_vif_list[skb->dst_vif]->skb_list, skb);
    1.34 +                if ( p->domain != vif->domain ) continue;
    1.35 +                if ( vif->skb_list.qlen > 100 ) break;
    1.36 +                skb_queue_tail(&vif->skb_list, skb);
    1.37                  cpu_mask = mark_hyp_event(p, _HYP_EVENT_NET_RX);
    1.38                  read_unlock(&tasklist_lock);
    1.39                  goto found;