Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
81273a00
Commit
81273a00
authored
May 06, 2003
by
Chas Williams
Committed by
David S. Miller
May 06, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Clip locking and more atmvcc cleanup.
parent
a6f426f6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
include/linux/atmdev.h
include/linux/atmdev.h
+0
-3
net/atm/clip.c
net/atm/clip.c
+5
-0
net/atm/common.c
net/atm/common.c
+1
-2
net/atm/signaling.c
net/atm/signaling.c
+3
-3
net/atm/svc.c
net/atm/svc.c
+4
-4
No files found.
include/linux/atmdev.h
View file @
81273a00
...
...
@@ -306,9 +306,6 @@ struct atm_vcc {
struct
sockaddr_atmsvc
local
;
struct
sockaddr_atmsvc
remote
;
void
(
*
callback
)(
struct
atm_vcc
*
vcc
);
struct
sk_buff_head
listenq
;
int
backlog_quota
;
/* number of connection requests we */
/* can still accept */
int
reply
;
/* also used by ATMTCP */
/* Multipoint part ------------------------------------------------- */
struct
atm_vcc
*
session
;
/* session VCC descriptor */
...
...
net/atm/clip.c
View file @
81273a00
...
...
@@ -127,6 +127,8 @@ static void idle_timer_check(unsigned long dummy)
struct
atmarp_entry
*
entry
=
NEIGH2ENTRY
(
n
);
struct
clip_vcc
*
clip_vcc
;
write_lock
(
&
n
->
lock
);
for
(
clip_vcc
=
entry
->
vccs
;
clip_vcc
;
clip_vcc
=
clip_vcc
->
next
)
if
(
clip_vcc
->
idle_timeout
&&
...
...
@@ -141,6 +143,7 @@ static void idle_timer_check(unsigned long dummy)
if
(
entry
->
vccs
||
time_before
(
jiffies
,
entry
->
expires
))
{
np
=
&
n
->
next
;
write_unlock
(
&
n
->
lock
);
continue
;
}
if
(
atomic_read
(
&
n
->
refcnt
)
>
1
)
{
...
...
@@ -152,11 +155,13 @@ static void idle_timer_check(unsigned long dummy)
NULL
)
dev_kfree_skb
(
skb
);
np
=
&
n
->
next
;
write_unlock
(
&
n
->
lock
);
continue
;
}
*
np
=
n
->
next
;
DPRINTK
(
"expired neigh %p
\n
"
,
n
);
n
->
dead
=
1
;
write_unlock
(
&
n
->
lock
);
neigh_release
(
n
);
}
}
...
...
net/atm/common.c
View file @
81273a00
...
...
@@ -127,7 +127,6 @@ int atm_create(struct socket *sock,int protocol,int family)
vcc
->
vpi
=
vcc
->
vci
=
0
;
/* no VCI/VPI yet */
vcc
->
atm_options
=
vcc
->
aal_options
=
0
;
init_waitqueue_head
(
&
vcc
->
sleep
);
skb_queue_head_init
(
&
vcc
->
listenq
);
sk
->
sleep
=
&
vcc
->
sleep
;
sock
->
sk
=
sk
;
return
0
;
...
...
@@ -496,7 +495,7 @@ unsigned int atm_poll(struct file *file,struct socket *sock,poll_table *wait)
vcc
=
ATM_SD
(
sock
);
poll_wait
(
file
,
&
vcc
->
sleep
,
wait
);
mask
=
0
;
if
(
skb_peek
(
&
vcc
->
sk
->
receive_queue
)
||
skb_peek
(
&
vcc
->
listenq
)
)
if
(
skb_peek
(
&
vcc
->
sk
->
receive_queue
))
mask
|=
POLLIN
|
POLLRDNORM
;
if
(
test_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
)
||
test_bit
(
ATM_VF_CLOSE
,
&
vcc
->
flags
))
...
...
net/atm/signaling.c
View file @
81273a00
...
...
@@ -129,12 +129,12 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
case
as_indicate
:
vcc
=
*
(
struct
atm_vcc
**
)
&
msg
->
listen_vcc
;
DPRINTK
(
"as_indicate!!!
\n
"
);
if
(
!
vcc
->
backlog_quota
)
{
if
(
vcc
->
sk
->
ack_backlog
==
vcc
->
sk
->
max_ack_backlog
)
{
sigd_enq
(
0
,
as_reject
,
vcc
,
NULL
,
NULL
);
return
0
;
}
vcc
->
backlog_quota
--
;
skb_queue_tail
(
&
vcc
->
listenq
,
skb
);
vcc
->
sk
->
ack_backlog
++
;
skb_queue_tail
(
&
vcc
->
sk
->
receive_queue
,
skb
);
if
(
vcc
->
callback
)
{
DPRINTK
(
"waking vcc->sleep 0x%p
\n
"
,
&
vcc
->
sleep
);
...
...
net/atm/svc.c
View file @
81273a00
...
...
@@ -74,7 +74,7 @@ static void svc_disconnect(struct atm_vcc *vcc)
}
/* beware - socket is still in use by atmsigd until the last
as_indicate has been answered */
while
((
skb
=
skb_dequeue
(
&
vcc
->
listenq
)))
{
while
((
skb
=
skb_dequeue
(
&
vcc
->
sk
->
receive_queue
)))
{
DPRINTK
(
"LISTEN REL
\n
"
);
sigd_enq2
(
NULL
,
as_reject
,
vcc
,
NULL
,
NULL
,
&
vcc
->
qos
,
0
);
dev_kfree_skb
(
skb
);
...
...
@@ -253,7 +253,7 @@ static int svc_listen(struct socket *sock,int backlog)
remove_wait_queue
(
&
vcc
->
sleep
,
&
wait
);
if
(
!
sigd
)
return
-
EUNATCH
;
set_bit
(
ATM_VF_LISTEN
,
&
vcc
->
flags
);
vcc
->
backlog_quota
=
backlog
>
0
?
backlog
:
ATM_BACKLOG_DEFAULT
;
vcc
->
sk
->
max_ack_backlog
=
backlog
>
0
?
backlog
:
ATM_BACKLOG_DEFAULT
;
return
vcc
->
reply
;
}
...
...
@@ -277,7 +277,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags)
DECLARE_WAITQUEUE
(
wait
,
current
);
add_wait_queue
(
&
old_vcc
->
sleep
,
&
wait
);
while
(
!
(
skb
=
skb_dequeue
(
&
old_vcc
->
listenq
))
&&
sigd
)
{
while
(
!
(
skb
=
skb_dequeue
(
&
old_vcc
->
sk
->
receive_queue
))
&&
sigd
)
{
if
(
test_bit
(
ATM_VF_RELEASED
,
&
old_vcc
->
flags
))
break
;
if
(
test_bit
(
ATM_VF_CLOSE
,
&
old_vcc
->
flags
))
{
error
=
old_vcc
->
reply
;
...
...
@@ -306,7 +306,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags)
error
=
atm_connect
(
newsock
,
msg
->
pvc
.
sap_addr
.
itf
,
msg
->
pvc
.
sap_addr
.
vpi
,
msg
->
pvc
.
sap_addr
.
vci
);
dev_kfree_skb
(
skb
);
old_vcc
->
backlog_quota
++
;
old_vcc
->
sk
->
ack_backlog
--
;
if
(
error
)
{
sigd_enq2
(
NULL
,
as_reject
,
old_vcc
,
NULL
,
NULL
,
&
old_vcc
->
qos
,
error
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment