Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp1285598rbe; Fri, 1 Mar 2024 09:24:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUR8ugv1Ny5J6wYu7rHHqRDWVYXYq7fGY5izooI41p3GT4IaSO6UxBSKsum/WfJbiq5y5cwUeGxPxLlav5xhkfiEbyk3AR6x+VQa/GMJw== X-Google-Smtp-Source: AGHT+IEvg/CxkLniM48+lzI5amRN+KYt3hI7VT2Y9D57hj+SEHypAEtGU/5X7/esUkVnibp4aVNu X-Received: by 2002:a17:906:4148:b0:a40:2c33:1f42 with SMTP id l8-20020a170906414800b00a402c331f42mr1877766ejk.15.1709313852881; Fri, 01 Mar 2024 09:24:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709313852; cv=pass; d=google.com; s=arc-20160816; b=YMvL7TzKyfv2CkkfkJzvZF7GqLmb8C2mjIlpkvCC8bmBbkB0iCNQ30p6xPFD7frP15 ejRxBbms9SdjPBPesEbEckRzNjjBmy82zO00SRRPjs0fxHrI2lFbgmpg0cDQVUZOHha7 UHgdj6n22u0xPaAkEzJTZoWf1IrOLCkwKQwhtJsz6oHwbWd0TizUJNNnbFKkwrTeZEjW A35SRc6HX1qfCauroLODO1j++iO3/rwY30D+MR0afMlQznJEWEddOVbBFL10gu27AUEp o3LroFmIb7XoBy5uQws9ketJvqeF+JVjl7mPjWorFYnbOfJuCS7Sxcq5Erdwol0SSojf TxBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=RyyU1KTZ+u7IZU/ZLxa5MUX+oMEqsxDrKnYwc61Y+0Q=; fh=Cs1AUtXtp3D2TPi4/taTfkOhOFw7oAepbs7wfC0i7D0=; b=jmgE/VEfOWBB/SCUkg7dPmZRsuW61QMV3QnVTxvhAqsuFvI7xRFfzWl6xtiMJ90iRE VK38pYk4owKvazBhkY09ofKXrxUAvnMeB3036RHWi5bQAedfeXuyoGEKcCviexywPl4u 0JwfYXeGuox1FwyvOme3hPB2DAUTyRYBw21i9BN6FB+pSfqlA4QvLYCzFfgx9a4uF5/G YRKfxpdF0SzuORDLcTkSQ4bwM6QStDk6vHIHI/A8D6z0sHAsQG3cQ1po60yWyzkm+JvK lUVFIQG225CINNa+ZbM3RH1I1EjxlWocqqDf1FX+qLP7UgcgoHVYdNB89jLBdHt8QLyi 62/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=i6z+M4m5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d3-20020a170906040300b00a44310a45dcsi1537250eja.490.2024.03.01.09.24.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:24:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=i6z+M4m5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A26B11F2395F for ; Fri, 1 Mar 2024 17:24:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57E3E8C01; Fri, 1 Mar 2024 17:24:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i6z+M4m5" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FEA55228; Fri, 1 Mar 2024 17:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709313841; cv=none; b=EJdUYQKhJ6NIGM+EdFMVMQHn1mBQiRzAwu+y9XXG/armeD/MUB8c8kZ/zO2ZGv78KSGBu97nbYEow3cOlELq1Upnx2dsiHmImvRNqmIKJrYS6rZgbAhlyGE8TbGxycm8V5K4fvbBM+2ZuUOeRT8IT/YHy1le3C/YCm7OUy8hji8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709313841; c=relaxed/simple; bh=veI8B19i8DnVTq/s4obgrpoRoZCjKRQ6AAnu47Af2jM=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=YSc775p0Jrbz7c0FrdoE/WkIBNO08wv6xIOP5sP+4uvzUOxlv1+/jJoGoJJPOGjwaYmz+afPBsNMSYyYwYzr7yRSaS2zC/oc2jHrwS2HlnkT+xq9zvssSFEHlwKdp/ef1ja+MOPQWZRSIvyU7TKkOHo1R+UO2vq4bBGQ6HW0VXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=i6z+M4m5; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-5d4d15ec7c5so2017511a12.1; Fri, 01 Mar 2024 09:23:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709313839; x=1709918639; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=RyyU1KTZ+u7IZU/ZLxa5MUX+oMEqsxDrKnYwc61Y+0Q=; b=i6z+M4m5cSR+ppHq/yUnHAD1HIe+gJ2UogR1BQ9tffF2aXnrazIW7uGKQ278dBq6Jg w9iSZw75EoTF3CfnEjzbLq5t6sFq7KnTzitgwTWW7zJrM7NFL8TcOeT2R7/b6N0hXCDX bnpuS13gRqBfCw++y5mkmEiBcB1jYndmT7T+Dkut1FGoENgliKmHZSDbWWC9pknsf4K+ HlzAFkueXyZYA4TLKtmWCixGi3BsZpT5+V5njCW3GB+zFd3dXBGvnxYmAc+GubGvEDGF Rx+IzCqeTtt/L7/0uBgiWSqcOfsU8kRj6SW2F4BV2ZTNnAiUL4JqO4WS/N2tktBx0LJA /8iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313839; x=1709918639; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RyyU1KTZ+u7IZU/ZLxa5MUX+oMEqsxDrKnYwc61Y+0Q=; b=MAnrRG2+9zUx+ywPGEbM7HBiDsA932WaFo3fH0K/Sdn8YNMl/QGPrfjKsoh25vIIQA 3g3qLfaB9eVr5xjN7Z0MEcJDz+GzdgKghE6C8qYD5lizWDBEeo53rgyZsbB9y1H9THSH jGShDiomx/8jyZPW0sdtrySvxmqF3gpo9lWt6Ea7ctM5+ZNB7Ns3p1IFSG+EayHYZLCH viJKI8wLcPBEggP5iXJoSOSsm6ieYT6jXAW2QKHIGVk3rOVPfJJ2gEkCrJMxxPPi0ghY HJL4IsSIP4mZHY0KD9UpXmCHzVWnRd4sLSD0JF7YIWFCWe3MwOVqZNP2e2F/ih/EZUGT JqgA== X-Forwarded-Encrypted: i=1; AJvYcCWsS5DiDs/lvgW4c2LPW8HgaR4mzK1tlB4Z37tH7I5BeAuYOpkgLMZ68Xa7w6Bxz8EGxI68+mhHVijaSgoE+kg8ZvjJlo5/KezawURllS6bouR+JIKtGEwRnlvDT2HDiRoxzOb5DZrV0gX6DF33caW1h02rYAlPXR89aTP3wHg30QRs66ePOPqe0gIjK3JzMihw/ES9JcTI+b/r X-Gm-Message-State: AOJu0YysFAEdQ7JDNIMmpYMCp5hZBs++rj2eTG8YiGJDr73TWQYYy1qM l5Mg8pIHkMDyUo/0zC9ZfS8utN8Kn2yh9R85XHRfilohHAZqSoRw X-Received: by 2002:a05:6a20:4283:b0:1a0:e3c6:18da with SMTP id o3-20020a056a20428300b001a0e3c618damr2372160pzj.27.1709313839390; Fri, 01 Mar 2024 09:23:59 -0800 (PST) Received: from localhost ([98.97.43.160]) by smtp.gmail.com with ESMTPSA id i37-20020a635865000000b005dc5289c4edsm3219408pgm.64.2024.03.01.09.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:23:58 -0800 (PST) Date: Fri, 01 Mar 2024 09:23:57 -0800 From: John Fastabend To: Song Yoong Siang , Jesse Brandeburg , Tony Nguyen , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Vinicius Costa Gomes , Florian Bezdeka , Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Shuah Khan Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, xdp-hints@xdp-project.net Message-ID: <65e20f2d314bd_5dcfe20857@john.notmuch> In-Reply-To: <20240301162348.898619-2-yoong.siang.song@intel.com> References: <20240301162348.898619-1-yoong.siang.song@intel.com> <20240301162348.898619-2-yoong.siang.song@intel.com> Subject: RE: [PATCH iwl-next,v2 1/2] selftests/bpf: xdp_hw_metadata reduce sleep interval Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Song Yoong Siang wrote: > In current ping-pong design, xdp_hw_metadata will wait until the packet > transmition completely done, then only start to receive the next packet. > > The current sleep interval is 10ms, which is unnecessary large. Typically, > a NIC does not need such a long time to transmit a packet. Furthermore, > during this 10ms sleep time, the app is unable to receive incoming packets. > > Therefore, this commit reduce sleep interval to 10us, so that > xdp_hw_metadata able to support periodic packets with shorter interval. > 10us * 500 = 5ms should be enough for packet transmission and status > retrival. > > Signed-off-by: Song Yoong Siang > --- > tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/bpf/xdp_hw_metadata.c b/tools/testing/selftests/bpf/xdp_hw_metadata.c > index 878d68db0325..bdf5d8180067 100644 > --- a/tools/testing/selftests/bpf/xdp_hw_metadata.c > +++ b/tools/testing/selftests/bpf/xdp_hw_metadata.c > @@ -480,7 +480,7 @@ static int verify_metadata(struct xsk *rx_xsk, int rxq, int server_fd, clockid_t > for (int j = 0; j < 500; j++) { > if (complete_tx(xsk, clock_id)) > break; > - usleep(10*1000); > + usleep(10); > } > } > } > -- > 2.34.1 > Acked-by: John Fastabend