mirror of
https://passt.top/passt
synced 2025-07-26 03:27:59 +02:00
tcp, tcp_splice: Avoid double layered dispatch for connected TCP sockets
Currently connected TCP sockets have the same epoll type, whether they're for a "tap" connection or a spliced connection. This means that tcp_sock_handler() has to do a secondary check on the type of the connection to call the right function. We can avoid this by adding a new epoll type and dispatching directly to the right thing. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
70121ca1ec
commit
02e092b4fe
5 changed files with 27 additions and 39 deletions
2
passt.h
2
passt.h
|
@ -51,6 +51,8 @@ enum epoll_type {
|
|||
EPOLL_TYPE_NONE = 0,
|
||||
/* Connected TCP sockets */
|
||||
EPOLL_TYPE_TCP,
|
||||
/* Connected TCP sockets (spliced) */
|
||||
EPOLL_TYPE_TCP_SPLICE,
|
||||
/* Listening TCP sockets */
|
||||
EPOLL_TYPE_TCP_LISTEN,
|
||||
/* timerfds used for TCP timers */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue