Message ID | 168028891417.4030852.6359930131140625813.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=2605:bc80:3010::138; helo=smtp1.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=IkRXC1Cj; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4Pp8cd0y0rz1yY8 for <incoming@patchwork.ozlabs.org>; Sat, 1 Apr 2023 05:55:29 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 859758472A; Fri, 31 Mar 2023 18:55:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 859758472A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1680288927; 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=IkRXC1CjkOYhITGPznDTCXiiXGrfYKIJhH9RRSfn1Hjs+LaS5/5VLgpPD+nLQmgRS fjEAmj+e6FPucERQPm02hsjMsN6Tum+4XcopPq22P+1CH6FcqaBNomHusIp1V46Oxa qcC6/yZmYA3gjML6tTb62oJmBD3nNQ9a3lBaXplkEp5fzsI/e6ALm7akok8fxirVz5 7UCpIWNeJHoluqjT4khN0F6A+7iP/hN1VW5RAPz+6ku3ODyAPFGY2pjsoqblOFMOht 2V87Q9nJPoIaUSSWv6hRu1BvaLAu6X5zToC6R9/oSHc53a0T4Q7hKv1rlXHlaKEMmW ymLz5Y997IDjA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jrn7mWKH_KVO; Fri, 31 Mar 2023 18:55:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 921A684711; Fri, 31 Mar 2023 18:55:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 921A684711 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A95BA1BF3D4 for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 18:55:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8E0974220B for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 18:55:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8E0974220B 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 E55LyV_t5DnU for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 18:55:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 36D4E421B7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 36D4E421B7 for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 18:55:21 +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-262-z5kIhVglNmSnvJxlephL-Q-1; Fri, 31 Mar 2023 14:55:16 -0400 X-MC-Unique: z5kIhVglNmSnvJxlephL-Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6504B2810C1A; Fri, 31 Mar 2023 18:55:15 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EA5B2166B33; Fri, 31 Mar 2023 18:55:15 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 357AB30736C72; Fri, 31 Mar 2023 20:55:14 +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: Fri, 31 Mar 2023 20:55:14 +0200 Message-ID: <168028891417.4030852.6359930131140625813.stgit@firesoul> In-Reply-To: <168028882260.4030852.1100965689789226162.stgit@firesoul> References: <168028882260.4030852.1100965689789226162.stgit@firesoul> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680288920; 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=Ej7XFocO6xj9ulhAe2suZJ0X8PFXaQlEWw1XCm6Ovxqg31q/y4t3pLHJplD0YyNPxRGSDJ qU2YCozbz5UZfb1t2RyVi3+G3pi1r4E3vIbBM62XPtXyi2a8O1yLKb8IIh0ue+Z8YoFhh+ WaMX6cyiEE47yx1X6N2S/vxItsIK8k8= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ej7XFocO Subject: [Intel-wired-lan] [PATCH bpf V5 3/5] 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: xdp-hints@xdp-project.net, martin.lau@kernel.org, daniel@iogearbox.net, larysa.zaremba@intel.com, netdev@vger.kernel.org, john.fastabend@gmail.com, ast@kernel.org, tariqt@nvidia.com, linux-kernel@vger.kernel.org, jesse.brandeburg@intel.com, kuba@kernel.org, pabeni@redhat.com, yoong.siang.song@intel.com, Jesper Dangaard Brouer <brouer@redhat.com>, boon.leong.ong@intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org, davem@davemloft.net, edumazet@google.com, hawk@kernel.org 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; }