From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta1.migadu.com (out-185.mta1.migadu.com [95.215.58.185]) (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 344B238C for ; Sat, 14 Dec 2024 00:14:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734135262; cv=none; b=INXBeumgDKVJWxtSo412TtDX3hrIXZfWxbhZ4QuibsamETKw6ihuXuSLfCjB1QTITSIswZ7VJfU+51HbWbXm5HlWGYS5sy76rha3kj66KPSi2pyA7+WilOsb43P7JiDigwB4nas2icLwUy6l0tgqRs/kSw75jsGR1cPPFEkdxck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734135262; c=relaxed/simple; bh=jYAGYgV2QzgVZgzyJaAliZuzkuC1P4ijjgr0LDq11GE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H5HtlY8xoO7Cz5ApuSKqldJ54xYTjnQx93/z5InAtRhcl8s2w0pVbV2Tb9zooHf7nF/eV+kjrmvmAv7svk/4N067evuWx4wNWpAfx/IKJVfFDS5kPDVOgVf/f5E3FkR+4s5bmdolzjP3HZGw5VXkvGbhyhkq2A7ikN6DttqOZ9A= 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=n4N1oCBY; arc=none smtp.client-ip=95.215.58.185 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="n4N1oCBY" Message-ID: <14464b87-aaf4-4879-89ae-2006c1024fab@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1734135257; 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=0hGm1A6WsQy1HIgrzcczkWT2uU87XdknA/NOjCfb4Ig=; b=n4N1oCBYtgyVQRZpYYXr7E0dkM8BQfIBG2DpLS3txL5bpc7vK0QK4u0rdK8sngNHvp5j4b GlMEgkaJ2CzFTMZdnrI1NUplh27xGlIXAxT7mpW0GJMwy7qvfhIpj9tdfEWI+a+0E6C928 5YRUsrZ+9M+4O6mMhIaRIksgp3PO29c= Date: Fri, 13 Dec 2024 16:14:05 -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 v4 11/11] bpf: add simple bpf tests in the tx path for so_timstamping feature To: Jason Xing Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, dsahern@kernel.org, willemdebruijn.kernel@gmail.com, willemb@google.com, 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, bpf@vger.kernel.org, netdev@vger.kernel.org, Jason Xing References: <20241207173803.90744-1-kerneljasonxing@gmail.com> <20241207173803.90744-12-kerneljasonxing@gmail.com> <65a83b0e-5547-408a-a081-083ffd9d1c91@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: 7bit X-Migadu-Flow: FLOW_OUT On 12/13/24 8:02 AM, Jason Xing wrote: >>> +static u64 delay_tolerance_nsec = 5000000; >> >> If I count right, 5ms may not a lot for the bpf CI and the test could become >> flaky. Probably good enough to ensure the delay is larger than the previous one. > > You're right, initially I set 2ms which make the test flaky. How about > 20ms? We cannot ensure each delta (calculated between two tx points) > is larger than the previous one. or I was thinking the delay is always measured from sendmsg_ns. Regardless, whatever way the delay of a tx point is measured from (always from sendmsg_ns or from the previous tx point), it can also just check the measured delay is +ve or something like that instead of having a hard coded maximum delay here. The following "struct delay_info" may not be the best. Feel free to adjust. >> struct delay_info { >> u64 sendmsg_ns; >> u32 sched_delay; /* SCHED_OPT_CB - sendmsg_ns */ >> u32 sw_snd_delay; >> u32 ack_delay; >> };