stop using sk_protinfo
Subsystems (5)
PATCH 12/12 stop using sk_protinfo
Hi David, Chas,
Subject says it all. Chas, I tried contacting you, but mail to you bounces,
so I hope you can read this message thru netdev.
Regards,
- Arnaldo
===================================================================
[email protected], 2005-01-21 00:17:51-02:00, [email protected]
[ATM] stop using sk_protinfo
Required to introduce struct connection_sock.
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by David S. Miller <[email protected]>
drivers/atm/atmtcp.c | 14 ++++----- drivers/atm/he.c | 2 - drivers/atm/idt77252.c | 9 +++--- drivers/atm/iphase.c | 12 ++++---- include/linux/atmdev.h | 28 +++++++++++++------ net/atm/atm_misc.c | 7 ++-- net/atm/br2684.c | 4 +- net/atm/clip.c | 19 +++++++------ net/atm/common.c | 55 ++++++++++++++++--------------------- net/atm/ioctl.c | 9 +++--- net/atm/lec.c | 38 +++++++++++++++----------- net/atm/mpc.c | 28 ++++++++++++------- net/atm/pppoatm.c | 3 +- net/atm/proc.c | 18 ++++++------ net/atm/raw.c | 14 ++++++--- net/atm/signaling.c | 41 +++++++++++++++------------- net/atm/svc.c | 71 +++++++++++++++++++++++++------------------------ net/sched/sch_atm.c | 2 - 18 files changed, 207 insertions(+), 167 deletions(-)
drivers/atm/atmtcp.c +7 -7
@@ -67,7 +67,7 @@ *(struct atm_vcc **) &new_msg->vcc = vcc; old_test =test_bit (flag,&vcc->flags); out_vcc->push (out_vcc,skb); -add_wait_queue (vcc->sk->sk_sleep, &wait); +add_wait_queue (sk_atm (vcc)->sk_sleep, &wait);while (test_bit (flag,&vcc->flags) == old_test) {mb (); out_vcc =PRIV (vcc->dev) ?PRIV (vcc->dev)->vcc :NULL ;
@@ -79,7 +79,7 @@schedule (); }set_current_state (TASK_RUNNING ); -remove_wait_queue (vcc->sk->sk_sleep, &wait); +remove_wait_queue (sk_atm (vcc)->sk_sleep, &wait);return error; }
@@ -91,7 +91,7 @@ vcc->vpi = msg->addr.sap_addr.vpi; vcc->vci = msg->addr.sap_addr.vci; vcc->qos = msg->qos; - vcc->sk->sk_err = -msg->result; +sk_atm (vcc)->sk_err = -msg->result;switch (msg->type) {case ATMTCP_CTRL_OPEN :change_bit (ATM_VF_READY ,&vcc->flags);
@@ -104,7 +104,7 @@ msg->type);return -EINVAL ; } -wake_up (vcc->sk->sk_sleep); +wake_up (sk_atm (vcc)->sk_sleep);return 0 ; }
@@ -135,7 +135,7 @@clear_bit (ATM_VF_READY ,&vcc->flags);/* just in case ... */ error =atmtcp_send_control (vcc,ATMTCP_CTRL_OPEN ,&msg,ATM_VF_READY );if (error)return error; -return -vcc->sk->sk_err; +return -sk_atm (vcc)->sk_err; }
@@ -267,7 +267,7 @@ walk =atm_sk (s);if (walk->dev != atmtcp_dev)continue ; -wake_up (walk->sk->sk_sleep); +wake_up (s->sk_sleep); } }read_unlock (&vcc_sklist_lock);
@@ -417,7 +417,7 @@ }PRIV (dev)->vcc = vcc; vcc->dev = &atmtcp_control_dev; -vcc_insert_socket (vcc->sk); +vcc_insert_socket (sk_atm (vcc));set_bit (ATM_VF_META ,&vcc->flags);set_bit (ATM_VF_READY ,&vcc->flags); vcc->dev_data = dev;
drivers/atm/he.c +1 -1
@@ -2610,7 +2610,7 @@* TBRQ, the host issues the close command to the adapter. */ -while (((tx_inuse =atomic_read (&vcc->sk->sk_wmem_alloc)) >0 ) && +while (((tx_inuse =atomic_read (&sk_atm (vcc)->sk_wmem_alloc)) >0 ) && (retry <MAX_RETRY )) {msleep (sleep);if (sleep <250 )
drivers/atm/idt77252.c +5 -4
@@ -727,10 +727,11 @@spin_lock_irqsave (&vc->lock, flags);if (vc->estimator) {struct atm_vcc *vcc = vc->tx_vcc; +struct sock *sk =sk_atm (vcc); vc->estimator->cells += (skb->len +47 ) /48 ; -if (atomic_read (&vcc->sk->sk_wmem_alloc) > - (vcc->sk->sk_sndbuf >>1 )) { +if (atomic_read (&sk->sk_wmem_alloc) > + (sk->sk_sndbuf >>1 )) {u32 cps = vc->estimator->maxcps; vc->estimator->cps = cps;
@@ -1325,7 +1326,7 @@ goto drop; } -if ((vcc->sk !=NULL ) && !atm_charge (vcc, sb->truesize)) { +if (!atm_charge (vcc, sb->truesize)) {RXPRINTK ("%s: atm_charge() dropped AAL0 packets.\n" , card->name);dev_kfree_skb (sb);
@@ -2029,7 +2030,7 @@atomic_inc (&vcc->stats->tx_err);return -ENOMEM ; } -atomic_add (skb->truesize, &vcc->sk->sk_wmem_alloc); +atomic_add (skb->truesize, &sk_atm (vcc)->sk_wmem_alloc);memcpy (skb_put (skb,52 ), cell,52 );
drivers/atm/iphase.c +7 -5
@@ -1777,16 +1777,18 @@if (ia_vcc->pcr < iadev->rate_limit)skb_queue_head_init (&ia_vcc->txing_skb);if (ia_vcc->pcr < iadev->rate_limit) { -if (vcc->qos.txtp.max_sdu !=0 ) { +struct sock *sk =sk_atm (vcc); + +if (vcc->qos.txtp.max_sdu !=0 ) {if (ia_vcc->pcr >60000 ) - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu *5 ; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu *5 ;else if (ia_vcc->pcr >2000 ) - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu *4 ; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu *4 ;else - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu *3 ; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu *3 ; }else - vcc->sk->sk_sndbuf =24576 ; + sk->sk_sndbuf =24576 ; } vc = (struct main_vc *)iadev->MAIN_VC_TABLE_ADDR;
include/linux/atmdev.h +20 -8
@@ -30,9 +30,6 @@#define ATM_DS3_PCR (8000*12)/* DS3: 12 cells in a 125 usec time slot */ -#define atm_sk (__sk) ((struct atm_vcc *)(__sk)->sk_protinfo) -#define ATM_SD (s) (atm_sk((s)->sk)) -#define __AAL_STAT_ITEMS \ __HANDLE_ITEM(tx);/* TX okay */ \
@@ -281,6 +278,8 @@#define ATM_ATMOPT_CLP 1/* set CLP bit */ struct atm_vcc { +/* struct sock has to be the first member of atm_vcc */ +struct sock sk;unsigned long flags;/* VCC flags (ATM_VF_*) */ short vpi;/* VPI and VCI (types must be equal */ /* with sockaddr) */
@@ -297,7 +296,6 @@void *dev_data;/* per-device data */ void *proto_data;/* per-protocol data */ struct k_atm_aal_stats *stats;/* pointer to AAL stats group */ -struct sock *sk;/* socket backpointer */ /* SVC part --- may move later ------------------------------------- */ short itf;/* interface number */ struct sockaddr_atmsvc local;
@@ -310,6 +308,20 @@/* by CLIP and sch_atm. */ }; +static inline struct atm_vcc *atm_sk (struct sock *sk) +{ +return (struct atm_vcc *)sk; +} + +static inline struct atm_vcc *ATM_SD (struct socket *sock) +{ +return atm_sk (sock->sk); +} + +static inline struct sock *sk_atm (struct atm_vcc *vcc) +{ +return (struct sock *)vcc; +}struct atm_dev_addr {struct sockaddr_atmsvc addr;/* ATM address */
@@ -410,20 +422,20 @@static inline void atm_force_charge (struct atm_vcc *vcc,int truesize) { -atomic_add (truesize, &vcc->sk->sk_rmem_alloc); +atomic_add (truesize, &sk_atm (vcc)->sk_rmem_alloc); }static inline void atm_return (struct atm_vcc *vcc,int truesize) { -atomic_sub (truesize, &vcc->sk->sk_rmem_alloc); +atomic_sub (truesize, &sk_atm (vcc)->sk_rmem_alloc); }static inline int atm_may_send (struct atm_vcc *vcc,unsigned int size) { -return (size +atomic_read (&vcc->sk->sk_wmem_alloc)) < - vcc->sk->sk_sndbuf; +return (size +atomic_read (&sk_atm (vcc)->sk_wmem_alloc)) < +sk_atm (vcc)->sk_sndbuf; }
net/atm/atm_misc.c +4 -3
@@ -16,7 +16,7 @@int atm_charge (struct atm_vcc *vcc,int truesize) {atm_force_charge (vcc,truesize); -if (atomic_read (&vcc->sk->sk_rmem_alloc) <= vcc->sk->sk_rcvbuf) +if (atomic_read (&sk_atm (vcc)->sk_rmem_alloc) <=sk_atm (vcc)->sk_rcvbuf)return 1 ;atm_return (vcc,truesize);atomic_inc (&vcc->stats->rx_drop);
@@ -27,15 +27,16 @@struct sk_buff *atm_alloc_charge (struct atm_vcc *vcc,int pdu_size,int gfp_flags) { +struct sock *sk =sk_atm (vcc);int guess =atm_guess_pdu2truesize (pdu_size);atm_force_charge (vcc,guess); -if (atomic_read (&vcc->sk->sk_rmem_alloc) <= vcc->sk->sk_rcvbuf) { +if (atomic_read (&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) {struct sk_buff *skb =alloc_skb (pdu_size,gfp_flags);if (skb) {atomic_add (skb->truesize-guess, - &vcc->sk->sk_rmem_alloc); + &sk->sk_rmem_alloc);return skb; } }
net/atm/br2684.c +2 -2
@@ -190,7 +190,7 @@dev_kfree_skb (skb);return 0 ; } -atomic_add (skb->truesize, &atmvcc->sk->sk_wmem_alloc); +atomic_add (skb->truesize, &sk_atm (atmvcc)->sk_wmem_alloc);ATM_SKB (skb)->atm_options = atmvcc->atm_options; brdev->stats.tx_packets++; brdev->stats.tx_bytes += skb->len;
@@ -557,7 +557,7 @@barrier (); atmvcc->push = br2684_push;skb_queue_head_init (©); -skb_migrate (&atmvcc->sk->sk_receive_queue, ©); +skb_migrate (&sk_atm (atmvcc)->sk_receive_queue, ©);while ((skb =skb_dequeue (©)) !=NULL ) {BRPRIV (skb->dev)->stats.rx_bytes -= skb->len;BRPRIV (skb->dev)->stats.rx_packets--;
net/atm/clip.c +11 -8
@@ -58,6 +58,7 @@static int to_atmarpd (enum atmarp_ctrl_type type,int itf,unsigned long ip) { +struct sock *sk;struct atmarp_ctrl *ctrl;struct sk_buff *skb;
@@ -70,8 +71,10 @@ ctrl->itf_num = itf; ctrl->ip = ip;atm_force_charge (atmarpd,skb->truesize); -skb_queue_tail (&atmarpd->sk->sk_receive_queue, skb); - atmarpd->sk->sk_data_ready (atmarpd->sk, skb->len); + + sk =sk_atm (atmarpd); +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len);return 0 ; }
@@ -434,7 +437,7 @@memcpy (here,llc_oui,sizeof (llc_oui)); ((u16 *) here)[3 ] = skb->protocol; } -atomic_add (skb->truesize, &vcc->sk->sk_wmem_alloc); +atomic_add (skb->truesize, &sk_atm (vcc)->sk_wmem_alloc);ATM_SKB (skb)->atm_options = vcc->atm_options; entry->vccs->last_use = jiffies;DPRINTK ("atm_skb(%p)->vcc(%p)->dev(%p)\n" ,skb,vcc,vcc->dev);
@@ -493,7 +496,7 @@ vcc->push = clip_push; vcc->pop = clip_pop;skb_queue_head_init (©); -skb_migrate (&vcc->sk->sk_receive_queue, ©); +skb_migrate (&sk_atm (vcc)->sk_receive_queue, ©);/* re-process everything received between connection setup and MKIP */ while ((skb =skb_dequeue (©)) !=NULL )if (!clip_devs) {
@@ -686,10 +689,10 @@barrier ();unregister_inetaddr_notifier (&clip_inet_notifier);unregister_netdevice_notifier (&clip_dev_notifier); -if (skb_peek (&vcc->sk->sk_receive_queue)) +if (skb_peek (&sk_atm (vcc)->sk_receive_queue))printk (KERN_ERR "atmarpd_close: closing with requests " "pending\n" ); -skb_queue_purge (&vcc->sk->sk_receive_queue); +skb_queue_purge (&sk_atm (vcc)->sk_receive_queue);DPRINTK ("(done)\n" );module_put (THIS_MODULE ); }
@@ -723,7 +726,7 @@set_bit (ATM_VF_READY ,&vcc->flags);/* allow replies and avoid getting closed if signaling dies */ vcc->dev = &atmarpd_dev; -vcc_insert_socket (vcc->sk); +vcc_insert_socket (sk_atm (vcc)); vcc->push =NULL ; vcc->pop =NULL ;/* crash */ vcc->push_oam =NULL ;/* crash */
@@ -822,7 +825,7 @@int svc, llc, off; svc = ((clip_vcc ==SEQ_NO_VCC_TOKEN ) || - (clip_vcc->vcc->sk->sk_family ==AF_ATMSVC )); + (sk_atm (clip_vcc->vcc)->sk_family ==AF_ATMSVC )); llc = ((clip_vcc ==SEQ_NO_VCC_TOKEN ) || clip_vcc->encap);
net/atm/common.c +24 -31
142 lines not on this page · raw message
net/atm/ioctl.c +5 -4
@@ -46,6 +46,7 @@int vcc_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg) { +struct sock *sk = sock->sk;struct atm_vcc *vcc;int error;struct list_head * pos;
@@ -59,8 +60,8 @@ error = -EINVAL ; goto done; } - error =put_user (vcc->sk->sk_sndbuf - -atomic_read (&vcc->sk->sk_wmem_alloc), + error =put_user (sk->sk_sndbuf - +atomic_read (&sk->sk_wmem_alloc), (int __user *) argp) ? -EFAULT :0 ; goto done;case SIOCINQ :
@@ -71,13 +72,13 @@ error = -EINVAL ; goto done; } - skb =skb_peek (&vcc->sk->sk_receive_queue); + skb =skb_peek (&sk->sk_receive_queue); error =put_user (skb ? skb->len :0 , (int __user *)argp) ? -EFAULT :0 ; goto done; }case SIOCGSTAMP :/* borrowed from IP */ - error =sock_get_timestamp (vcc->sk, argp); + error =sock_get_timestamp (sk, argp); goto done;case ATM_SETSC :printk (KERN_WARNING "ATM_SETSC is obsolete\n" );
net/atm/lec.c +23 -15
@@ -122,6 +122,7 @@ eth = (struct ethhdr *)skb->data; buff = skb->data + skb->dev->hard_header_len;if (*buff++ ==0x42 && *buff++ ==0x42 && *buff++ ==0x03 ) { +struct sock *sk;struct sk_buff *skb2;struct atmlec_msg *mesg;
@@ -135,8 +136,9 @@ priv = (struct lec_priv *)dev->priv;atm_force_charge (priv->lecd, skb2->truesize); -skb_queue_tail (&priv->lecd->sk->sk_receive_queue, skb2); - priv->lecd->sk->sk_data_ready (priv->lecd->sk, skb2->len); + sk =sk_atm (priv->lecd); +skb_queue_tail (&sk->sk_receive_queue, skb2); + sk->sk_data_ready (sk, skb2->len); }return ;
@@ -214,7 +216,7 @@ATM_SKB (skb)->vcc = vcc;ATM_SKB (skb)->atm_options = vcc->atm_options; -atomic_add (skb->truesize, &vcc->sk->sk_wmem_alloc); +atomic_add (skb->truesize, &sk_atm (vcc)->sk_wmem_alloc);if (vcc->send (vcc, skb) <0 ) { priv->stats.tx_dropped++;return ;
@@ -430,7 +432,7 @@int i;char *tmp;/* FIXME */ -atomic_sub (skb->truesize, &vcc->sk->sk_wmem_alloc); +atomic_sub (skb->truesize, &sk_atm (vcc)->sk_wmem_alloc); mesg = (struct atmlec_msg *)skb->data; tmp = skb->data; tmp +=sizeof (struct atmlec_msg );
@@ -528,6 +530,7 @@ f->dst->state == BR_STATE_FORWARDING) {/* hit from bridge table, send LE_ARP_RESPONSE */ struct sk_buff *skb2; +struct sock *sk;DPRINTK ("%s: entry found, responding to zeppelin\n" , dev->name); skb2 =alloc_skb (sizeof (struct atmlec_msg ),GFP_ATOMIC );
@@ -538,8 +541,9 @@ skb2->len =sizeof (struct atmlec_msg );memcpy (skb2->data, mesg,sizeof (struct atmlec_msg ));atm_force_charge (priv->lecd, skb2->truesize); -skb_queue_tail (&priv->lecd->sk->sk_receive_queue, skb2); - priv->lecd->sk->sk_data_ready(priv->lecd->sk, skb2->len); + sk =sk_atm (priv->lecd); +skb_queue_tail (&sk->sk_receive_queue, skb2); + sk->sk_data_ready(sk, skb2->len); }if (f !=NULL )br_fdb_put_hook (f);#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */
@@ -567,10 +571,10 @@netif_stop_queue (dev);lec_arp_destroy (priv); -if (skb_peek (&vcc->sk->sk_receive_queue)) +if (skb_peek (&sk_atm (vcc)->sk_receive_queue))printk ("%s lec_atm_close: closing with messages pending\n" , dev->name); -while ((skb =skb_dequeue (&vcc->sk->sk_receive_queue)) !=NULL ) { +while ((skb =skb_dequeue (&sk_atm (vcc)->sk_receive_queue)) !=NULL ) {atm_return (vcc, skb->truesize);dev_kfree_skb (skb); }
@@ -600,6 +604,7 @@ unsigned char *mac_addr, unsigned char *atm_addr, struct sk_buff *data) { + struct sock *sk;struct sk_buff *skb;struct atmlec_msg *mesg;
@@ -623,14 +628,15 @@memcpy (&mesg->content.normal.atm_addr, atm_addr,ATM_ESA_LEN );atm_force_charge (priv->lecd, skb->truesize); -skb_queue_tail (&priv->lecd->sk->sk_receive_queue, skb); - priv->lecd->sk->sk_data_ready (priv->lecd->sk, skb->len); + sk =sk_atm (priv->lecd); +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len);if (data !=NULL ) {DPRINTK ("lec: about to send %d bytes of data\n" , data->len);atm_force_charge (priv->lecd, data->truesize); -skb_queue_tail (&priv->lecd->sk->sk_receive_queue, data); - priv->lecd->sk->sk_data_ready (priv->lecd->sk, skb->len); +skb_queue_tail (&sk->sk_receive_queue, data); + sk->sk_data_ready (sk, skb->len); }return 0 ;
@@ -711,9 +717,11 @@printk ("%s...\n" ,buf);#endif /* DUMP_PACKETS > 0 */ if (memcmp (skb->data, lec_ctrl_magic,4 ) ==0 ) {/* Control frame, to daemon*/ +struct sock *sk =sk_atm (vcc); +DPRINTK ("%s: To daemon\n" ,dev->name); -skb_queue_tail (&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready (vcc->sk, skb->len); +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len); }else {/* Data frame, queue to protocol handlers */ unsigned char *dst;
@@ -866,7 +874,7 @@ priv->itfnum = i;/* LANE2 addition */ priv->lecd = vcc; vcc->dev = &lecatm_dev; -vcc_insert_socket (vcc->sk); +vcc_insert_socket (sk_atm (vcc)); vcc->proto_data = dev_lec[i];set_bit (ATM_VF_META ,&vcc->flags);
net/atm/mpc.c +18 -10
@@ -522,7 +522,7 @@memcpy (skb->data, &llc_snap_mpoa_data,sizeof (struct llc_snap_hdr )); } -atomic_add (skb->truesize, &entry->shortcut->sk->sk_wmem_alloc); +atomic_add (skb->truesize, &sk_atm (entry->shortcut)->sk_wmem_alloc);ATM_SKB (skb)->atm_options = entry->shortcut->atm_options; entry->shortcut->send (entry->shortcut, skb); entry->packets_fwded++;
@@ -665,10 +665,12 @@ skb->dev = dev;if (memcmp (skb->data, &llc_snap_mpoa_ctrl,sizeof (struct llc_snap_hdr )) ==0 ) { +struct sock *sk =sk_atm (vcc); +dprintk ("mpoa: (%s) mpc_push: control packet arrived\n" , dev->name);/* Pass control packets to daemon */ -skb_queue_tail (&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready (vcc->sk, skb->len); +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len);return ; }
@@ -794,7 +796,7 @@ mpc->mpoad_vcc = vcc; vcc->dev = &mpc_dev; -vcc_insert_socket (vcc->sk); +vcc_insert_socket (sk_atm (vcc));set_bit (ATM_VF_META ,&vcc->flags);set_bit (ATM_VF_READY ,&vcc->flags);
@@ -853,7 +855,7 @@ mpc->in_ops->destroy_cache (mpc); mpc->eg_ops->destroy_cache (mpc); -while ((skb =skb_dequeue (&vcc->sk->sk_receive_queue))) { +while ((skb =skb_dequeue (&sk_atm (vcc)->sk_receive_queue))) {atm_return (vcc, skb->truesize);kfree_skb (skb); }
@@ -873,7 +875,7 @@struct mpoa_client *mpc =find_mpc_by_vcc (vcc);struct k_message *mesg = (struct k_message *)skb->data; -atomic_sub (skb->truesize, &vcc->sk->sk_wmem_alloc); +atomic_sub (skb->truesize, &sk_atm (vcc)->sk_wmem_alloc);if (mpc ==NULL ) {printk ("mpoa: msg_from_mpoad: no mpc found\n" );
@@ -938,6 +940,7 @@int msg_to_mpoad (struct k_message *mesg,struct mpoa_client *mpc) {struct sk_buff *skb; +struct sock *sk;if (mpc ==NULL || !mpc->mpoad_vcc) {printk ("mpoa: msg_to_mpoad: mesg %d to a non-existent mpoad\n" , mesg->type);
@@ -950,8 +953,10 @@skb_put (skb,sizeof (struct k_message ));memcpy (skb->data, mesg,sizeof (struct k_message ));atm_force_charge (mpc->mpoad_vcc, skb->truesize); -skb_queue_tail (&mpc->mpoad_vcc->sk->sk_receive_queue, skb); - mpc->mpoad_vcc->sk->sk_data_ready (mpc->mpoad_vcc->sk, skb->len); + + sk =sk_atm (mpc->mpoad_vcc); +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len);return 0 ; }
@@ -1206,6 +1211,7 @@static void purge_egress_shortcut (struct atm_vcc *vcc,eg_cache_entry *entry) { +struct sock *sk;struct k_message *purge_msg;struct sk_buff *skb;
@@ -1229,8 +1235,10 @@ purge_msg->content.eg_info = entry->ctrl_info;atm_force_charge (vcc, skb->truesize); -skb_queue_tail (&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready (vcc->sk, skb->len); + + sk =sk_atm (vcc); +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len);dprintk ("mpoa: purge_egress_shortcut: exiting:\n" );return ;
net/atm/pppoatm.c +2 -1
@@ -233,7 +233,8 @@kfree_skb (skb);return 1 ; } -atomic_add (skb->truesize, &ATM_SKB (skb)->vcc->sk->sk_wmem_alloc); + +atomic_add (skb->truesize, &sk_atm (ATM_SKB (skb)->vcc)->sk_wmem_alloc);ATM_SKB (skb)->atm_options =ATM_SKB (skb)->vcc->atm_options; DPRINTK("(unit %d): atm_skb(%p)->vcc(%p)->dev(%p)\n", pvcc->chan.unit, skb, ATM_SKB(skb)->vcc,
net/atm/proc.c +9 -9
@@ -71,9 +71,7 @@static inline int compare_family (struct sock *sk,int family) { -struct atm_vcc *vcc =atm_sk (sk); - -return !family || (vcc->sk->sk_family == family); +return !family || (sk->sk_family == family); }static int __vcc_walk (struct sock **sock,int family,int *bucket,loff_t l)
@@ -203,13 +201,15 @@static void vcc_info (struct seq_file *seq,struct atm_vcc *vcc) { +struct sock *sk =sk_atm (vcc); +seq_printf (seq,"%p " , vcc);if (!vcc->dev)seq_printf (seq,"Unassigned " );else seq_printf (seq,"%3d %3d %5d " , vcc->dev->number, vcc->vpi, vcc->vci); -switch (vcc->sk->sk_family) { +switch (sk->sk_family) {case AF_ATMPVC :seq_printf (seq,"PVC" );break ;
@@ -217,12 +217,12 @@seq_printf (seq,"SVC" );break ;default : -seq_printf (seq,"%3d" , vcc->sk->sk_family); +seq_printf (seq,"%3d" , sk->sk_family); } -seq_printf (seq," %04lx %5d %7d/%7d %7d/%7d [%d]\n" , vcc->flags, vcc->sk->sk_err, -atomic_read (&vcc->sk->sk_wmem_alloc),vcc->sk->sk_sndbuf, -atomic_read (&vcc->sk->sk_rmem_alloc),vcc->sk->sk_rcvbuf, -atomic_read (&vcc->sk->sk_refcnt)); +seq_printf (seq," %04lx %5d %7d/%7d %7d/%7d [%d]\n" , vcc->flags, sk->sk_err, +atomic_read (&sk->sk_wmem_alloc), sk->sk_sndbuf, +atomic_read (&sk->sk_rmem_alloc), sk->sk_rcvbuf, +atomic_read (&sk->sk_refcnt)); }static void svc_info (struct seq_file *seq,struct atm_vcc *vcc)
net/atm/raw.c +9 -5
@@ -28,19 +28,23 @@void atm_push_raw (struct atm_vcc *vcc,struct sk_buff *skb) {if (skb) { -skb_queue_tail (&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready (vcc->sk, skb->len); +struct sock *sk =sk_atm (vcc); + +skb_queue_tail (&sk->sk_receive_queue, skb); + sk->sk_data_ready (sk, skb->len); } }static void atm_pop_raw (struct atm_vcc *vcc,struct sk_buff *skb) { -DPRINTK ("APopR (%d) %d -= %d\n" , vcc->vci, vcc->sk->sk_wmem_alloc, +struct sock *sk =sk_atm (vcc); + +DPRINTK ("APopR (%d) %d -= %d\n" , vcc->vci, sk->sk_wmem_alloc, skb->truesize); -atomic_sub (skb->truesize, &vcc->sk->sk_wmem_alloc); +atomic_sub (skb->truesize, &sk->sk_wmem_alloc);dev_kfree_skb_any (skb); - vcc->sk->sk_write_space (vcc->sk); + sk->sk_write_space (sk); }
net/atm/signaling.c +22 -19
107 lines not on this page · raw message
net/atm/svc.c +37 -34
184 lines not on this page · raw message
net/sched/sch_atm.c +1 -1
@@ -519,7 +519,7 @@memcpy (skb_push (skb,flow->hdr_len),flow->hdr, flow->hdr_len);atomic_add (skb->truesize, - &flow->vcc->sk->sk_wmem_alloc); + &sk_atm (flow->vcc)->sk_wmem_alloc);/* atm.atm_options are already set by atm_tc_enqueue */ (void ) flow->vcc->send (flow->vcc,skb); }