Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
0dec0492
Commit
0dec0492
authored
Aug 09, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove priority adjustment for a DATA frame
Simply it does not work as expected.
parent
f5b19744
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
41 deletions
+0
-41
lib/nghttp2_outbound_item.h
lib/nghttp2_outbound_item.h
+0
-16
lib/nghttp2_session.c
lib/nghttp2_session.c
+0
-25
No files found.
lib/nghttp2_outbound_item.h
View file @
0dec0492
...
...
@@ -34,10 +34,6 @@
/* Priority for PING */
#define NGHTTP2_OB_PRI_PING -10
/* Priority for CREDENTIAL */
#define NGHTTP2_OB_PRI_CREDENTIAL -2
/* Priority for the frame which must be sent after CREDENTIAL */
#define NGHTTP2_OB_PRI_AFTER_CREDENTIAL -1
typedef
struct
{
nghttp2_data_provider
*
data_prd
;
...
...
@@ -50,19 +46,7 @@ typedef struct {
nghttp2_frame_category
frame_cat
;
void
*
frame
;
void
*
aux_data
;
/* Initial priority of this item */
int
inipri
;
/* The current priority of this item. Initially, pri equals to
inipri. The item is chosen from the queue based on pri and
seq. For control frames, they consist of just 1 frame and pri
does not change. For DATA frame, they could split up to several
frames. After sending a frame, the pri becomes |inipri| +
|pridecay| and |pridecay| is multiplied by 2. If it becomes more
than lowest priority, then it returns back to |inipri| and do the
same sequence again and again. By doing this, the higher priority
long DATA frames don't starve the lower prioritized streams. */
int
pri
;
uint32_t
pridecay
;
int64_t
seq
;
}
nghttp2_outbound_item
;
...
...
lib/nghttp2_session.c
View file @
0dec0492
...
...
@@ -415,8 +415,6 @@ int nghttp2_session_add_frame(nghttp2_session *session,
free
(
item
);
return
r
;
}
item
->
inipri
=
item
->
pri
;
item
->
pridecay
=
1
;
return
0
;
}
...
...
@@ -1193,28 +1191,6 @@ nghttp2_outbound_item* nghttp2_session_pop_next_ob_item
}
}
/*
* Adjust priority of item so that the higher priority long DATA
* frames don't starve lower priority streams.
*/
static
void
nghttp2_outbound_item_adjust_pri
(
nghttp2_session
*
session
,
nghttp2_outbound_item
*
item
)
{
if
(
item
->
pri
==
NGHTTP2_PRI_LOWEST
)
{
nghttp2_stream
*
stream
;
stream
=
nghttp2_session_get_stream
(
session
,
nghttp2_outbound_item_get_data_frame
(
item
)
->
hd
.
stream_id
);
assert
(
stream
);
item
->
pri
=
item
->
inipri
=
stream
->
pri
;
item
->
pridecay
=
1
;
}
else
if
(
item
->
pri
+
item
->
pridecay
>
NGHTTP2_PRI_LOWEST
)
{
item
->
pri
=
NGHTTP2_PRI_LOWEST
;
}
else
{
item
->
pri
=
item
->
inipri
+
item
->
pridecay
;
item
->
pridecay
*=
2
;
}
}
/*
* Called after a frame is sent.
*
...
...
@@ -1368,7 +1344,6 @@ static int nghttp2_session_after_frame_sent(nghttp2_session *session)
}
else
{
nghttp2_outbound_item
*
next_item
;
next_item
=
nghttp2_session_get_next_ob_item
(
session
);
nghttp2_outbound_item_adjust_pri
(
session
,
session
->
aob
.
item
);
/* If priority of this stream is higher or equal to other stream
waiting at the top of the queue, we continue to send this
data. */
...
...
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