Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/2 Parser implementation (#309). #1368

Merged
merged 69 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
71d7b7a
HTTP/2 Parser implementation (#309).
aleksostapenko Oct 16, 2019
dc71702
HTTP/2 Parser implementation (#309):
aleksostapenko Oct 30, 2019
b5658be
HTTP/2 Parser implementation: some comments added for HPACK functiona…
aleksostapenko Oct 30, 2019
9a57b1f
HTTP/2 Parser implementation: numerous corrections and cleanups (#309).
aleksostapenko Oct 31, 2019
8f9a906
HTTP/2 Parser implementation: removal of outdated (already done) 'TOD…
aleksostapenko Oct 31, 2019
fb7c80f
HTTP/2 Parser implementation (#309):
aleksostapenko Nov 4, 2019
e50d74d
HTTP/2 Parser implementation: redesign of HTTP/1.1=>HTTP/2 transforma…
aleksostapenko Nov 12, 2019
c935484
HTTP/2 Parser implementation: corrections according to debugging resu…
aleksostapenko Nov 21, 2019
f2e01bd
HTTP/2 Parser implementation: corrections in internal response genera…
aleksostapenko Nov 22, 2019
c692adb
bump copyrights
vankoven Dec 4, 2019
dae477a
Divide TfwStr flags and HPACK index members
vankoven Dec 4, 2019
8849e87
Fix compile-time issues with 'stack frame non-standard' warnings
vankoven Dec 4, 2019
ae7ce40
Update code comments
vankoven Dec 4, 2019
e9bf486
Update Linux kernel patch
vankoven Dec 4, 2019
e8b1f87
Remove unneeded ss_skb_data() function
vankoven Dec 4, 2019
266581d
Minor style fixups
vankoven Dec 4, 2019
45c9eba
Generate HPACK header on compiletime
vankoven Dec 4, 2019
7b1cce0
Merge branch 'master' into ik-1369-merge-master
vankoven Dec 6, 2019
fd48c6e
Resolve merge issues
vankoven Dec 17, 2019
80d2d4a
Fail test if parsed string was composed incorrectly, don't crash
vankoven Dec 17, 2019
b1e6a11
port changes from avb-1202 to http2
vankoven Dec 17, 2019
0620349
Set-cookie was added in two branches with different processing, resol…
vankoven Dec 17, 2019
d4c682d
Add HPACK generator and generated file
krizhanovsky Dec 17, 2019
c67a387
Fix some small comments
krizhanovsky Dec 17, 2019
a5519f8
Hpack state machine table in no more generated, product of generated …
vankoven Dec 17, 2019
5c77db5
port method override detection feature to HTTP2
vankoven Dec 17, 2019
a7de0eb
Fix pointer assignment
vankoven Dec 17, 2019
db602d2
replace bug_on with warn_on
vankoven Dec 29, 2019
54fab94
Port parsing accept header according to rfc to http2
vankoven Dec 29, 2019
82b7376
Port encoding headers to Huffman encoding
vankoven Dec 29, 2019
66752e4
Remove unneeded template file
vankoven Dec 29, 2019
2d2480b
Add tests for huffman encoding
vankoven Dec 30, 2019
4d7eb66
Add unit tests for hufman encoding
vankoven Dec 30, 2019
d647d63
Fix code review comments
vankoven Dec 30, 2019
1d15fab
Merge pull request #1373 from tempesta-tech/ik-1368-additions
vankoven Dec 30, 2019
d306c1b
Fix request h2 -> http1.1 conversion
vankoven Dec 18, 2019
0d6e7c6
Fix code review comments
vankoven Dec 30, 2019
1b15a89
Update saver pointer ht after tfw_http_msg_grow_hdr_tbl() calls
vankoven Dec 31, 2019
9a4c20c
Fix setting local headers
vankoven Dec 31, 2019
b4e2719
fix header calculations
vankoven Jan 3, 2020
ebe2b83
Fix h2 fsm transitions
vankoven Jan 5, 2020
06d75c2
Don't close h2 request body until it's fully received
vankoven Jan 9, 2020
bee3246
Fix moving request body on h2->h1 transformation
vankoven Jan 9, 2020
a31df74
Fix crash on debug builds
vankoven Jan 9, 2020
04c0fc9
Add todo: split message into multiple frames
vankoven Jan 9, 2020
f9c1644
Add todo: h2 protocol requires lower case headers, not mixed case
vankoven Jan 9, 2020
2ad4c3f
h2: content-length is extra header, don't block messages if it's absent
vankoven Jan 10, 2020
2b69ff4
h2: close connection if remote sends too huge frames
vankoven Jan 11, 2020
e6b400d
Fix null pointer dereference on modifications on h1 headers and incor…
vankoven Jan 11, 2020
e257d63
h2: check settings before apply them. Reject if limits defined in RFC…
vankoven Jan 11, 2020
ee0dced
Add issue number for TODOs
vankoven Jan 11, 2020
6849d75
Update macro documentations
vankoven Jan 11, 2020
3cb5ec0
h2: Add several TODO comments
vankoven Jan 11, 2020
f91139f
h2: fix too early fsm update for CONTINUATION frames
vankoven Jan 11, 2020
e7bd235
h2: Improve check for mandatory pseudo headers presense
vankoven Jan 11, 2020
c114bed
Fix code review comments
vankoven Jan 21, 2020
f010557
Merge pull request #1374 from tempesta-tech/ik-fix-req-2-to-1-transform
vankoven Jan 21, 2020
c721aaa
HTTP/2 Parser implementation: HTTP/2-cache (#309).
aleksostapenko Feb 18, 2020
4dec0e8
HTTP/2: changes in processing of headers strings (#309).
aleksostapenko Feb 27, 2020
2d7bb75
HTTP/2: fix duplicate headers processing during response forwarding (…
aleksostapenko Feb 29, 2020
b5e71ac
HTTP/2: add header name tracking into the headers' compare procedure …
aleksostapenko Mar 1, 2020
4f0cdd1
HTTP/2: corrections according review comments (#309).
aleksostapenko Mar 2, 2020
bb502ae
h2 parser: reduce number of compare operators during headers parsing
vankoven Mar 1, 2020
2585ef9
If listening for http/1.1 mode print performance warning
vankoven Mar 1, 2020
a841f0b
Bump copyrights
vankoven Mar 3, 2020
5b7ecb5
Merge pull request #1385 from tempesta-tech/ik-h2-parser-updates
vankoven Mar 3, 2020
4f43032
HTTP/2: evict redundant space during response status-line creation fr…
aleksostapenko Mar 4, 2020
6164968
HTTP/2: corrections according additional review comments (#309).
aleksostapenko Mar 4, 2020
7b4fc72
Merge pull request #1383 from tempesta-tech/ao-309-parser-transformat…
aleksostapenko Mar 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions linux-4.14.32.patch
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,10 @@ index caeb159a..274c6cc0 100644
struct kvec;

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 46bf7cc7..b698c645 100644
index 46bf7cc7..cc55a4f5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -148,11 +148,22 @@ static inline bool dev_xmit_complete(int rc)
@@ -148,11 +148,32 @@ static inline bool dev_xmit_complete(int rc)
# define LL_MAX_HEADER 32
#endif

Expand All @@ -529,17 +529,27 @@ index 46bf7cc7..b698c645 100644
+ * movement on tcp_write_xmit(). Not all skbs have TLS headers - not a big deal
+ * to allocate 16 more bytes (5 - TLS header, 8 - IV, 3 - alignment).
+ */
+#define TLS_MAX_HDR 16
+#define TLS_MAX_HDR 16
+/*
+ * For fast transformation of HTTP/1.1 responses into HTTP/2 format, Tempesta
+ * uses zero-copy in-place rewriting of the response data, right in original
+ * skb. HTTP/2 data is almost always smaller of its source HTTP/1.1 data, but
+ * for the sake of robustness we use 32-byte initial offset in front of skb
+ * data. Thus, in order to guarantee the stack headers to fit, we should
+ * increase the total space for them.
+ */
+#define HTTP2_MAX_OFFSET 32
+#else
+#define TLS_MAX_HDR 0
+#define TLS_MAX_HDR 0
+#define HTTP2_MAX_OFFSET 0
+#endif
#if !IS_ENABLED(CONFIG_NET_IPIP) && !IS_ENABLED(CONFIG_NET_IPGRE) && \
!IS_ENABLED(CONFIG_IPV6_SIT) && !IS_ENABLED(CONFIG_IPV6_TUNNEL)
-#define MAX_HEADER LL_MAX_HEADER
+#define MAX_HEADER (LL_MAX_HEADER + TLS_MAX_HDR)
+#define MAX_HEADER (LL_MAX_HEADER + TLS_MAX_HDR + HTTP2_MAX_OFFSET)
#else
-#define MAX_HEADER (LL_MAX_HEADER + 48)
+#define MAX_HEADER (LL_MAX_HEADER + 48 + TLS_MAX_HDR)
+#define MAX_HEADER (LL_MAX_HEADER + 48 + TLS_MAX_HDR + HTTP2_MAX_OFFSET)
#endif

/*
Expand Down Expand Up @@ -892,7 +902,7 @@ index e89c3b0c..7715cad7 100644
restart:
/* Reset the pending bitmask before enabling irqs */
set_softirq_pending(0);
@@ -305,6 +310,9 @@ restart:
@@ -305,6 +310,9 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
wakeup_softirqd();
}

Expand Down Expand Up @@ -1300,7 +1310,7 @@ index 564beb7e..92e9a635 100644
/*
* kmalloc_reserve is a wrapper around kmalloc_node_track_caller that tells
* the caller if emergency pfmemalloc reserves are being used. If it is and
@@ -150,6 +153,219 @@ out:
@@ -150,6 +153,219 @@ static void *__kmalloc_reserve(size_t size, gfp_t flags, int node,

return obj;
}
Expand Down Expand Up @@ -1520,7 +1530,7 @@ index 564beb7e..92e9a635 100644

/* Allocate a new skbuff. We do this ourselves so we can fill in a few
* 'private' fields and also do memory statistics to find all the
@@ -174,11 +390,11 @@ out:
@@ -174,11 +390,11 @@ static void *__kmalloc_reserve(size_t size, gfp_t flags, int node,
* Buffers may only be allocated from interrupts using a @gfp_mask of
* %GFP_ATOMIC.
*/
Expand Down Expand Up @@ -1573,7 +1583,7 @@ index 564beb7e..92e9a635 100644
out:
return skb;
nodata:
@@ -251,6 +436,42 @@ nodata:
@@ -251,6 +436,42 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
skb = NULL;
goto out;
}
Expand Down Expand Up @@ -1950,7 +1960,7 @@ diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index e7d15fb0..09a21845 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -616,7 +616,8 @@ other_parity_scan:
@@ -616,7 +616,8 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
goto ok;
next_port:
spin_unlock_bh(&head->lock);
Expand Down Expand Up @@ -2089,7 +2099,7 @@ diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 14474ace..73325b48 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -654,6 +654,7 @@ new_measure:
@@ -654,6 +654,7 @@ void tcp_rcv_space_adjust(struct sock *sk)
tp->rcvq_space.seq = tp->copied_seq;
tp->rcvq_space.time = tp->tcp_mstamp;
}
Expand Down
Loading