Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3162409rwl; Sun, 2 Apr 2023 01:31:36 -0700 (PDT) X-Google-Smtp-Source: AK7set98FsblJDRFsVN/OV+m9wEQR9XGrc80FX/JOPIZ+VoZwUfT6W0XLvKLdak7Q6xvlXBjpE9D X-Received: by 2002:a05:6a20:4924:b0:cc:9643:1f8f with SMTP id ft36-20020a056a20492400b000cc96431f8fmr29825768pzb.13.1680424296045; Sun, 02 Apr 2023 01:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680424296; cv=none; d=google.com; s=arc-20160816; b=znyyaCfl/Z0jn8euGKXLnsRnQlF2+a58nZJf6FthUpnQjH4HsT8bMoELN2pMrfnE98 p9jT6y+BI5Nvrt0DxWc/m/yWoZU1lPvIVu2kUgqjNAKs7F5azPS/1iw9DnVSJPBQBLzD si+k2PPvEUwsYpYrA1CAaeQ3VPd+jaunf52/mCTs9VGTPCNtWEB0Vusw5m+dMA9Nr2yq Dm2dFpMwHdSW6glDty1Ue9tAOwuCS7pQMzAKSlecaTILdjj2gwqdKDEHXc7lc7TjYeZ2 2RyCAnGkSDL9isprgK26fgJUY+i8wO/hMQ4NmExzvh1OArtB/1PpDOLuGK6xkSifogQa FhOQ== 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=fjMU4p9+DXZHNmOHLlNl/8Bfex0ApnD0yNYoZFOYHXs=; b=aqNzXGC9vXvPz9iWQzBRrvxjnvHYvDOyuYmdhDGkOfRRPLVHSbH4ztkMewMdU8+pbN FMIu+taCnqvniRLoHPTwFUmzoAcZ+Gac9pYnZSXzGgkyinu/4GFkrla9XlXp3Sa/OqSp e5pfVArSgRe0ZQ3tp8dXIuXJlnHkJXdGNoOsjvnb4/ei9QlCchx2XLfs7CoQf8JouNqC dsjPL9lC6IEBRR4hoNFLYmkMH6UjByny2HKKl9IG46YhoYNTeerDVb9/7Es/wgnD0Thy p9rq50t+/0faGL/BOnDdsVSjQ3rn7bucHVS2lE41uVmLz8rdNRIPR1mi43U2OwCmhu+k H8Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="UlE/2/gk"; 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 k23-20020a628417000000b0062a9bb7ba2esi6558353pfd.263.2023.04.02.01.31.24; Sun, 02 Apr 2023 01:31: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="UlE/2/gk"; 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 S229646AbjDBIae (ORCPT + 99 others); Sun, 2 Apr 2023 04:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjDBIac (ORCPT ); Sun, 2 Apr 2023 04:30:32 -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 0FF42F76B for ; Sun, 2 Apr 2023 01:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680424186; 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=fjMU4p9+DXZHNmOHLlNl/8Bfex0ApnD0yNYoZFOYHXs=; b=UlE/2/gknE9BmPRSTX+7FApRWBgBePfLBd+di1PQ/fw/aQK2cc1DISiabFVcMzv4wiaQhP 0XPcOQtP5O/WF2qKJ0w46VQ6jmdeS7xsnNrTCa9vqD3oq/hFXXdB8sC0XtYte+wO+AQDfD SZGCuAbYVLMfUEQLsVYNwY93fIC8Ajk= 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-497-pC-a7scgODqWaQKYKe72UQ-1; Sun, 02 Apr 2023 04:29:40 -0400 X-MC-Unique: pC-a7scgODqWaQKYKe72UQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BC516811E7C; Sun, 2 Apr 2023 08:29:39 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26D1E175AD; Sun, 2 Apr 2023 08:29:39 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 2459830736C72; Sun, 2 Apr 2023 10:29:38 +0200 (CEST) Subject: [PATCH bpf V6 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 , =?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: Sun, 02 Apr 2023 10:29:38 +0200 Message-ID: <168042409059.4051476.8176861613304493950.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.5 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. --- V6: - Resend: selftest failure is unrelated (in xdp_do_redirect) Issue in fccca038f300 ("veth: take into account device reconfiguration for xdp_features flag") V5: - Fixes for checkpatch.pl - Change function signature for all xmo_rx_hash calls 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 | 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 | 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, 180 insertions(+), 24 deletions(-) --