From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FFMrZvSO; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 7E1B05A026F for ; Mon, 13 Oct 2025 12:31:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760351493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TwVEvGzbxL9X0mxl9Wk8wshnsfJsn1FDLtvWSeqN5ow=; b=FFMrZvSOsM+lhN6jYz1EsqtJbNRQO6TGAAX1A29nPnCBIErR0jOioG1iXFngaL25YqtPZx erABzyCR/Lyaeryw+aP1phdaqVcjnAVgKgqkLhvwx59TleexHnZ3rLIBK/sGHBefuJ4qKs H5O7Vzso2uLyw0w4iDw1CO9P83x4YG0= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-dMYEiGqXPpOhmE5HEqNQ3A-1; Mon, 13 Oct 2025 06:31:32 -0400 X-MC-Unique: dMYEiGqXPpOhmE5HEqNQ3A-1 X-Mimecast-MFC-AGG-ID: dMYEiGqXPpOhmE5HEqNQ3A_1760351491 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-40cfb98eddbso2264904f8f.0 for ; Mon, 13 Oct 2025 03:31:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760351491; x=1760956291; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TwVEvGzbxL9X0mxl9Wk8wshnsfJsn1FDLtvWSeqN5ow=; b=jGIXvllM7vOI9Vt7+rRSNe0XyuvS082pO2kbIvxD/MX4C1SQrZeRc3OtjKG6//A2F6 9gOq2YFN5iAuqMSImqR3zcm4I1lrKhLt6602nGsVo5BTOStCoTEYMRA4Wn9aC/6Y361p K+yXyRBWEYbfuoiR6TlhwakHkRhbgVFLlg1beY5nCzQhCQqUM9kWwtJce35E402eGZ4p 3RqHBIskBsAnOVy/7oXorbN8eOdaQCl9GE1FZ7xGd2bhsXBtfMS0pJiLvim92Zx5WNSt u8SmgsJVYIjD0HWcUh526OmkbyEIaTxj/U16ARw2AFk+dsc1CHvTZ7Asb6ysENjtpbnz z7Pw== X-Forwarded-Encrypted: i=1; AJvYcCUK7O9drlSVfQS0BtHT5ZdBDx2R24iMG1eNb+hIDmeEdiHFHSsJjm3SrKkigRrHA2xxwgqI/quw4lI=@passt.top X-Gm-Message-State: AOJu0Yycznmtcxae2TmkmUF8ssgIXzGT9duKFKKu2UlTTBkTBMOcL0y2 Fn8RQgdUvuTNzohxWiB7a5bZzhoFj8Gc6l8CiKjJWURU6tAJxUE2c0RgR9smN/wNXb8LtXbwluo BRCe2FbYRhzzfA52RmPc1T2I0/EumiTxZn5cHVg8ylO5YlqKtgO4pnQ== X-Gm-Gg: ASbGncvd4BzlUJjMwiZICpdWq/tzySJ37+7v3NKUzDCE0hHLMTMCtPM1NmjIYHF03Zk 4D4YMnFc/dJ/pb8kRrAbK0MS/zH3bjjpmamLr5eyZdnLxtrF5JnVpNTbDAfew6ml542cxuiZKzN MM0IyLjtvq3C1OEJ5QN0GGkmMmJAjkaPu3HJCfDGyO3JNGVniSI0vVrMI8W1ZOyvEC2UPn1IKnc jM/Cg3G/7FUEG6omptAQg6ZbK7eMSBMR2zn6hIa9F4U2+c4CuzuNMTjbAiaoO+9yLmtsIOndNfc Qhm4KmtmrRChZNq8NDzEh2g1891wkaGqc2PxzK4f7yabvYAB6IHG8wnwlyAaesQwq6N/ X-Received: by 2002:a05:6000:40c8:b0:410:f600:c35e with SMTP id ffacd0b85a97d-425829b0561mr14133253f8f.8.1760351490908; Mon, 13 Oct 2025 03:31:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNoqqDFep+c/iy8RRCaxK6EIr+hbnaDH7GCkBnHW5oSd9SWDvn9CJVbFQok1cobUvceY1Lyw== X-Received: by 2002:a05:6000:40c8:b0:410:f600:c35e with SMTP id ffacd0b85a97d-425829b0561mr14133236f8f.8.1760351490482; Mon, 13 Oct 2025 03:31:30 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-426ce57cd11sm17927141f8f.5.2025.10.13.03.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Oct 2025 03:31:29 -0700 (PDT) Date: Mon, 13 Oct 2025 12:31:25 +0200 From: Stefano Brivio To: Yumei Huang Subject: Re: [PATCH v2 2/3] tcp: Resend SYN for inbound connections Message-ID: <20251013123125.6bcc8b9d@elisabeth> In-Reply-To: References: <20251010074700.22177-1-yuhuang@redhat.com> <20251010074700.22177-3-yuhuang@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: BYgJ-ANv1d-07sDzU2szD3i9uy3l1uWMarH_vhYFaV4_1760351491 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OFCDAIDJ4AXRJCXFYP2H6QXO2FVKFEUR X-Message-ID-Hash: OFCDAIDJ4AXRJCXFYP2H6QXO2FVKFEUR X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson , passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 13 Oct 2025 18:22:00 +0800 Yumei Huang wrote: > On Mon, Oct 13, 2025 at 8:21=E2=80=AFAM David Gibson > wrote: > > > > On Fri, Oct 10, 2025 at 03:46:59PM +0800, Yumei Huang wrote: =20 > > > > > > +/** > > > + * get_tcp_syn_param() - Read SYN parameters from /proc/sys > > > + * @path: Path to the sysctl file > > > + * @fallback: Default value if file can't be read > > > + * > > > + * Return: Parameter value, fallback on failure > > > +*/ > > > +int get_tcp_syn_param(const char *path, int fallback) =20 > > > > I wonder if it might be worth making a new function in util.c to read > > a file containing a single number. =20 >=20 > I can do that. So it could be reused in the future. If it helps: we already have write_file(), so it might be worth adding a read_file() symmetric to it. Maybe it's overkill though. --=20 Stefano