Message ID | 168027499706.3941176.15786196864241739433.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::136; helo=smtp3.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=BLFVCQoR; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4Pp3T01Sxyz1yYb for <incoming@patchwork.ozlabs.org>; Sat, 1 Apr 2023 02:03:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 71B91608D8; Fri, 31 Mar 2023 15:03:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 71B91608D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1680275010; bh=jB1NgXpDDG7RAOhKlWQze5eurnAl7vgSMVUh8l4CBSA=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=BLFVCQoR4tdbGnEMR9a3H/azc8yWGjTYsIqGkERX9p74FpI24nwkXqV0pW/KtFzIk 6PzZWLydXb7+HUUFWz3q8iDNC6GhuNI5vnq4WlN7LjwuYvNn6bb3fUS+XEFxFqs+UO aLB9TUKv8g/3/kKTSpzyl8uqhD0ZhiqmyERyMOU3igRiTLySAPJRIIkBFhyVvyLyka sWU7IvgnXMJfJRTVIjqD3twLKUY1MykTDAJWicwx0UefOV6ff/ZXpC2eNmUNEb8heB 9ByRE/TqI4JLQZrYcpYvwPc47bNC+aiV+55rDctM6lOH0ZoroINfDyjvhCNijpi74R e/086vvgO7VnQ== 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 nn6qlER7z6lc; Fri, 31 Mar 2023 15:03:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id E4F9160ABA; Fri, 31 Mar 2023 15:03:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E4F9160ABA X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 378571BF33F for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 15:03:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 10EFE405C7 for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 15:03:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 10EFE405C7 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tBXBghjt8xBX for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 15:03:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5A53A405C2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5A53A405C2 for <intel-wired-lan@lists.osuosl.org>; Fri, 31 Mar 2023 15:03:24 +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-27-FDIny1NROJGiQI5iw8F-Iw-1; Fri, 31 Mar 2023 11:03:19 -0400 X-MC-Unique: FDIny1NROJGiQI5iw8F-Iw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E46029ABA03; Fri, 31 Mar 2023 15:03:18 +0000 (UTC) Received: from firesoul.localdomain (unknown [10.45.242.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 036B0492C3E; Fri, 31 Mar 2023 15:03:18 +0000 (UTC) Received: from [10.1.1.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 1A22830736C72; Fri, 31 Mar 2023 17:03:17 +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 17:03:17 +0200 Message-ID: <168027499706.3941176.15786196864241739433.stgit@firesoul> In-Reply-To: <168027495947.3941176.6690238098903275241.stgit@firesoul> References: <168027495947.3941176.6690238098903275241.stgit@firesoul> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680275003; 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=NTHm0roWAf7TQFvInPD+g2gqpP2BBJVAUuG4X2BR8/k=; b=WpRQTFCdLn64x4dWwtFBm8kcKgexBTbHHim3L6OcZdoCjrgv4me0gNhxsR/f7sy9Y/40rM A8vUk+VSKhBdx1kSZHzO8WgWCt/IBFs3HwgZ7phGSFE34h0LpnQYczJ3sXPejAGsCa9K1d iibNnQvBxYLndTaPEj2XWuntfVnLjt0= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WpRQTFCd Subject: [Intel-wired-lan] [PATCH bpf V4 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 c1178915496d..f5381e7c9310 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -1648,14 +1648,19 @@ static int veth_xdp_rx_timestamp(const struct xdp_md *ctx, u64 *timestamp) return 0; } -static int veth_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash) +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; }