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
Kirill Smelkov
linux
Commits
f6932f56
Commit
f6932f56
authored
Jun 16, 2003
by
Chas Williams
Committed by
David S. Miller
Jun 16, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Remove recvmsg and rename atm_async_release_vcc.
parent
e0380eac
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
400 additions
and
262 deletions
+400
-262
include/linux/atmdev.h
include/linux/atmdev.h
+1
-1
net/atm/clip.c
net/atm/clip.c
+2
-2
net/atm/common.c
net/atm/common.c
+125
-142
net/atm/common.h
net/atm/common.h
+8
-9
net/atm/lec.c
net/atm/lec.c
+2
-2
net/atm/mpoa_caches.c
net/atm/mpoa_caches.c
+2
-2
net/atm/pvc.c
net/atm/pvc.c
+42
-12
net/atm/signaling.c
net/atm/signaling.c
+7
-1
net/atm/svc.c
net/atm/svc.c
+211
-91
No files found.
include/linux/atmdev.h
View file @
f6932f56
...
@@ -452,7 +452,7 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
...
@@ -452,7 +452,7 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
int
atm_find_ci
(
struct
atm_vcc
*
vcc
,
short
*
vpi
,
int
*
vci
);
int
atm_find_ci
(
struct
atm_vcc
*
vcc
,
short
*
vpi
,
int
*
vci
);
int
atm_pcr_goal
(
struct
atm_trafprm
*
tp
);
int
atm_pcr_goal
(
struct
atm_trafprm
*
tp
);
void
atm_async_release_vcc
(
struct
atm_vcc
*
vcc
,
int
reply
);
void
vcc_release_async
(
struct
atm_vcc
*
vcc
,
int
reply
);
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
net/atm/clip.c
View file @
f6932f56
...
@@ -140,8 +140,8 @@ static void idle_timer_check(unsigned long dummy)
...
@@ -140,8 +140,8 @@ static void idle_timer_check(unsigned long dummy)
DPRINTK
(
"releasing vcc %p->%p of "
DPRINTK
(
"releasing vcc %p->%p of "
"entry %p
\n
"
,
clip_vcc
,
clip_vcc
->
vcc
,
"entry %p
\n
"
,
clip_vcc
,
clip_vcc
->
vcc
,
entry
);
entry
);
atm_async_release_vc
c
(
clip_vcc
->
vcc
,
vcc_release_asyn
c
(
clip_vcc
->
vcc
,
-
ETIMEDOUT
);
-
ETIMEDOUT
);
}
}
if
(
entry
->
vccs
||
if
(
entry
->
vccs
||
time_before
(
jiffies
,
entry
->
expires
))
{
time_before
(
jiffies
,
entry
->
expires
))
{
...
...
net/atm/common.c
View file @
f6932f56
This diff is collapsed.
Click to expand it.
net/atm/common.h
View file @
f6932f56
...
@@ -12,19 +12,18 @@
...
@@ -12,19 +12,18 @@
int
atm_create
(
struct
socket
*
sock
,
int
protocol
,
int
family
);
int
atm_create
(
struct
socket
*
sock
,
int
protocol
,
int
family
);
int
atm_release
(
struct
socket
*
sock
);
int
atm_release
(
struct
socket
*
sock
);
int
atm_connect
(
struct
socket
*
sock
,
int
itf
,
short
vpi
,
int
vci
);
int
vcc_connect
(
struct
socket
*
sock
,
int
itf
,
short
vpi
,
int
vci
);
int
atm_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
m
,
int
vcc_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
int
total_len
,
int
flags
);
int
size
,
int
flags
);
int
atm
_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
m
,
int
vcc
_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
m
,
int
total_len
);
int
total_len
);
unsigned
int
atm_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
poll_table
*
wait
);
unsigned
int
atm_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
poll_table
*
wait
);
int
vcc_ioctl
(
struct
socket
*
sock
,
unsigned
int
cmd
,
unsigned
long
arg
);
int
vcc_ioctl
(
struct
socket
*
sock
,
unsigned
int
cmd
,
unsigned
long
arg
);
int
atm_setsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
*
optval
,
int
vcc_setsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
);
int
optlen
);
int
atm_getsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
*
optval
,
int
vcc_getsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
*
optval
,
int
*
optlen
);
int
*
optlen
);
int
atm_connect_vcc
(
struct
atm_vcc
*
vcc
,
int
itf
,
short
vpi
,
int
vci
);
void
atm_release_vcc_sk
(
struct
sock
*
sk
,
int
free_sk
);
void
atm_release_vcc_sk
(
struct
sock
*
sk
,
int
free_sk
);
void
atm_shutdown_dev
(
struct
atm_dev
*
dev
);
void
atm_shutdown_dev
(
struct
atm_dev
*
dev
);
...
...
net/atm/lec.c
View file @
f6932f56
...
@@ -1079,7 +1079,7 @@ lec_arp_clear_vccs(struct lec_arp_table *entry)
...
@@ -1079,7 +1079,7 @@ lec_arp_clear_vccs(struct lec_arp_table *entry)
clear_bit(ATM_VF_READY,&entry->vcc->flags);
clear_bit(ATM_VF_READY,&entry->vcc->flags);
entry->vcc->push(entry->vcc, NULL);
entry->vcc->push(entry->vcc, NULL);
#endif
#endif
atm_async_release_vc
c
(
entry
->
vcc
,
-
EPIPE
);
vcc_release_asyn
c
(
entry
->
vcc
,
-
EPIPE
);
entry
->
vcc
=
NULL
;
entry
->
vcc
=
NULL
;
}
}
if
(
entry
->
recv_vcc
)
{
if
(
entry
->
recv_vcc
)
{
...
@@ -1089,7 +1089,7 @@ lec_arp_clear_vccs(struct lec_arp_table *entry)
...
@@ -1089,7 +1089,7 @@ lec_arp_clear_vccs(struct lec_arp_table *entry)
clear_bit(ATM_VF_READY,&entry->recv_vcc->flags);
clear_bit(ATM_VF_READY,&entry->recv_vcc->flags);
entry->recv_vcc->push(entry->recv_vcc, NULL);
entry->recv_vcc->push(entry->recv_vcc, NULL);
#endif
#endif
atm_async_release_vc
c
(
entry
->
recv_vcc
,
-
EPIPE
);
vcc_release_asyn
c
(
entry
->
recv_vcc
,
-
EPIPE
);
entry
->
recv_vcc
=
NULL
;
entry
->
recv_vcc
=
NULL
;
}
}
}
}
...
...
net/atm/mpoa_caches.c
View file @
f6932f56
...
@@ -212,7 +212,7 @@ static void in_cache_remove_entry(in_cache_entry *entry,
...
@@ -212,7 +212,7 @@ static void in_cache_remove_entry(in_cache_entry *entry,
client
->
eg_ops
->
put
(
eg_entry
);
client
->
eg_ops
->
put
(
eg_entry
);
return
;
return
;
}
}
atm_async_release_vc
c
(
vcc
,
-
EPIPE
);
vcc_release_asyn
c
(
vcc
,
-
EPIPE
);
}
}
return
;
return
;
...
@@ -447,7 +447,7 @@ static void eg_cache_remove_entry(eg_cache_entry *entry,
...
@@ -447,7 +447,7 @@ static void eg_cache_remove_entry(eg_cache_entry *entry,
client
->
in_ops
->
put
(
in_entry
);
client
->
in_ops
->
put
(
in_entry
);
return
;
return
;
}
}
atm_async_release_vc
c
(
vcc
,
-
EPIPE
);
vcc_release_asyn
c
(
vcc
,
-
EPIPE
);
}
}
return
;
return
;
...
...
net/atm/pvc.c
View file @
f6932f56
...
@@ -31,20 +31,29 @@ static int pvc_shutdown(struct socket *sock,int how)
...
@@ -31,20 +31,29 @@ static int pvc_shutdown(struct socket *sock,int how)
static
int
pvc_bind
(
struct
socket
*
sock
,
struct
sockaddr
*
sockaddr
,
static
int
pvc_bind
(
struct
socket
*
sock
,
struct
sockaddr
*
sockaddr
,
int
sockaddr_len
)
int
sockaddr_len
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sockaddr_atmpvc
*
addr
;
struct
sockaddr_atmpvc
*
addr
;
struct
atm_vcc
*
vcc
;
struct
atm_vcc
*
vcc
;
int
error
;
if
(
sockaddr_len
!=
sizeof
(
struct
sockaddr_atmpvc
))
return
-
EINVAL
;
if
(
sockaddr_len
!=
sizeof
(
struct
sockaddr_atmpvc
))
return
-
EINVAL
;
addr
=
(
struct
sockaddr_atmpvc
*
)
sockaddr
;
addr
=
(
struct
sockaddr_atmpvc
*
)
sockaddr
;
if
(
addr
->
sap_family
!=
AF_ATMPVC
)
return
-
EAFNOSUPPORT
;
if
(
addr
->
sap_family
!=
AF_ATMPVC
)
return
-
EAFNOSUPPORT
;
lock_sock
(
sk
);
vcc
=
ATM_SD
(
sock
);
vcc
=
ATM_SD
(
sock
);
if
(
!
test_bit
(
ATM_VF_HASQOS
,
&
vcc
->
flags
))
return
-
EBADFD
;
if
(
!
test_bit
(
ATM_VF_HASQOS
,
&
vcc
->
flags
))
{
error
=
-
EBADFD
;
goto
out
;
}
if
(
test_bit
(
ATM_VF_PARTIAL
,
&
vcc
->
flags
))
{
if
(
test_bit
(
ATM_VF_PARTIAL
,
&
vcc
->
flags
))
{
if
(
vcc
->
vpi
!=
ATM_VPI_UNSPEC
)
addr
->
sap_addr
.
vpi
=
vcc
->
vpi
;
if
(
vcc
->
vpi
!=
ATM_VPI_UNSPEC
)
addr
->
sap_addr
.
vpi
=
vcc
->
vpi
;
if
(
vcc
->
vci
!=
ATM_VCI_UNSPEC
)
addr
->
sap_addr
.
vci
=
vcc
->
vci
;
if
(
vcc
->
vci
!=
ATM_VCI_UNSPEC
)
addr
->
sap_addr
.
vci
=
vcc
->
vci
;
}
}
return
atm_connect
(
sock
,
addr
->
sap_addr
.
itf
,
addr
->
sap_addr
.
vpi
,
error
=
vcc_connect
(
sock
,
addr
->
sap_addr
.
itf
,
addr
->
sap_addr
.
vpi
,
addr
->
sap_addr
.
vci
);
addr
->
sap_addr
.
vci
);
out:
release_sock
(
sk
);
return
error
;
}
}
...
@@ -54,6 +63,31 @@ static int pvc_connect(struct socket *sock,struct sockaddr *sockaddr,
...
@@ -54,6 +63,31 @@ static int pvc_connect(struct socket *sock,struct sockaddr *sockaddr,
return
pvc_bind
(
sock
,
sockaddr
,
sockaddr_len
);
return
pvc_bind
(
sock
,
sockaddr
,
sockaddr_len
);
}
}
static
int
pvc_setsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
)
{
struct
sock
*
sk
=
sock
->
sk
;
int
error
;
lock_sock
(
sk
);
error
=
vcc_setsockopt
(
sock
,
level
,
optname
,
optval
,
optlen
);
release_sock
(
sk
);
return
error
;
}
static
int
pvc_getsockopt
(
struct
socket
*
sock
,
int
level
,
int
optname
,
char
*
optval
,
int
*
optlen
)
{
struct
sock
*
sk
=
sock
->
sk
;
int
error
;
lock_sock
(
sk
);
error
=
vcc_getsockopt
(
sock
,
level
,
optname
,
optval
,
optlen
);
release_sock
(
sk
);
return
error
;
}
static
int
pvc_getname
(
struct
socket
*
sock
,
struct
sockaddr
*
sockaddr
,
static
int
pvc_getname
(
struct
socket
*
sock
,
struct
sockaddr
*
sockaddr
,
int
*
sockaddr_len
,
int
peer
)
int
*
sockaddr_len
,
int
peer
)
...
@@ -72,7 +106,7 @@ static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr,
...
@@ -72,7 +106,7 @@ static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr,
}
}
static
struct
proto_ops
SOCKOPS_WRAPPED
(
pvc_proto_ops
)
=
{
static
struct
proto_ops
pvc_proto_ops
=
{
.
family
=
PF_ATMPVC
,
.
family
=
PF_ATMPVC
,
.
release
=
atm_release
,
.
release
=
atm_release
,
...
@@ -85,19 +119,15 @@ static struct proto_ops SOCKOPS_WRAPPED(pvc_proto_ops) = {
...
@@ -85,19 +119,15 @@ static struct proto_ops SOCKOPS_WRAPPED(pvc_proto_ops) = {
.
ioctl
=
vcc_ioctl
,
.
ioctl
=
vcc_ioctl
,
.
listen
=
sock_no_listen
,
.
listen
=
sock_no_listen
,
.
shutdown
=
pvc_shutdown
,
.
shutdown
=
pvc_shutdown
,
.
setsockopt
=
atm
_setsockopt
,
.
setsockopt
=
pvc
_setsockopt
,
.
getsockopt
=
atm
_getsockopt
,
.
getsockopt
=
pvc
_getsockopt
,
.
sendmsg
=
atm
_sendmsg
,
.
sendmsg
=
vcc
_sendmsg
,
.
recvmsg
=
atm
_recvmsg
,
.
recvmsg
=
vcc
_recvmsg
,
.
mmap
=
sock_no_mmap
,
.
mmap
=
sock_no_mmap
,
.
sendpage
=
sock_no_sendpage
,
.
sendpage
=
sock_no_sendpage
,
};
};
#include <linux/smp_lock.h>
SOCKOPS_WRAP
(
pvc_proto
,
PF_ATMPVC
);
static
int
pvc_create
(
struct
socket
*
sock
,
int
protocol
)
static
int
pvc_create
(
struct
socket
*
sock
,
int
protocol
)
{
{
sock
->
ops
=
&
pvc_proto_ops
;
sock
->
ops
=
&
pvc_proto_ops
;
...
...
net/atm/signaling.c
View file @
f6932f56
...
@@ -124,14 +124,16 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
...
@@ -124,14 +124,16 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
clear_bit
(
ATM_VF_REGIS
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_REGIS
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_READY
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_READY
,
&
vcc
->
flags
);
vcc
->
reply
=
msg
->
reply
;
vcc
->
reply
=
msg
->
reply
;
vcc
->
sk
->
sk_err
=
-
msg
->
reply
;
break
;
break
;
case
as_indicate
:
case
as_indicate
:
vcc
=
*
(
struct
atm_vcc
**
)
&
msg
->
listen_vcc
;
vcc
=
*
(
struct
atm_vcc
**
)
&
msg
->
listen_vcc
;
DPRINTK
(
"as_indicate!!!
\n
"
);
DPRINTK
(
"as_indicate!!!
\n
"
);
lock_sock
(
vcc
->
sk
);
if
(
vcc
->
sk
->
sk_ack_backlog
==
if
(
vcc
->
sk
->
sk_ack_backlog
==
vcc
->
sk
->
sk_max_ack_backlog
)
{
vcc
->
sk
->
sk_max_ack_backlog
)
{
sigd_enq
(
0
,
as_reject
,
vcc
,
NULL
,
NULL
);
sigd_enq
(
0
,
as_reject
,
vcc
,
NULL
,
NULL
);
return
0
;
goto
as_indicate_complete
;
}
}
vcc
->
sk
->
sk_ack_backlog
++
;
vcc
->
sk
->
sk_ack_backlog
++
;
skb_queue_tail
(
&
vcc
->
sk
->
sk_receive_queue
,
skb
);
skb_queue_tail
(
&
vcc
->
sk
->
sk_receive_queue
,
skb
);
...
@@ -140,11 +142,14 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
...
@@ -140,11 +142,14 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
&
vcc
->
sleep
);
&
vcc
->
sleep
);
vcc
->
callback
(
vcc
);
vcc
->
callback
(
vcc
);
}
}
as_indicate_complete:
release_sock
(
vcc
->
sk
);
return
0
;
return
0
;
case
as_close
:
case
as_close
:
set_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
);
set_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_READY
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_READY
,
&
vcc
->
flags
);
vcc
->
reply
=
msg
->
reply
;
vcc
->
reply
=
msg
->
reply
;
vcc
->
sk
->
sk_err
=
-
msg
->
reply
;
break
;
break
;
case
as_modify
:
case
as_modify
:
modify_qos
(
vcc
,
msg
);
modify_qos
(
vcc
,
msg
);
...
@@ -202,6 +207,7 @@ static void purge_vccs(struct atm_vcc *vcc)
...
@@ -202,6 +207,7 @@ static void purge_vccs(struct atm_vcc *vcc)
!
test_bit
(
ATM_VF_META
,
&
vcc
->
flags
))
{
!
test_bit
(
ATM_VF_META
,
&
vcc
->
flags
))
{
set_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
);
set_bit
(
ATM_VF_RELEASED
,
&
vcc
->
flags
);
vcc
->
reply
=
-
EUNATCH
;
vcc
->
reply
=
-
EUNATCH
;
vcc
->
sk
->
sk_err
=
EUNATCH
;
wake_up
(
&
vcc
->
sleep
);
wake_up
(
&
vcc
->
sleep
);
}
}
vcc
=
vcc
->
next
;
vcc
=
vcc
->
next
;
...
...
net/atm/svc.c
View file @
f6932f56
This diff is collapsed.
Click to expand it.
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