Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2333778rwl; Sat, 8 Apr 2023 12:27:31 -0700 (PDT) X-Google-Smtp-Source: AKy350bk9h8gJxnn3qcG/6lDMTzUpbugX0uqG/rjHRJ2DBealfNCVfruDLX6qWhYrIZMU6t5Hg2A X-Received: by 2002:a17:903:18a:b0:19d:20a:a219 with SMTP id z10-20020a170903018a00b0019d020aa219mr7648087plg.66.1680982051655; Sat, 08 Apr 2023 12:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680982051; cv=none; d=google.com; s=arc-20160816; b=bBTUiDL+U5TpoSL/Oec0Pjp0/AOYU6wB5rC+lC758zj64FsDClZFuZby98tQBe5TE8 a2bwihebWH03vjo3RaqeKwFivlvzf4Qh9ib3e7OA/j/8zSKYnVzamWEC7USMke/qQOMN QCpXnc2yecmYWZ89QrLgESds421p2dp4CZZk8RG4vJ4LknBAN8mb9D4sNFnDZsMDgcWA aW+xc0ioQGtvSwyxSntYyYLHToBL3oyBTUv3J2NEyjhgdB01IDWZaFeqP36p7PQ62gM8 8nlv3+2JuHEaeqW/5YNVTgRss0VKgtF3MLkL/nsh+I6HpO9JBpSbc2VTCgg8yepRH8pl 0jdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=WHos8LM0VawSvsV7ilkV4J+3kFj+NjV9a1WkRGl+L9k=; b=AhtMZLrtNMhrZTZ+ljd1EcJlpelzCWa69tVXNFpwfJqploJaBl8O0y1e5WXI/wNnk+ FLs3wWZ1Ui/oYNxWlfudqwPXG04FPf/z6ELXvMxjnbu/72MWrMO6Hb9BFd8NgFvRcr+q 4Z9Qo8FAXqihH90HHG8PH4Y/uFo2L9j3QdfNvjjiyB6hsoNP/eeuQtXFwmSSmgbfG8C0 ZIPNa4KQY7t7LyxzsUJqqswtczHN18YTWzXTK4esqgnZOgh49m92dFzVSVK0s0vdijTa vsjpzvIqDdmawYkpeoX/A/QF1iRubRuVTndtLmfogXS6jR2B4lAGh98oqitLSSwMnfQF 38sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GyqW+rOF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i22-20020a63d456000000b00517d98ef258si2006423pgj.2.2023.04.08.12.27.08; Sat, 08 Apr 2023 12:27:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GyqW+rOF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbjDHTZb (ORCPT + 99 others); Sat, 8 Apr 2023 15:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjDHTZa (ORCPT ); Sat, 8 Apr 2023 15:25:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 148BDB745 for ; Sat, 8 Apr 2023 12:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680981881; 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=WHos8LM0VawSvsV7ilkV4J+3kFj+NjV9a1WkRGl+L9k=; b=GyqW+rOFVjAo+g3QKLZlsXiTpvl/03GWKIXzMvlCTVj2AK1JKZnjaSUcPLRtriP4rTVZcD LxF0IEqcrsH804ozoDU95dEnnjbWdeKec1aocsrHwJIqWup1AuWGOv4b/daGBwuFTw/OpT 8nOt6BcWfL7q+vYPqZo00dazVzSh2tQ= 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-170-eMMT_24CMTGEkuTyNfCu2g-1; Sat, 08 Apr 2023 15:24:39 -0400 X-MC-Unique: eMMT_24CMTGEkuTyNfCu2g-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 C8BE029AA2E7; Sat, 8 Apr 2023 19:24:37 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E273492C14; Sat, 8 Apr 2023 19:24:37 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 4ED6B307372E8; Sat, 8 Apr 2023 21:24:36 +0200 (CEST) Subject: [PATCH bpf V7 0/7] XDP-hints: API change for RX-hash kfunc bpf_xdp_metadata_rx_hash From: Jesper Dangaard Brouer To: bpf@vger.kernel.org, Stanislav Fomichev , =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= Cc: Jesper Dangaard Brouer , netdev@vger.kernel.org, linux-kernel@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, anthony.l.nguyen@intel.com, yoong.siang.song@intel.com, boon.leong.ong@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, tariqt@nvidia.com, saeedm@nvidia.com, leon@kernel.org, linux-rdma@vger.kernel.org Date: Sat, 08 Apr 2023 21:24:36 +0200 Message-ID: <168098183268.96582.7852359418481981062.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 3.1 on 10.11.54.9 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current API for bpf_xdp_metadata_rx_hash() returns the raw RSS hash value, but doesn't provide information on the RSS hash type (part of 6.3-rc). This patchset proposal is to change the function call signature via adding a pointer value argument for providing the RSS hash type. Patchset also disables all bpf_printk's from xdp_hw_metadata program that we expect driver developers to use. --- Jesper Dangaard Brouer (7): selftests/bpf: xdp_hw_metadata default disable bpf_printk selftests/bpf: Add counters to xdp_hw_metadata xdp: rss hash types representation mlx5: bpf_xdp_metadata_rx_hash add xdp rss hash type veth: bpf_xdp_metadata_rx_hash add xdp rss hash type mlx4: bpf_xdp_metadata_rx_hash add xdp rss hash type selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg drivers/net/ethernet/mellanox/mlx4/en_rx.c | 22 ++++++- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +- .../net/ethernet/mellanox/mlx5/core/en/xdp.c | 63 ++++++++++++++++++- drivers/net/veth.c | 10 ++- include/linux/mlx5/device.h | 14 ++++- include/linux/netdevice.h | 3 +- include/net/xdp.h | 47 ++++++++++++++ net/core/xdp.c | 10 ++- .../selftests/bpf/prog_tests/xdp_metadata.c | 2 + .../selftests/bpf/progs/xdp_hw_metadata.c | 42 ++++++++++--- .../selftests/bpf/progs/xdp_metadata.c | 6 +- .../selftests/bpf/progs/xdp_metadata2.c | 7 ++- tools/testing/selftests/bpf/xdp_hw_metadata.c | 10 ++- tools/testing/selftests/bpf/xdp_metadata.h | 4 ++ 14 files changed, 213 insertions(+), 30 deletions(-) --