From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mail.toke.dk (Postfix) with ESMTPS id DB531982985 for ; Tue, 28 Jun 2022 18:30:40 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GFhxXzW5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656433839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NFHPYEx6LcCoCFgUJZqyB8qmbXcNWPDPiDpj5XQCFM=; b=GFhxXzW52KdHB80aDWGLFeRU9UlfBMs6O4D/Zk8gxJJDudPysfP+Vj7kvS++HqkfvOMtaB X9O/hfpF++a62cyFEPGpqfWUcmaNJTAkCK5PEjgfQHdgS4JbDyuuoyiOTzvbOW8R2kOvkB bYOIQM7RDbmMbCyLELMKV9l5LKLdqlo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-FyViuAiBN9iUFauAVzNXJw-1; Tue, 28 Jun 2022 12:30:35 -0400 X-MC-Unique: FyViuAiBN9iUFauAVzNXJw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBB5D101A589; Tue, 28 Jun 2022 16:30:34 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.40.208.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E934492C3B; Tue, 28 Jun 2022 16:30:34 +0000 (UTC) Received: from [192.168.42.3] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 9DECB30736C72; Tue, 28 Jun 2022 18:30:33 +0200 (CEST) From: Jesper Dangaard Brouer To: bpf@vger.kernel.org Date: Tue, 28 Jun 2022 18:30:33 +0200 Message-ID: <165643378969.449467.13237011812569188299.stgit@firesoul> User-Agent: StGit/1.4 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Message-ID-Hash: AZLVWQYDOQ5CNZKQY5GL4DEEF4I23H3L X-Message-ID-Hash: AZLVWQYDOQ5CNZKQY5GL4DEEF4I23H3L X-MailFrom: brouer@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: xdp-hints@xdp-project.net, Jesper Dangaard Brouer X-Mailman-Version: 3.3.5 Precedence: list Subject: [xdp-hints] [PATCH RFC bpf-next 0/9] Introduce XDP-hints via BTF List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This patchset expose the traditional hardware offload hints to XDP and rely on BTF to expose the layout to users. More advanced use-case with driver specific offloads will likely be in followup patches. The users/consumers are (as described in [1]): - XDP BPF-progs - XDP to SKB conversion gaining HW offloads - AF_XDP can consume BTF info in userspace - Chained BPF-progs can communicate state via metadata This is still RFC as the following features are missing: - Exposing XDP-hints indication in AF_XDP descriptor - Exporting what XDP-hints structs are avail per driver Two drivers i40e and mvneta gets XDP-hints in this patchset. [1] https://github.com/xdp-project/xdp-project/blob/master/conference/LLC2022/xdp_hints_hw_metadata-final.pdf --- Jesper Dangaard Brouer (8): i40e: Refactor i40e_ptp_rx_hwtstamp bpf: export btf functions for modules net: create xdp_hints_common and set functions net: add net_device feature flag for XDP-hints xdp: controlling XDP-hints from BPF-prog via helper i40e: refactor i40e_rx_checksum with helper i40e: add XDP-hints handling net: use XDP-hints in xdp_frame to SKB conversion Lorenzo Bianconi (1): mvneta: add XDP-hints support drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 34 +++ drivers/net/ethernet/intel/i40e/i40e_ptp.c | 36 +++- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 222 ++++++++++++++++---- drivers/net/ethernet/marvell/mvneta.c | 61 +++++- include/linux/btf.h | 2 + include/linux/netdev_features.h | 3 +- include/net/xdp.h | 181 +++++++++++++++- include/uapi/linux/bpf.h | 43 ++++ kernel/bpf/btf.c | 13 +- net/core/filter.c | 45 ++++ net/core/xdp.c | 73 ++++++- net/ethtool/common.c | 1 + 13 files changed, 644 insertions(+), 71 deletions(-) --