aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.h
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-11-21 16:45:30 +0100
committerDave Wallace <dwallacelf@gmail.com>2019-11-22 21:10:53 +0000
commitf9623ca21f354cb3ed2a03e2ed7ac9ad2a953ba6 (patch)
tree90f49978ae68a8906136280d619d4c6bb6ee5bcc /src/plugins/quic/quic.h
parentb2fce36c8ebd19bd9a60b06988ce753d93e59d81 (diff)
quic: Refactor quic rx callback for offload
Type: refactor Change-Id: I1d90c8807e7eea4a77403bafc0628ec0d393c572 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/quic/quic.h')
-rw-r--r--src/plugins/quic/quic.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/quic/quic.h b/src/plugins/quic/quic.h
index 35b51a502bc..29d5224cdec 100644
--- a/src/plugins/quic/quic.h
+++ b/src/plugins/quic/quic.h
@@ -41,6 +41,9 @@
#define QUIC_DEFAULT_FIFO_SIZE (64 << 10)
#define QUIC_SEND_PACKET_VEC_SIZE 16
+#define QUIC_SEND_MAX_BATCH_PACKETS 16
+#define QUIC_RCV_MAX_BATCH_PACKETS 16
+
/* Taken from quicly.c */
#define QUICLY_QUIC_BIT 0x40
@@ -91,6 +94,15 @@ typedef enum quic_ctx_conn_state_
QUIC_CONN_STATE_ACTIVE_CLOSING,
} quic_ctx_conn_state_t;
+typedef enum quic_packet_type_
+{
+ QUIC_PACKET_TYPE_NONE,
+ QUIC_PACKET_TYPE_RECEIVE,
+ QUIC_PACKET_TYPE_MIGRATE,
+ QUIC_PACKET_TYPE_ACCEPT,
+ QUIC_PACKET_TYPE_RESET,
+ QUIC_PACKET_TYPE_DROP,
+} quic_packet_type_t;
typedef enum quic_ctx_flags_
{
@@ -169,6 +181,14 @@ typedef struct quic_rx_packet_ctx_
u8 data[QUIC_MAX_PACKET_SIZE];
u32 ctx_index;
u32 thread_index;
+ union
+ {
+ struct sockaddr sa;
+ struct sockaddr_in6 sa6;
+ };
+ socklen_t salen;
+ u8 ptype;
+ session_dgram_hdr_t ph;
} quic_rx_packet_ctx_t;
typedef struct quicly_ctx_data_