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 92FE0A923; Wed, 28 Jun 2023 18:52:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D745C433C0; Wed, 28 Jun 2023 18:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687978326; bh=gXKn5JYE56vUXL4So05eMKIhT6YmD5oAVfdokIcwQKw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jQUGa3JQBYAvNBRmP3/C0Eh/RBiRYubbVd2zfTYOPyr1poAD7xlsoKvLl8cdN7DRM cDpjZe1xEdwG8CH6jk/+av8/8ONZXQkZ1mxljWbc2ACmEerDneL2HC0myc+fffpQJS ms2XiwXC8qXlzVjfUOihA4BHJUAeECFQSuBcUmCy5WerKxdLEHjJBQpSaTV/70brXt Sx4Xw1jdwc5v7LACcjHPMpldgxMTPrBrqFdqWjbvK6OzIF200Kt88Nb1xaWBWoyc6U BDgTjZpPD5Z3X0N6OK5ORsVsXxYQq7qOGjdZeMgwgkMoRfJ/apae39NReEQWVzP9DM wF+0fC4avKOLg== Date: Wed, 28 Jun 2023 11:52:04 -0700 From: Jakub Kicinski To: John Fastabend Cc: Stanislav Fomichev , Alexei Starovoitov , Donald Hunter , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Network Development Subject: Re: [RFC bpf-next v2 11/11] net/mlx5e: Support TX timestamp metadata Message-ID: <20230628115204.595dea8c@kernel.org> In-Reply-To: <649b581ded8c1_75d8a208c@john.notmuch> References: <20230622195757.kmxqagulvu4mwhp6@macbook-pro-8.dhcp.thefacebook.com> <649637e91a709_7bea820894@john.notmuch> <20230624143834.26c5b5e8@kernel.org> <649b581ded8c1_75d8a208c@john.notmuch> 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-Transfer-Encoding: 7bit On Tue, 27 Jun 2023 14:43:57 -0700 John Fastabend wrote: > What I think would be the most straight-forward thing and most flexible > is to create a _devtx_submit_skb(descriptor, sk_buff) > and _devtx_submit_xdp(descriptor, xdp_frame) and then > corresponding calls for _devtx_complete_{skb|xdp}() Then you > don't spend any cycles building the metadata thing or have to even > worry about read kfuncs. The BPF program has read access to any > fields they need. And with the skb, xdp pointer we have the context > that created the descriptor and generate meaningful metrics. Sorry but this is not going to happen without my nack. DPDK was a much cleaner bifurcation point than trying to write datapath drivers in BPF. Users having to learn how to render descriptors for all the NICs and queue formats out there is not reasonable. Isovalent hired a lot of former driver developers so you may feel like it's a good idea, as a middleware provider. But for the rest of us the matrix of HW x queue format x people writing BPF is too large. If we can write some poor man's DPDK / common BPF driver library to be selected at linking time - we can as well provide a generic interface in the kernel itself. Again, we never merged explicit DPDK support, your idea is strictly worse.