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
cb746226
Commit
cb746226
authored
Dec 07, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
a886eaab
81563af3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
27 deletions
+41
-27
include/net/act_api.h
include/net/act_api.h
+15
-26
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+26
-1
No files found.
include/net/act_api.h
View file @
cb746226
...
...
@@ -8,15 +8,23 @@
#include <net/sch_generic.h>
#include <net/pkt_sched.h>
#define tca_gen(name) \
struct tcf_##name *next; \
u32 index; \
int refcnt; \
int bindcnt; \
u32 capab; \
int action; \
struct tcf_t tm; \
struct gnet_stats_basic bstats; \
struct gnet_stats_queue qstats; \
struct gnet_stats_rate_est rate_est; \
spinlock_t *stats_lock; \
spinlock_t lock
struct
tcf_police
{
struct
tcf_police
*
next
;
int
refcnt
;
#ifdef CONFIG_NET_CLS_ACT
int
bindcnt
;
#endif
u32
index
;
int
action
;
tca_gen
(
police
);
int
result
;
u32
ewma_rate
;
u32
burst
;
...
...
@@ -24,33 +32,14 @@ struct tcf_police
u32
toks
;
u32
ptoks
;
psched_time_t
t_c
;
spinlock_t
lock
;
struct
qdisc_rate_table
*
R_tab
;
struct
qdisc_rate_table
*
P_tab
;
struct
gnet_stats_basic
bstats
;
struct
gnet_stats_queue
qstats
;
struct
gnet_stats_rate_est
rate_est
;
spinlock_t
*
stats_lock
;
};
#ifdef CONFIG_NET_CLS_ACT
#define ACT_P_CREATED 1
#define ACT_P_DELETED 1
#define tca_gen(name) \
struct tcf_##name *next; \
u32 index; \
int refcnt; \
int bindcnt; \
u32 capab; \
int action; \
struct tcf_t tm; \
struct gnet_stats_basic bstats; \
struct gnet_stats_queue qstats; \
struct gnet_stats_rate_est rate_est; \
spinlock_t *stats_lock; \
spinlock_t lock
struct
tcf_act_hdr
{
...
...
net/ipv4/af_inet.c
View file @
cb746226
...
...
@@ -821,6 +821,31 @@ struct proto_ops inet_dgram_ops = {
.
sendpage
=
inet_sendpage
,
};
/*
* For SOCK_RAW sockets; should be the same as inet_dgram_ops but without
* udp_poll
*/
static
struct
proto_ops
inet_sockraw_ops
=
{
.
family
=
PF_INET
,
.
owner
=
THIS_MODULE
,
.
release
=
inet_release
,
.
bind
=
inet_bind
,
.
connect
=
inet_dgram_connect
,
.
socketpair
=
sock_no_socketpair
,
.
accept
=
sock_no_accept
,
.
getname
=
inet_getname
,
.
poll
=
datagram_poll
,
.
ioctl
=
inet_ioctl
,
.
listen
=
sock_no_listen
,
.
shutdown
=
inet_shutdown
,
.
setsockopt
=
sock_common_setsockopt
,
.
getsockopt
=
sock_common_getsockopt
,
.
sendmsg
=
inet_sendmsg
,
.
recvmsg
=
sock_common_recvmsg
,
.
mmap
=
sock_no_mmap
,
.
sendpage
=
inet_sendpage
,
};
static
struct
net_proto_family
inet_family_ops
=
{
.
family
=
PF_INET
,
.
create
=
inet_create
,
...
...
@@ -861,7 +886,7 @@ static struct inet_protosw inetsw_array[] =
.
type
=
SOCK_RAW
,
.
protocol
=
IPPROTO_IP
,
/* wild card */
.
prot
=
&
raw_prot
,
.
ops
=
&
inet_
dgram
_ops
,
.
ops
=
&
inet_
sockraw
_ops
,
.
capability
=
CAP_NET_RAW
,
.
no_check
=
UDP_CSUM_DEFAULT
,
.
flags
=
INET_PROTOSW_REUSE
,
...
...
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