From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.40 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796135353; b=N8YeiUJoxre4XT3JVNY4eSgfsS+mlCbNqb52/LvqANaxWF+I3je1hEBAybJdiLhK2SS4 /M5icnrxhD049hTmiYz63g12EuwS0wogXL5IstcNo+okAjakoqKoc8vd5XXhYSC5/gAh1 9NSgtTKpjz3SXK+tmAP58PPRCwxu92tI33En00IU0VVHj/wKTzh5SbgGA56/EWivprBxI wkUZAZ1baXGsXz2PVihvN6J5mzZ0DwANC9gE9rfEnMReH6N2sGl3JqZP4N0bN45LGsXT4 9tPZCfMmDu3QyXYUlzqyf1FdqpYEn6YqB+YFf/b5D5K8ioSpQ59wFPCsNMlKfWb4oww== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796135353; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=5T8UIMH0DIlSDCHbclznas6Q0aOWfl7xZ5OGbFqno7Q=; b=wXrdp8jfgn4uwIASavpzxVOlLTwCeDOV0UpSuy1Iz2BRKSrw5qVdTyZrrfIweqtOALXB yR7QeGgI6SfAgzVWJ/11Dw74ma6R7ERxv3yPSJ/INKFJdm+lT76x9UFGt837Xm3z5fSY8 bh6GvZ+2JWwYbqKhKQ+PC8+CPE07WrInsVudiwQh+dv9vSF15aoG9kGIUOR00JZohEFVV 8IvW06PovW9XGJys3yebDIpclBqZgFzgazrNLE7pqSWNXtrTkM+63rLpmV2B12syBMCyY y06ixuNF0ZvdGgsmrXMGsI9TwtrnasX3ea5PhmeOFYSRLivDniHvEMOItxf8ub68YkQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=pTLpqmEt; arc=none smtp.remote-ip=195.10.208.40 Received: from mout-b-210.mailbox.org (mout-b-210.mailbox.org [195.10.208.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E48D0606A6B6; Tue, 1 Dec 2026 14:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E48D0606A6B6 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=pTLpqmEt Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-210.mailbox.org (Postfix) with ESMTPS id 4jf3DN5fZ2zFpVG; Tue, 01 Dec 2026 15:29:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796135348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5T8UIMH0DIlSDCHbclznas6Q0aOWfl7xZ5OGbFqno7Q=; b=pTLpqmEtVYK++Lg3QUV+salgV4uBQZnHJ8rqMw7QgnuFeq7opGTqkNu7L+F2qh6k4e8qdO uJAgQIhgvvgXVyWUTO6amdgCyiFBVvpsHxLsgChueT3zRUsf4XFxc39+qj3g84u3ewSTkJ 1vApPnCjkP5reP6YcwEKJvVU7ThnxOP2I/WTztlsW66XXf+LWeFh3senRvjJu/jDMWLd62 mv4n/VNX6V3hyNAmqI8zxfebQBPGoMaBL5aOZbz/6IJak8GaTLhZ5D5G+8WoLvH3LcxrMz ZsXv07oweQol+czGnZ3lYeQlBjUwbgpRuG+nM8eZN2RaHBAuU7DI6/kTZEp2Ew== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=antonio@mandelbit.com From: Antonio Quartulli To: Alexandre Cassen Cc: Antonio Quartulli , netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, leon@kernel.org, dtatulea@nvidia.com, cratiu@nvidia.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path Date: Tue, 1 Dec 2026 15:29:02 +0100 Message-ID: <20261201142903.1791860-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: <20261104195241.1883539-1-antonio@mandelbit.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4jf3DN5fZ2zFpVG Hi Alexandre, On 26/11/2026 14:43, Alexandre Cassen wrote: > setup is Xeon Gold 6342 (DDIO) wiht ConnectX-7 (fw 28.48.1000): 2 ports > x 8 queues. 5G UPF in XDP (GTP-U and MAP-E, ~3200 insns per packet, > XDP_TX only) with 100k sessions running live mobile network traffic > pattern. Thanks a lot for testing this on a DDIO system with CX-7! This is exactly the data I was missing :-) > With DDIO the gain depends on the history of the RQ. Under XDP a stride > is a page. While the pages of a WQE are adjacent the L1 stride > prefetcher fetches the next packet by itself. Once XDP_TX completions > overflow the page pool cache then pages come back shuffled where the > vanilla driver loses 5%. Interesting...That fits the idea behind the patch: once the pages of a WQE are no longer adjacent, only the explicit look-ahead can still find the next packet. > cosmetics: BIT(rq->mpwqe.page_shift) - 1 Agreed, I'll switch to BIT() if a v3 is needed.. > For our tunneling use-case I just added: > > + net_prefetch(va + rq->buff.headroom + 128); Makes sense for GTP-U, where the inner headers you parse start beyond the first two lines. This said, I'd keep the driver at the outer headers, though: for untunnelled traffic the extra line is never touched, and the right amount depends on the encapsulation. > I will run production with your patch with the +128 for our stuff... > thanks for that ! Thank you! Please let us know how it behaves! :-) Cheers, -- Antonio Quartulli Mandelbit Srl https://www.mandelbit.com