From f2c0eb23885eaec8eca9fcdaac34d51b7dd477d5 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 3 May 2024 01:30:32 -0700 Subject: [PATCH] athenad: set TOS field for proxy WebSocket (#32337) set TOS old-commit-hash: d7d31112121412cfdb9be5da2b61a9bbb2ee2a5a --- selfdrive/athena/athenad.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/athena/athenad.py b/selfdrive/athena/athenad.py index 505a9ae28b..9eec7a931b 100755 --- a/selfdrive/athena/athenad.py +++ b/selfdrive/athena/athenad.py @@ -467,6 +467,10 @@ def startLocalProxy(global_end_event: threading.Event, remote_ws_uri: str, local cookie="jwt=" + identity_token, enable_multithread=True) + # Set TOS to keep connection responsive while under load. + # DSCP of 36/HDD_LINUX_AC_VI with the minimum delay flag + ws.sock.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 0x90) + ssock, csock = socket.socketpair() local_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) local_sock.connect(('127.0.0.1', local_port))