From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFB3138DD8 for ; Fri, 14 Feb 2025 05:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739511708; cv=none; b=bfP/CW3UUX0Kr2I8r5GNDg9iZmnMR5x2v/KFBygyKs8/nbH6RCI1QPA3euep0CppPKr2liLxhZ7k6uq+x6HLJgRabfAA/Ti5qGqQ9ECO8oqN4gCnBRCWM0g3Q75xutRmEKSvenAPLT/GTpUimpLOSknn9+5NbT7PhomO6rrPAGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739511708; c=relaxed/simple; bh=Xsb9esUm0+ayVJb/etifb2esef39wFPEH3DsH4eTpRg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pTSv4JxrHeVSTfKmVcRrcrtmozQrPkrVBRVc0y6xi2bzKKK0FwuW0MzADMHgkFQfLrjDjHB4K9t8r1abiMPQuaWQM9Oj4QFiJLix5bEGpUUXF7/JsXfaXuQR+cBIyYtUP1NPvY81WipTrty7bkVCbIBwHdF834Sh7ub6cjcFKz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=n3GG1s22; arc=none smtp.client-ip=95.215.58.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="n3GG1s22" Message-ID: <86453e67-d5dc-4565-bdd6-6383273ed819@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1739511702; 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=TT84hWRPExmXf7e19V6ZT16AxO5/10ghKW9bbPmCyQE=; b=n3GG1s22u+iM51d0721CqUTyJoIipzU023LfZGaFQqgt7RBdmasxi/FVjRZ9CeOzQnIyuO su6bUvdrEyVKDGRCBmq4RvtIJK4Ql1STV5NBEhQgR6McONyFsmHvoRbw3e8feXKsLI5ouq luIxYTjD2sn+9eIs0HUIlclr9Rbsoc0= Date: Thu, 13 Feb 2025 21:41:33 -0800 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next 2/3] bpf: add TCP_BPF_RTO_MAX for bpf_setsockopt To: Jason Xing Cc: Stanislav Fomichev , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, dsahern@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org, horms@kernel.org, ncardwell@google.com, kuniyu@amazon.com, bpf@vger.kernel.org, netdev@vger.kernel.org References: <20250213004355.38918-1-kerneljasonxing@gmail.com> <20250213004355.38918-3-kerneljasonxing@gmail.com> <039bfa0d-3d61-488e-9205-bef39499db6e@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 2/13/25 7:09 PM, Jason Xing wrote: > On Fri, Feb 14, 2025 at 10:14 AM Martin KaFai Lau wrote: >> >> On 2/13/25 3:57 PM, Jason Xing wrote: >>> On Fri, Feb 14, 2025 at 7:41 AM Stanislav Fomichev wrote: >>>> On 02/13, Jason Xing wrote: >>>>> Support bpf_setsockopt() to set the maximum value of RTO for >>>>> BPF program. >>>>> >>>>> Signed-off-by: Jason Xing >>>>> --- >>>>> Documentation/networking/ip-sysctl.rst | 3 ++- >>>>> include/uapi/linux/bpf.h | 2 ++ >>>>> net/core/filter.c | 6 ++++++ >>>>> tools/include/uapi/linux/bpf.h | 2 ++ >>>>> 4 files changed, 12 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst >>>>> index 054561f8dcae..78eb0959438a 100644 >>>>> --- a/Documentation/networking/ip-sysctl.rst >>>>> +++ b/Documentation/networking/ip-sysctl.rst >>>>> @@ -1241,7 +1241,8 @@ tcp_rto_min_us - INTEGER >>>>> >>>>> tcp_rto_max_ms - INTEGER >>>>> Maximal TCP retransmission timeout (in ms). >>>>> - Note that TCP_RTO_MAX_MS socket option has higher precedence. >>>>> + Note that TCP_BPF_RTO_MAX and TCP_RTO_MAX_MS socket option have the >>>>> + higher precedence for configuring this setting. >>>> The cover letter needs more explanation about the motivation. >> >> +1 >> >> I haven't looked at the patches. The cover letter has no word on the use case. The question was your _use case_ in bpf. Not what the TCP_RTO_MAX_MS does. Your current use case is to have bpf setting it after reading the tcp header option, like the selftest in patch 3? > > I will add and copy some words from Eric's patch series :) >>> I am targeting the net-next tree because of recent changes[1] made by >>> Eric. It probably hasn't merged into the bpf-next tree. >> >> There is the bpf-next/net tree. It should have the needed changes. > > [1] was recently merged in the net-next tree, so the only one branch I > can target is net-next. > > [1]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=ae9b3c0e79bc > > Am I missing something? There is a net branch: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git