Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp896911rwl; Wed, 12 Apr 2023 05:48:37 -0700 (PDT) X-Google-Smtp-Source: AKy350aORrwYoV/F2d8FfzRq34v7NRxUbOyFne1sI9oNMuocXbHasiYkNGIGwxwCNhSslkkO9GDX X-Received: by 2002:aa7:d795:0:b0:4f9:e6f1:5c7c with SMTP id s21-20020aa7d795000000b004f9e6f15c7cmr5840136edq.32.1681303716782; Wed, 12 Apr 2023 05:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681303716; cv=none; d=google.com; s=arc-20160816; b=gbk45p+WuvINHQBxPNy7vMaIbkgNyVMMqQdsBfuIf33X88ozlasX6GFjBMBjbChILO ZMKfkkn5YRmIQK8Wi/LldOI10qUu4b8QYjxSgarXIzgE47zQQNL6O+W10A9VCKVmchxp azLIypvv1xmU1Q42bgg54sNoWO1gyzbgsDFDSokXB9U40pGlnr37Kg8ry+L7AJ05UoHG DJc8KYaDDVO059rXR33JMv3630XCRjG1kezTcSPVE/DmROX7SUFO6B6yuV9ytlum3Z0G tOTbsVGi77oQZNt7QvinFttvnzZvmb4wnoG3R05sxI/oH0jMcfCuFG03DTrQkvL0tlOP B46Q== 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=MSTd3POftj4h2e704fIbWzCftjTruaveQ7UYCHjIbM4=; b=zJ9X+jM+4nZLuGPcbltrw0Zgka24a15uRhrmrUeXblb8TMe6aCVJK3IMoVqa0s/3hZ 6XrAw+cWyXZ2qFAyH4fatgjhjU67vBwWfBS+uY+PFjxgHWZhYOfCn8PkvjW6rbNf9X4/ N4SGZjLmM4cEtgYPBrbujfKMzcWN59zVAmh9jt3Mx4ELGNazwQPZN74BLAx2AzoakI4L oAaVbvh2s9iI674ffpF4V9faAP+NDEy3oRqpAkgWXxy6C1oaAVPepVovZZLVaEQwMXO6 A80jZFAQGD9fjD2RkbyCZm4jdHxOgh9t5a8WSUkpITHl9PELhNYGPOraWFNK2waG2j+x D2EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FiL9ooVF; 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 t14-20020aa7d4ce000000b00504a26aa3f8si51520edr.422.2023.04.12.05.48.12; Wed, 12 Apr 2023 05:48:36 -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=FiL9ooVF; 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 S229866AbjDLMo3 (ORCPT + 99 others); Wed, 12 Apr 2023 08:44:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbjDLMo2 (ORCPT ); Wed, 12 Apr 2023 08:44:28 -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 1F8E48A71 for ; Wed, 12 Apr 2023 05:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681303369; 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=MSTd3POftj4h2e704fIbWzCftjTruaveQ7UYCHjIbM4=; b=FiL9ooVFf3wfNGZFpPHRidiTjZlKZ2PzIRzNgib4GYTAaDuBZEVKKBNEa3zuBcPA9f90GM w/gr2Rctr6rIlJuXutK5CdhbTlndKKr0mTaNbN9Kzed0RGTByyvzvAwOamPpuiKgqyY447 E2Y+NFr/XlotxdasaKoLC331tLj7xZ4= 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-246-Yfzo9jGINE6dMV-7IA32FQ-1; Wed, 12 Apr 2023 08:42:40 -0400 X-MC-Unique: Yfzo9jGINE6dMV-7IA32FQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D5B5811E7C; Wed, 12 Apr 2023 12:42:39 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48B011121320; Wed, 12 Apr 2023 12:42:38 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 1EA04307372E8; Wed, 12 Apr 2023 14:42:37 +0200 (CEST) Subject: [PATCH bpf V8 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: Wed, 12 Apr 2023 14:42:37 +0200 Message-ID: <168130333143.150247.11159481574477358816.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.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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. Instead counters are introduced for relaying e.g. skip and fail info to end-user, this can be further debugged by re-enabling bpf_printk (when driver devel troubleshoot). --- 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(-) --