Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2642935lqo; Tue, 14 May 2024 05:20:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWf54F97rU2Y+xhJgGolfGT2Nx02KXc6guJwDo/fS6JXCIL+h8hiOEvXDKki/Rw8sEwqTkVS2RIDvsz3k5ydqGGgHY2l9NMfyDDeWQYig== X-Google-Smtp-Source: AGHT+IFQq4//+t9lUpSiy5Ao3Ie5Q594aHuazFayjgDOlobtmz4HthnMa+VMTCWYKrpsGFbq9G8f X-Received: by 2002:a05:6a20:a124:b0:1a7:4f8b:6439 with SMTP id adf61e73a8af0-1afde0ecb90mr21687286637.34.1715689225904; Tue, 14 May 2024 05:20:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715689225; cv=pass; d=google.com; s=arc-20160816; b=KTLADDCYrYo272KN0J9HPDqA1Ghi25dfofdpkoV/J7x6z7M9tV03Ar/Ji4LgZcSnZ4 fTH3ZicMU3YEosE22LKxzoNmB5WEGLtcoVirdxmA/GqTAEd+o099LcEBF1AsN2j+XnvF 3iURcorKi4nwSdCzObF59xOsyr3R9GLXuWOdc7nGGfUudb2hNFwsvrxTYkvoHUpmkLDL mEm682t60YSuO+FHavq/YTNX6s2yGY+oE+2il3/TRAHH2JHQwMn+3LdoQ6Vi1A+hLYAV 0ZztX6GcssTbyx9q5weLbKPlBTzNPbCY5VNQbwYT6Zr57wD/kGV1FyonSTEb78b2LXrZ 7B4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=o2WTzPD4V7VuwopWeKBBbMoIhVLFUlA9Eq4OJkZrEuU=; fh=4a7oqeMi8gqPRFoeUPGyF/qcq6Li1pSJYgKQHcRS87k=; b=RTcfZRmiXrPEvszEs4+3kyYwmD0iELqeW8XdZAOds2YDAXkKXlAJwZb3tN8qmooTc0 vVGIfGwqtIq7O7rjYpPvzAnvp3P8v0OoiDpn4KsTwW7d4nfuKNccN3sYh/bY89yPzHKr FtxtPfN0AqLJDcvWzTPayA64WPH0/sl5EIn6/MCkLqkzIqQOoHGCkL4VmDU+TYyy3llA 5p2W7jck2TfVzwrC8uANPeY+JFYpn2PSOror3AOd+T5rwWIK1h1q2AIwhCGIJkpoVhE6 G64AO1jmvwdVnRrNLY0/WHNp26I4OKR58IOK6bx6MuLV+mTVxjdTxc4s7iS19/gREUM6 62xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sUVlJvbL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178655-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a725a0si11986836b3a.48.2024.05.14.05.20.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 05:20:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178655-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sUVlJvbL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178655-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 02D89B20CFA for ; Tue, 14 May 2024 12:20:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D3404DA13; Tue, 14 May 2024 12:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sUVlJvbL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3B3EB2D60A; Tue, 14 May 2024 12:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715689211; cv=none; b=IQhmLH1+5XCagUgA5YPr6IdrRyqlKQdCnqZGBqEYQcSLkgJ03XEsXxIvahtuTpIdE414X+6PK+KQnc0mdnNdYGQFf8wnnCyPe+RMQr8K70fbTUAK1yTqElXrjzJlbrANhUdD2sEH1r3OoLAcuqdEdca12zmKvdTQwCqfXC/DPz0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715689211; c=relaxed/simple; bh=obSDg9eXO8e+fTU+HDY+zB/5/5ss2adUhKUPzf6dSAQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=shkGcrbZWE+Rp8qSCsflL6oyu4T9LpClVkoo7OYo2tZ7FdzOZkEn6YhJJ4TZlmXi5VLoT4/KVfWoczSLoWqLfhSchm2uqgovIr/JfRJVyEbdymJVph71TOYc4S6MgaSpMlcZdd2RMPjlg8nLe/EKh3YLz5Lj6iRZ34rqy6qCxCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sUVlJvbL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 384B2C2BD10; Tue, 14 May 2024 12:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715689210; bh=obSDg9eXO8e+fTU+HDY+zB/5/5ss2adUhKUPzf6dSAQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sUVlJvbLDHFFQVdNDvNLxb6SbKJvUoQxFlHMxlDt9oyJNwsbnjlnHD6sApYm+tGIu Dz0E2qEePDXxhCk90BtwYMe1JvbQY3Kh6t0MmbdC50hTwlNXfgRNEyb0uWdNEmFflo doP2BxC+wAM06Myb8yI2Van73/yQ1Ob+uH21gveMcAuraJAyJCAKXQBIi/g0800AhK aJvw8rb9DFnCxIhphCQHT1ZI6CdbXPDEGvevzNVQAPF1UyDqeIeu6ceYsgYWCfwBwz so/Im7iyOwFeV5+r2gmqkBQBMAhBwjkoeAqfo2oZKZZfiWwN7a+SxBmTUmpuz4nXok ill1zMx8crXUA== Message-ID: Date: Tue, 14 May 2024 14:20:03 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 14/15 v2] net: Reference bpf_redirect_info via task_struct on PREEMPT_RT. To: Sebastian Andrzej Siewior Cc: Alexei Starovoitov , =?UTF-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , LKML , Network Development , "David S. Miller" , Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Paolo Abeni , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon , Alexei Starovoitov , Andrii Nakryiko , Eduard Zingerman , Hao Luo , Jiri Olsa , John Fastabend , KP Singh , Martin KaFai Lau , Song Liu , Stanislav Fomichev , Yonghong Song , bpf References: <20240503182957.1042122-1-bigeasy@linutronix.de> <20240503182957.1042122-15-bigeasy@linutronix.de> <87y18mohhp.fsf@toke.dk> <20240507123636.cTnT7TvU@linutronix.de> <93062ce7-8dfa-48a9-a4ad-24c5a3993b41@kernel.org> <20240510162121.f-tvqcyf@linutronix.de> <20240510162214.zNWRKgFU@linutronix.de> <4949dca0-377a-45b1-a0fd-17bdf5a6ab10@kernel.org> <20240514054345.DZkx7fJs@linutronix.de> Content-Language: en-US From: Jesper Dangaard Brouer In-Reply-To: <20240514054345.DZkx7fJs@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/05/2024 07.43, Sebastian Andrzej Siewior wrote: > On 2024-05-14 07:07:21 [+0200], Jesper Dangaard Brouer wrote: >>> pktgen_sample03_burst_single_flow.sh has been used to send packets and >>> "xdp-bench drop $nic -e" to receive them. >>> >> >> Sorry, but a XDP_DROP test will not activate the code you are modifying. >> Thus, this test is invalid and doesn't tell us anything about your code >> changes. >> >> The code is modifying the XDP_REDIRECT handling system. Thus, the >> benchmark test needs to activate this code. > > This was a misunderstanding on my side then. What do you suggest > instead? Same setup but "redirect" on the same interface instead of > "drop"? > Redirect is more flexible, but redirect back-out same interface is one option, but I've often seen this will give issues, because it will overload the traffic generator (without people realizing this) leading to false-results. Thus, verify packet generator is sending faster than results you are collecting. (I use this tool[2] on generator machine, in another terminal, to see of something funky is happening with ethtool stats). To workaround this issue, I've previously redirected to device 'lo' localhost, which is obviously invalid so packet gets dropped, but I can see that when we converted from kernel samples/bpf/ to this tool, this trick/hack is no longer supported. The xdp-bench[1] tool also provide a number of redirect sub-commands. E.g. redirect / redirect-cpu / redirect-map / redirect-multi. Given you also modify CPU-map code, I would say we also need a 'redirect-cpu' test case. Trick for CPU-map to do early drop on remote CPU: # ./xdp-bench redirect-cpu --cpu 3 --remote-action drop ixgbe1 I recommend using Ctrl+\ while running to show more info like CPUs being used and what kthread consumes. To catch issues e.g. if you are CPU redirecting to same CPU as RX happen to run on. --Jesper [1] https://github.com/xdp-project/xdp-tools/tree/master/xdp-bench [2] https://github.com/netoptimizer/network-testing/blob/master/bin/ethtool_stats.pl