From patchwork Tue Apr 18 13:30:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 13215723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B2FDC77B75 for ; Tue, 18 Apr 2023 13:31:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232364AbjDRNbe (ORCPT ); Tue, 18 Apr 2023 09:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232117AbjDRNbb (ORCPT ); Tue, 18 Apr 2023 09:31:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62CCE15603 for ; Tue, 18 Apr 2023 06:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681824646; 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=7E6qqj9b24iehviZ7WDVb8EbUsqIS5yQF8iCmZUzngw=; b=L1J7/jNsGlbINzOI15R98UhDFd1BkWZF1XFywOp1dKH1L3pNgV7s65m3AnjUMN+rskWJz2 BRwPy4PmXCsmHFoS3/YWDAGJ8EdV+0a7u2MlFqDOWCXvTk0loVrIn8nQedbgXnI9boefvc yq9MdZk8WXOSgd3HJT6T8PFavYuOCcc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-bzWQQw1RP9eGc5wyzBXe9g-1; Tue, 18 Apr 2023 09:30:41 -0400 X-MC-Unique: bzWQQw1RP9eGc5wyzBXe9g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 91BE43C02539; Tue, 18 Apr 2023 13:30:39 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AE8440C83B6; Tue, 18 Apr 2023 13:30:39 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id A6299307372E8; Tue, 18 Apr 2023 15:30:37 +0200 (CEST) Subject: [PATCH bpf-next V2 0/5] XDP-hints: XDP kfunc metadata for driver igc From: Jesper Dangaard Brouer To: bpf@vger.kernel.org, Stanislav Fomichev , =?utf-8?q?Toke?= =?utf-8?q?_H=C3=B8iland-J=C3=B8rgensen?= Cc: Jesper Dangaard Brouer , netdev@vger.kernel.org, martin.lau@kernel.org, ast@kernel.org, daniel@iogearbox.net, alexandr.lobakin@intel.com, larysa.zaremba@intel.com, xdp-hints@xdp-project.net, yoong.siang.song@intel.com, intel-wired-lan@lists.osuosl.org, pabeni@redhat.com, jesse.brandeburg@intel.com, kuba@kernel.org, edumazet@google.com, john.fastabend@gmail.com, hawk@kernel.org, davem@davemloft.net Date: Tue, 18 Apr 2023 15:30:37 +0200 Message-ID: <168182460362.616355.14591423386485175723.stgit@firesoul> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Implement both RX hash and RX timestamp XDP hints kfunc metadata for driver igc. First patch fix RX hashing for igc in general. Last patch change test program xdp_hw_metadata to track more timestamps, which helps us correlate the hardware RX timestamp with something. Acked-by: Song Yoong Siang Acked-by: Song Yoong Siang --- To maintainers: I'm uncertain which git tree this should be sent against. This is primary NIC driver code (net-next), but it's BPF/XDP related (bpf-next) via xdp_metadata_ops. Jesper Dangaard Brouer (5): igc: enable and fix RX hash usage by netstack igc: add igc_xdp_buff wrapper for xdp_buff in driver igc: add XDP hints kfuncs for RX hash igc: add XDP hints kfuncs for RX timestamp selftests/bpf: xdp_hw_metadata track more timestamps drivers/net/ethernet/intel/igc/igc.h | 35 ++++++ drivers/net/ethernet/intel/igc/igc_main.c | 116 ++++++++++++++++-- .../selftests/bpf/progs/xdp_hw_metadata.c | 4 +- tools/testing/selftests/bpf/xdp_hw_metadata.c | 47 ++++++- tools/testing/selftests/bpf/xdp_metadata.h | 1 + 5 files changed, 186 insertions(+), 17 deletions(-) --