Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37223
b: refs/heads/master
c: 6656e3c
h: refs/heads/master
i:
  37221: d716e1d
  37219: 722334a
  37215: 7affdda
v: v3
  • Loading branch information
Chas Williams authored and David S. Miller committed Sep 30, 2006
1 parent 7c51d02 commit 92ac33c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33a9c2d4b758279c5077fc15d221b385a574ae0b
refs/heads/master: 6656e3c4c8e0c80f2d2bfece574876d269f64861
32 changes: 23 additions & 9 deletions trunk/net/atm/lec.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
priv->stats.tx_dropped++;
dev_kfree_skb(skb);
}
return 0;
goto out;
}
#if DUMP_PACKETS > 0
printk("%s:sending to vpi:%d vci:%d\n", dev->name, vcc->vpi, vcc->vci);
Expand Down Expand Up @@ -428,6 +428,9 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
netif_wake_queue(dev);
}

out:
if (entry)
lec_arp_put(entry);
dev->trans_start = jiffies;
return 0;
}
Expand Down Expand Up @@ -1888,6 +1891,7 @@ static void lec_arp_check_expire(void *data)

DPRINTK("lec_arp_check_expire %p\n", priv);
now = jiffies;
restart:
spin_lock_irqsave(&priv->lec_arp_lock, flags);
for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) {
hlist_for_each_entry_safe(entry, node, next, &priv->lec_arp_tables[i], next) {
Expand Down Expand Up @@ -1927,14 +1931,16 @@ static void lec_arp_check_expire(void *data)
time_after_eq(now, entry->timestamp +
priv->path_switching_delay)) {
struct sk_buff *skb;
struct atm_vcc *vcc = entry->vcc;

while ((skb =
skb_dequeue(&entry->tx_wait)) !=
NULL)
lec_send(entry->vcc, skb,
entry->priv);
lec_arp_hold(entry);
spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
while ((skb = skb_dequeue(&entry->tx_wait)) != NULL)
lec_send(vcc, skb, entry->priv);
entry->last_used = jiffies;
entry->status = ESI_FORWARD_DIRECT;
lec_arp_put(entry);
goto restart;
}
}
}
Expand Down Expand Up @@ -1977,6 +1983,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
if (entry->status == ESI_FORWARD_DIRECT) {
/* Connection Ok */
entry->last_used = jiffies;
lec_arp_hold(entry);
*ret_entry = entry;
found = entry->vcc;
goto out;
Expand Down Expand Up @@ -2007,6 +2014,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
* or BUS flood limit was reached for an entry which is
* in ESI_ARP_PENDING or ESI_VC_PENDING state.
*/
lec_arp_hold(entry);
*ret_entry = entry;
DPRINTK("lec: entry->status %d entry->vcc %p\n", entry->status,
entry->vcc);
Expand Down Expand Up @@ -2335,18 +2343,24 @@ static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id)
int i;

DPRINTK("LEC:lec_flush_complete %lx\n", tran_id);
restart:
spin_lock_irqsave(&priv->lec_arp_lock, flags);
for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) {
hlist_for_each_entry(entry, node, &priv->lec_arp_tables[i], next) {
if (entry->flush_tran_id == tran_id
&& entry->status == ESI_FLUSH_PENDING) {
struct sk_buff *skb;
struct atm_vcc *vcc = entry->vcc;

while ((skb =
skb_dequeue(&entry->tx_wait)) != NULL)
lec_send(entry->vcc, skb, entry->priv);
lec_arp_hold(entry);
spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
while ((skb = skb_dequeue(&entry->tx_wait)) != NULL)
lec_send(vcc, skb, entry->priv);
entry->last_used = jiffies;
entry->status = ESI_FORWARD_DIRECT;
lec_arp_put(entry);
DPRINTK("LEC_ARP: Flushed\n");
goto restart;
}
}
}
Expand Down

0 comments on commit 92ac33c

Please sign in to comment.