Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2443265rwl; Thu, 30 Mar 2023 10:19:26 -0700 (PDT) X-Google-Smtp-Source: AKy350aJLTTG+0Q7Jr5nwgk3Gn1G6TRQZ2eXU/iTmslK1eTiaGo+O9cvpiPgi/QU9eliL0ZiIwgB X-Received: by 2002:a05:6a20:1585:b0:d9:a977:fae with SMTP id h5-20020a056a20158500b000d9a9770faemr2961990pzj.3.1680196765799; Thu, 30 Mar 2023 10:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680196765; cv=none; d=google.com; s=arc-20160816; b=z5tevFfLY9EuQGGN6ARrY25t/0lutccwVvSxaxKjmd88q8CTyylavqnEOlkfsFZmqQ u6ZiH7oe/sIGy7fLoRF3XUMAygHc142V0vRU9BkyJyjENS3x3Ntgebd6BO2nIFOGYbff h38udTZUtKEQgpGi6n+y5UITieg9nRuOV1F88wnE9A0P4u/fctqY1W2YlwEmZ3QElb6y 4h8YF1fwoBqas/1RjpTL2nqovDH4FJ9Xi5YlXxxbWKYmO7SR1oy7N8m8N8inTNFPLvFF qj5E1Y0U05KThkZYax6KjGEQpFu2z56xZJHMbV9kawgIaHUmuhm6fCOuNQ4qiIDoXc0I lNTw== 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=vEiCemmKyXQlz2Hqo8bHOiogjHXuOrfjM9gWP+5n7L0=; b=jaBAg3hU2Xc5SMBJKya1BszfJdlFno4Y6uuBBToTajbUOuqoqxTVcJa8yRbLRCeg6T xuSobBreBg7urwYpUL5H2cMBlh71VwGDlss9433dL+UEAqlXYyR8ivfQwsOfKi46MVDx FHkTrO3XffB/Cj/BYVcE7/HKbuSHbt2lFuFyJ/HKaCU0jUndGvT5Jsg2pAEV9pRXWGvx cpM/Ob2dcruAIPmRvPLKFWE75yoKDjW4faO5awfoDWBuJc51gobBf+hJjnsR7c0nxOWx rEaajtxdfOKf8h/lB3iJ+UDU6CH+uRyIKtiZLutZmpLCYjMOZlJWWXCJpfGnyLNzHad3 et6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="b2FN/j18"; 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 w16-20020a63c110000000b0050c04831b5fsi154935pgf.286.2023.03.30.10.19.04; Thu, 30 Mar 2023 10:19:25 -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="b2FN/j18"; 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 S231378AbjC3RIk (ORCPT + 99 others); Thu, 30 Mar 2023 13:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbjC3RIj (ORCPT ); Thu, 30 Mar 2023 13:08:39 -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 E6501DBD8 for ; Thu, 30 Mar 2023 10:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680196068; 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=vEiCemmKyXQlz2Hqo8bHOiogjHXuOrfjM9gWP+5n7L0=; b=b2FN/j18cou8hheFsfwf/DYlTEvytfaAsEAGNsteyloroUdbJf8mM25pDXd3k0DUuM48UO iU9YZp7AmZR/X7lL0vEWuvwKmgR7Ijl4eSzz+4OIIHnNkC8glyfAHwJr+JI1/7NbGsprNS npU6PSij7cvGrQurBN4UCr54o/MFos8= 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-76-v7LVQCxVMTC5u30CO1FbKg-1; Thu, 30 Mar 2023 13:07:43 -0400 X-MC-Unique: v7LVQCxVMTC5u30CO1FbKg-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 583F53810B1C; Thu, 30 Mar 2023 17:07:42 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAB96492B02; Thu, 30 Mar 2023 17:07:41 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id B0C8A30736C72; Thu, 30 Mar 2023 19:07:40 +0200 (CEST) Subject: [PATCH bpf RFC-V3 0/5] XDP-hints: API change for RX-hash kfunc bpf_xdp_metadata_rx_hash From: Jesper Dangaard Brouer To: bpf@vger.kernel.org, Stanislav Fomichev 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 Date: Thu, 30 Mar 2023 19:07:40 +0200 Message-ID: <168019602958.3557870.9960387532660882277.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 Notice targeted 6.3-rc kernel via bpf git tree. 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 provide the RSS hash type. Alternatively we disable bpf_xdp_metadata_rx_hash() in 6.3-rc, and have more time to nitpick the RSS hash-type bits. --- Jesper Dangaard Brouer (5): 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 | 11 +++- include/linux/mlx5/device.h | 14 ++++- include/linux/netdevice.h | 3 +- include/net/xdp.h | 49 +++++++++++++++ net/core/xdp.c | 10 ++- .../selftests/bpf/prog_tests/xdp_metadata.c | 2 + .../selftests/bpf/progs/xdp_hw_metadata.c | 14 +++-- .../selftests/bpf/progs/xdp_metadata.c | 6 +- .../selftests/bpf/progs/xdp_metadata2.c | 7 ++- tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +- tools/testing/selftests/bpf/xdp_metadata.h | 1 + 14 files changed, 183 insertions(+), 24 deletions(-) --