patch-2.4.21 linux-2.4.21/net/atm/atm_misc.c
Next file: linux-2.4.21/net/atm/br2684.c
Previous file: linux-2.4.21/net/8021q/vlanproc.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
2003-06-13 07:51:39.000000000 -0700
- Orig file:
linux-2.4.20/net/atm/atm_misc.c
- Orig date:
2000-03-21 23:38:26.000000000 -0800
diff -urN linux-2.4.20/net/atm/atm_misc.c linux-2.4.21/net/atm/atm_misc.c
@@ -16,7 +16,7 @@
int atm_charge(struct atm_vcc *vcc,int truesize)
{
atm_force_charge(vcc,truesize);
- if (atomic_read(&vcc->rx_inuse) <= vcc->sk->rcvbuf) return 1;
+ if (atomic_read(&vcc->sk->rmem_alloc) <= vcc->sk->rcvbuf) return 1;
atm_return(vcc,truesize);
atomic_inc(&vcc->stats->rx_drop);
return 0;
@@ -29,11 +29,11 @@
int guess = atm_guess_pdu2truesize(pdu_size);
atm_force_charge(vcc,guess);
- if (atomic_read(&vcc->rx_inuse) <= vcc->sk->rcvbuf) {
+ if (atomic_read(&vcc->sk->rmem_alloc) <= vcc->sk->rcvbuf) {
struct sk_buff *skb = alloc_skb(pdu_size,gfp_flags);
if (skb) {
- atomic_add(skb->truesize-guess,&vcc->rx_inuse);
+ atomic_add(skb->truesize-guess,&vcc->sk->rmem_alloc);
return skb;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)