Message ID | 168098190163.96582.14141656128558792381.stgit@firesoul |
---|---|
State | Handled Elsewhere |
Headers | show
Return-Path: <intel-wired-lan-bounces@osuosl.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=5vy7nSnn; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pv4vJ6q3Xz1yZC for <incoming@patchwork.ozlabs.org>; Sun, 9 Apr 2023 05:25:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 24FE241E22; Sat, 8 Apr 2023 19:25:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 24FE241E22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1680981915; bh=qfG0C8xFZBA9tHUzFVzcQ+0UwGYl57S6dT5xWNYshzA=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=5vy7nSnn6u6h4LkMKqvy9DvFsF9dV8F1cc3GRIFkFQTj3IXalaDoeyG+RUSVLvJ03 KACUqnLMdgu0G17t8qxkS5qJh6EramqGA7cJDZfwXmFz5K0SKC2o7PgWtjkEhzTPBa sAvuhLKwEi7AhqDFMsIaMa7fsI9TZobkCxnnQFKc6U/341j5I0yl2QCavXiVBc8cRr RkBdnh5k+Na4JLcUOc9YCrRjLjJD2zWeXj33PSuX3lnhAdqCSF7MndA4eBf40tE97S bcFdz+bqAeSUXQH84B9jVXCkeBFkARyhjOnq/+GWOGt2IMmrnB076+KDVCHKNStxsS zF2LYeRvQLuTw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27BhJzxRP-7e; Sat, 8 Apr 2023 19:25:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id E34D241DD1; Sat, 8 Apr 2023 19:25:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E34D241DD1 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id A5FC81C31BE for <intel-wired-lan@lists.osuosl.org>; Sat, 8 Apr 2023 19:25:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7FAC560BA1 for <intel-wired-lan@lists.osuosl.org>; Sat, 8 Apr 2023 19:25:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7FAC560BA1 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2OL_6ZqxWkWB for <intel-wired-lan@lists.osuosl.org>; Sat, 8 Apr 2023 19:25:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CB18660B73 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id CB18660B73 for <intel-wired-lan@lists.osuosl.org>; Sat, 8 Apr 2023 19:25:06 +0000 (UTC) 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-657-qKQ_Wpd7MmG4Nk8i7aLaig-1; Sat, 08 Apr 2023 15:25:03 -0400 X-MC-Unique: qKQ_Wpd7MmG4Nk8i7aLaig-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 DC81029AA2E7; Sat, 8 Apr 2023 19:25:02 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 912CE492C14; Sat, 8 Apr 2023 19:25:02 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id A6044307372E8; Sat, 8 Apr 2023 21:25:01 +0200 (CEST) From: Jesper Dangaard Brouer <brouer@redhat.com> To: bpf@vger.kernel.org, Stanislav Fomichev <sdf@google.com>, =?utf-8?q?Toke?= =?utf-8?q?_H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com> Date: Sat, 08 Apr 2023 21:25:01 +0200 Message-ID: <168098190163.96582.14141656128558792381.stgit@firesoul> In-Reply-To: <168098183268.96582.7852359418481981062.stgit@firesoul> References: <168098183268.96582.7852359418481981062.stgit@firesoul> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680981905; 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: in-reply-to:in-reply-to:references:references; bh=KMxLHr1nEJDBRCg1B8L488/y3xeAF5pIZJtw2W0lrWE=; b=KEjE4kHffKcM0HStbu7nfEIDX5/OqDrI6D+5XK+Rpc9GUd1mQPo7bPzb5BmGHAGdsCs9Pk M/NJsEMcnsg1O9V4mr23PyrJYw/ru4l1rIKhePb8haJT5SLsngRW/qN/bTiIM6hq2YNrLE sw3A/4VrXHt5aC30mVA8vHC/L6caH/o= X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KEjE4kHf Subject: [Intel-wired-lan] [PATCH bpf V7 5/7] veth: bpf_xdp_metadata_rx_hash add xdp rss hash type X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development <intel-wired-lan.osuosl.org> List-Unsubscribe: <https://lists.osuosl.org/mailman/options/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe> List-Archive: <http://lists.osuosl.org/pipermail/intel-wired-lan/> List-Post: <mailto:intel-wired-lan@osuosl.org> List-Help: <mailto:intel-wired-lan-request@osuosl.org?subject=help> List-Subscribe: <https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe> Cc: ast@kernel.org, edumazet@google.com, anthony.l.nguyen@intel.com, boon.leong.ong@intel.com, hawk@kernel.org, xdp-hints@xdp-project.net, daniel@iogearbox.net, linux-rdma@vger.kernel.org, john.fastabend@gmail.com, jesse.brandeburg@intel.com, intel-wired-lan@lists.osuosl.org, Jesper Dangaard Brouer <brouer@redhat.com>, kuba@kernel.org, pabeni@redhat.com, martin.lau@kernel.org, larysa.zaremba@intel.com, leon@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tariqt@nvidia.com, yoong.siang.song@intel.com, saeedm@nvidia.com, davem@davemloft.net Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" <intel-wired-lan-bounces@osuosl.org> |
Series |
XDP-hints: API change for RX-hash kfunc bpf_xdp_metadata_rx_hash
|
expand
|
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 424e8876a16b..e1b38fbf1dd9 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -1652,11 +1652,14 @@ static int veth_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash, enum xdp_rss_hash_type *rss_type) { struct veth_xdp_buff *_ctx = (void *)ctx; + struct sk_buff *skb = _ctx->skb; - if (!_ctx->skb) + if (!skb) return -ENODATA; - *hash = skb_get_hash(_ctx->skb); + *hash = skb_get_hash(skb); + *rss_type = skb->l4_hash ? XDP_RSS_TYPE_L4_ANY : XDP_RSS_TYPE_NONE; + return 0; }