From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass (mailfrom) smtp.mailfrom=intel.com (client-ip=198.175.65.14; helo=mgamail.intel.com; envelope-from=yoong.siang.song@intel.com; receiver=) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FAAlGhJP Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mail.toke.dk (Postfix) with ESMTPS id 43A93A58CAC for ; Sun, 3 Mar 2024 09:32:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709454782; x=1740990782; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a9Icqs4XaEB3VNC9uusOctcAw+EqQqaKssugc4WBFfg=; b=FAAlGhJPp4kg22V8BLW75GKXpcHRdBmY8lWigLsYBbBVjHKx+HWb84YT 9VkS90zlUQ2HEF3TyI/1ZpeOoHQW2SPxJqH0GopUwH2yGUgf0SYe9wZKR xOdN70sorneSyKVFfPGfS+b9mRFFHSHhXdpKGghPJHfgIbrdVJAFGHaqK 7Msi4mu55LDEvXEuZXPuTIqgSHietR9CkvSfEQ72gPGhzKq3UtO1MH3Y6 i7g+pLRcZxPVVTCKcnp/gKR7pk+60Su5Lbngpui+2/vKLIXw55KC4SMmA Ti/v26jB5xfw8qnj11giYjgTv5TaobnToKR/89yrhm0qKQjdWA3rUGhpJ g==; X-IronPort-AV: E=McAfee;i="6600,9927,11001"; a="7769302" X-IronPort-AV: E=Sophos;i="6.06,200,1705392000"; d="scan'208";a="7769302" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2024 00:33:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,200,1705392000"; d="scan'208";a="13357189" Received: from p12ill20yoongsia.png.intel.com ([10.88.227.28]) by orviesa005.jf.intel.com with ESMTP; 03 Mar 2024 00:32:51 -0800 From: Song Yoong Siang To: 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 Date: Sun, 3 Mar 2024 16:32:24 +0800 Message-Id: <20240303083225.1184165-2-yoong.siang.song@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240303083225.1184165-1-yoong.siang.song@intel.com> References: <20240303083225.1184165-1-yoong.siang.song@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: GMTML2H4KM37NGZRDWAKGX7NYCY3AKAF X-Message-ID-Hash: GMTML2H4KM37NGZRDWAKGX7NYCY3AKAF X-MailFrom: yoong.siang.song@intel.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: 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 X-Mailman-Version: 3.3.9 Precedence: list Subject: [xdp-hints] [PATCH iwl-next,v3 1/2] selftests/bpf: xdp_hw_metadata reduce sleep interval List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 Acked-by: John Fastabend Acked-by: Stanislav Fomichev --- 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