From mboxrd@z Thu Jan 1 00:00:00 1970 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 4D6EB5103F; Sat, 15 Feb 2025 14:02:57 +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=1739628178; cv=none; b=X1ZdtYQec2YNnx7zGOu8disWLfnrU5JeYoSXGcmOBXap9a8U25qH9URLbl/WLPrSwhBUIX2KSa+ARvf/0HDOJnRrmREcAXeoZMFnV7DQuXg61XfSTYPZ8l/FcWb7yXXxXsk8/Peag4SKI60c0ZcB7J7n1FXElBD3h/HEL6Mtc2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739628178; c=relaxed/simple; bh=vNLrGNHqeVoQIeEwsVb8aUGliW0G4Qp5gERyB4+77Es=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oP7Z22QUku0erdxqWy0UfhkjmCP9bz46boB0zJkALbeEzHn2xjTh2yi2gD76+ShYqeWNn0i8DLEN8EqZJEteNd96Ibq0Br1KiohpVCotkOJi562KRN4g6NNUZyxEfrBca86EYcvknudjUBdC+CLh4s8/dwa3aQPH8ci/3kG1RBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bJDDED3L; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bJDDED3L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6553C4CEE7; Sat, 15 Feb 2025 14:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739628177; bh=vNLrGNHqeVoQIeEwsVb8aUGliW0G4Qp5gERyB4+77Es=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bJDDED3L0pMJkGG1sSsVGiyfkflCEIjsN/+OQENknmdKORiZTKf/MP/xBvqgqQxNa iE5zsm41BbaIwh5p21ZCVUbCnER82jL+z9/nC9NzPinDw2m6DURTEep2p3dUG9zva7 Hri/qah13kLoubon11ie7miHcTmeOAk9BAnz3xEBZ3gexsU3YIhUHOGEWNu1EfeTqQ Cd5BbYlqYxsJah3O18Hiby1DNs9cVy2zz6vO1u0wnIsmd9akEPjBCrccmT+gZ1ITFz 0UCFFSd5FidELQH+0AzwItctqoB24wUnZXRoyUUzioPw5klMrqucOtLeQWJqHOiwi/ GzdtSiVZdYNbQ== Date: Sat, 15 Feb 2025 14:02:52 +0000 From: Simon Horman To: Jakub Kicinski Cc: Amit Cohen , Alexei Starovoitov , Petr Machata , "David S. Miller" , Eric Dumazet , Paolo Abeni , Andrew Lunn , Network Development , Ido Schimmel , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , bpf , mlxsw Subject: Re: [PATCH net-next 00/12] mlxsw: Preparations for XDP support Message-ID: <20250215140252.GP1615191@kernel.org> References: <20250205090958.278ffaff@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250205090958.278ffaff@kernel.org> On Wed, Feb 05, 2025 at 09:09:58AM -0800, Jakub Kicinski wrote: > On Tue, 4 Feb 2025 17:26:43 +0000 Amit Cohen wrote: > > > > You're right, most of packets should be handled by HW, XDP is > > > > mainly useful for telemetry. > > > > > > Why skb path is not enough? > > > > We get better packet rates using XDP, this can be useful to redirect > > packets to a server for analysis for example. > > TBH I also feel a little ambivalent about adding advanced software > features to mlxsw. You have a dummy device off which you hang the NAPIs, > the page pools, and now the RXQ objects. That already works poorly with > our APIs. How are you going to handle the XDP side? Program per port, > I hope? But the basic fact remains that only fallback traffic goes thru > the XDP program which is not the normal Linux model, routing is after > XDP. > > On one hand it'd be great if upstream switch drivers could benefit from > the advanced features. On the other the HW is clearly not capable of > delivering in line with how NICs work, so we're signing up for a stream > of corner cases, bugs and incompatibility. Dunno. FWIIW, I do think that as this driver is actively maintained by the vendor, and this is a grey zone, it is reasonable to allow the vendor to decide if they want the burden of this complexity to gain some performance.