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
578fef42
Commit
578fef42
authored
Mar 05, 2004
by
Patrick McHardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PKT_SCHED]: Fix ipv6 ECN marking in RED scheduler.
parent
0242b389
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
+4
-19
net/sched/sch_red.c
net/sched/sch_red.c
+4
-19
No files found.
net/sched/sch_red.c
View file @
578fef42
...
@@ -41,9 +41,6 @@
...
@@ -41,9 +41,6 @@
#include <net/pkt_sched.h>
#include <net/pkt_sched.h>
#include <net/inet_ecn.h>
#include <net/inet_ecn.h>
#define RED_ECN_ECT 0x02
#define RED_ECN_CE 0x01
/* Random Early Detection (RED) algorithm.
/* Random Early Detection (RED) algorithm.
=======================================
=======================================
...
@@ -165,28 +162,16 @@ static int red_ecn_mark(struct sk_buff *skb)
...
@@ -165,28 +162,16 @@ static int red_ecn_mark(struct sk_buff *skb)
switch
(
skb
->
protocol
)
{
switch
(
skb
->
protocol
)
{
case
__constant_htons
(
ETH_P_IP
):
case
__constant_htons
(
ETH_P_IP
):
{
if
(
!
INET_ECN_is_capable
(
skb
->
nh
.
iph
->
tos
))
u8
tos
=
skb
->
nh
.
iph
->
tos
;
if
(
!
(
tos
&
RED_ECN_ECT
))
return
0
;
return
0
;
if
(
INET_ECN_is_not_ce
(
skb
->
nh
.
iph
->
tos
))
if
(
!
(
tos
&
RED_ECN_CE
))
IP_ECN_set_ce
(
skb
->
nh
.
iph
);
IP_ECN_set_ce
(
skb
->
nh
.
iph
);
return
1
;
return
1
;
}
case
__constant_htons
(
ETH_P_IPV6
):
case
__constant_htons
(
ETH_P_IPV6
):
{
if
(
!
INET_ECN_is_capable
(
ip6_get_dsfield
(
skb
->
nh
.
ipv6h
)))
u32
label
=
*
(
u32
*
)
skb
->
nh
.
raw
;
if
(
!
(
label
&
__constant_htonl
(
RED_ECN_ECT
<<
20
)))
return
0
;
return
0
;
label
|=
__constant_htonl
(
RED_ECN_CE
<<
20
);
IP6_ECN_set_ce
(
skb
->
nh
.
ipv6h
);
return
1
;
return
1
;
}
default:
default:
return
0
;
return
0
;
}
}
...
...
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