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 D88D0A953; Sat, 24 Jun 2023 21:38:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DAA3C433C8; Sat, 24 Jun 2023 21:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687642716; bh=kZAZb8VwwdIozLgwV01VFij8RmxnZ2PC2T5Y1l9pcz0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nM19jKx9x9KMKtEpyDc7sr8mSvWThZPm1yBUzajTeSMnkI666n1hlA4rRFPad4UYf IosXa/RuVJMwLjxO7oh86IfPsZAu3vZrcbhUGi4hnazgL2uZ2eibtNkqFaSbWCmj0O 4q1AgqVfDlKyAcWncbNYfpqV0udWaQ2xwVvtvshQqOTQTSd7Qx+dopA1lhWhquMxTJ yTHK+PY5i8P+go6Oi/K8qFvdSkjwX0NYRM8Kn298gu85yue+buUXD9Ua2ZV/cCKkDW XAEXZMMHE0LHX85A7rpz2kQj3HYbRYYLSxA8VuyhqcT7lGUTs4HrKKscx7j612wYrO YnKzIpw3EJz9Q== Date: Sat, 24 Jun 2023 14:38:34 -0700 From: Jakub Kicinski To: Alexei Starovoitov Cc: John Fastabend , Donald Hunter , Stanislav Fomichev , 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: <20230624143834.26c5b5e8@kernel.org> In-Reply-To: References: <20230621170244.1283336-1-sdf@google.com> <20230621170244.1283336-12-sdf@google.com> <20230622195757.kmxqagulvu4mwhp6@macbook-pro-8.dhcp.thefacebook.com> <649637e91a709_7bea820894@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 Fri, 23 Jun 2023 19:52:03 -0700 Alexei Starovoitov wrote: > That's pretty much what I'm suggesting. > Add two driver specific __weak nop hook points where necessary > with few driver specific kfuncs. > Don't build generic infra when it's too early to generalize. > > It would mean that bpf progs will be driver specific, > but when something novel like this is being proposed it's better > to start with minimal code change to core kernel (ideally none) > and when common things are found then generalize. > > Sounds like Stanislav use case is timestamps in TX > while Donald's are checksums on RX, TX. These use cases are too different. > To make HW TX checksum compute checksum driven by AF_XDP > a lot more needs to be done than what Stan is proposing for timestamps. I'd think HW TX csum is actually simpler than dealing with time, will you change your mind if Stan posts Tx csum within a few days? :) The set of offloads is barely changing, the lack of clarity on what is needed seems overstated. IMHO AF_XDP is getting no use today, because everything remotely complex was stripped out of the implementation to get it merged. Aren't we hand waving the complexity away simply because we don't want to deal with it? These are the features today's devices support (rx/tx is a mirror): - L4 csum - segmentation - time reporting Some may also support: - forwarding md tagging - Tx launch time - no fcs Legacy / irrelevant: - VLAN insertion