From patchwork Fri Jan 26 04:52:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 192403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp446562dyb; Thu, 25 Jan 2024 20:52:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBhN1sBQ/b/ZYQc31eXMN/j51uZxSxE061kBs703r7tC49fv83oqtYgI8NcZy8Jvm6vlbK X-Received: by 2002:a05:622a:2d2:b0:42a:7e46:fb43 with SMTP id a18-20020a05622a02d200b0042a7e46fb43mr113227qtx.64.1706244774344; Thu, 25 Jan 2024 20:52:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706244774; cv=pass; d=google.com; s=arc-20160816; b=AOZ3sdjrubFZh+14gye8WNWt3FTyAoEhK95cMxAH4cLtrhHeDllO4lMYF/pLUKpxVc LsQiyt1o/1mgatmX1QC7YeoW3xaj9fXAqLPI6Xg7ceqEW427Hmx9aXhLSFtVlMIFwbDO vssr3X3YV5wz/wMrWiLAzdV3WkQQYrdNpiC76/LWEy51fa9QAnePcGpRxHiTmO3fdgly Ln+sDBY+56S2gr3qoL5LHqfTDv/27WvRiplbdiymMyj6js1mvFE83PPKGhzmBLGJFhET xLeEvap4XZxs8O7k3wOlrde2huTSaXM8rqKgoM4EvoS88Ii0bu3Nk/F9Ehw6+jOu6A3z kgrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=P26+gqwDuoF2xBBQQLZk1oY/V9GgXjV+6KzSOls+agk=; fh=fXglUzvFb2UdN+tlgKJuWgCnq9kfiKpmowIOK0NHDwM=; b=Wz26y+eVUbMV01l9k8az3D+VTlOIQP/bm82JkBzT4ie0GCZ3+xDEpgTJro74IjO+iq 297zL9W8bzu4XxBVi5c4A8lXn0ZekVDGB9HAUOH46hAKk+HFsBm91THCEn2pnqXFS5ZA knpqHVn0rxE8OT/NjaRkC0hQq6z1jmHZI8Psv/ZRegy5HfppiLzTCTEA8fgEn4Xpp2e7 +eoQsJLy/1sPgKP1RtyinyeIhMZACKamVbaGn0n2BioV1PTwy8x5bAka90Z9Bwdxe10q /8eKeRVnpDeun38lueunHygZV1Lfxc6PnIqtLdZCF5bJiB2IZiOK5jjV8UPDOqx+laXr LsKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Y9/OqgHn"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-39628-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39628-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o14-20020a05622a138e00b0042a2978ec96si399964qtk.675.2024.01.25.20.52.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 20:52:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39628-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Y9/OqgHn"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-39628-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39628-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1722B1C23558 for ; Fri, 26 Jan 2024 04:52:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2FB6C2FD; Fri, 26 Jan 2024 04:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y9/OqgHn" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FE74AD24; Fri, 26 Jan 2024 04:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706244751; cv=none; b=c197iWDdVOEvIGtZrlV5ysPNb52zt6/+Y7gu9uqEY4O1rKnFv6iF8wnhfZW85WoR146Zac7o0u6qd0AZYema13OgwjxUqBdTVlljmi2lkSAhurtnY3929u63Rr3DJ87Z6LKVwSu6UCgMkkfLWokfk/X6lGW4vIjm+hAcvf/5LQ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706244751; c=relaxed/simple; bh=zQfHiebOqdsQzLFwfqvLq/yJZG0N1M3/P32WI+xIGG0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=udeCWQKMnKlJ2g24aB910zT1/tEytQbBL9/bk6uDw1ScSxml+qciPxiBaWZoFFtm8FrujfNhDpmDlrhLqnl6BFd+a6J9l6ylr7gTs45Avh6rS+Zvjiv+1jubaCVaFH4b4JIXY+uapFiD1WUtLORA/xPYHNwyLyV8JrB774AOoXA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y9/OqgHn; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1d76671e5a4so35715285ad.0; Thu, 25 Jan 2024 20:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706244749; x=1706849549; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P26+gqwDuoF2xBBQQLZk1oY/V9GgXjV+6KzSOls+agk=; b=Y9/OqgHn2LUsdgfHn5QI+wrE0uqgtc7L+KkBmIPo/jDgdb8uInAlDWoO8FlvRxzKKT 9aN3tmPBGQO6/kmRRIb4lfZ0ZQFU5TET6e87zDIs+6z7FkjDK9m+ODcsHGPJckzSr5xg mRzCemz2JE38Bl9zkuyLOi7jHfn1UXAHn+mRpsEQqSPErBoVyjbsF3vwpMSvLWe/XE0U YVrt8Go8WngBlQcWNjCIUBwp2EOIWDhCidHP/li+7sUdEXNlNE+jJOe9Gi0DNAoPtLTd 71FuNK2xHAMYU3oID2G8Sb8R2dtWDYZgcCqh7REEMd5D8eE45jGfSEzsCqXMtiIAehH4 yxMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706244749; x=1706849549; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P26+gqwDuoF2xBBQQLZk1oY/V9GgXjV+6KzSOls+agk=; b=Qoc64o7dZwMF1oQefAPr6bCX6GkPa7E5NvKFG++ONebnP9x65Y5qE2r7yee/YPc23Y GM5YdmRAJH0CPsL8kvTjjHXMHjHcSPyd8cQiYIcxHCpcn6eDD2PkoSrd7MpQSV1iNN+n Vn0wzf4IjwxSdk6dwHIEONAa6L4uCyh+KtzTEtLHBvLqmE9UfQxh/zDK9ZtzxVBb2ucp B7zRNvJ845JLixXToMTqRvSK5aazw3o3/EEUfQqI6prbsmJqsx43BXYRWCwC9LrPiqx3 Vpg5oPq99ilc+hrq0/Ov8jZ6COh5vRLs70TgNMHN5fRBbLRnwAirOmWwddE8g9bp+i9+ PSIg== X-Gm-Message-State: AOJu0YyKZuq4tNWR7sSEtJiJr4MsAeuBDAGV1z08K3cdTrQBpn5L1HXV ZfFRkR7p/vb9mg/nnU8lvMaL2PD72aQmNGWvos8FV2iAEEjTMNav X-Received: by 2002:a17:903:40d0:b0:1d7:79c5:8f5a with SMTP id t16-20020a17090340d000b001d779c58f5amr986229pld.134.1706244749125; Thu, 25 Jan 2024 20:52:29 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.61]) by smtp.gmail.com with ESMTPSA id v10-20020a170902d08a00b001d72f145ebdsm307219plv.35.2024.01.25.20.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 20:52:28 -0800 (PST) From: Takeru Hayasaka To: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mailhol.vincent@wanadoo.fr, vladimir.oltean@nxp.com, laforge@gnumonks.org, Takeru Hayasaka Subject: [PATCH net-next v3] ethtool: ice: Support for RSS settings to GTP from ethtool Date: Fri, 26 Jan 2024 04:52:20 +0000 Message-Id: <20240126045220.861125-1-hayatake396@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789117115340919770 X-GMAIL-MSGID: 1789127320541260415 This is a patch that enables RSS functionality for GTP packets using ethtool. A user can include her TEID and make RSS work for GTP-U over IPv4 by doing the following: `ethtool -N ens3 rx-flow-hash gtpu4 sde` In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e, gtpu(4|6)u, and gtpu(4|6)d. gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does not include a TEID. gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that includes a TEID. gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios. gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6. gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended header includes Uplink, applicable to both IPv4 and IPv6. gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink, for both IPv4 and IPv6. GTP generates a flow that includes an ID called TEID to identify the tunnel. This tunnel is created for each UE (User Equipment). By performing RSS based on this flow, it is possible to apply RSS for each communication unit from the UE. Without this, RSS would only be effective within the range of IP addresses. For instance, the PGW can only perform RSS within the IP range of the SGW. problematic from a load distribution perspective, especially if there's a bias in the terminals connected to a particular base station. This case can be solved by using this patch Signed-off-by: Takeru Hayasaka --- Sorry for the delay. I've been swamped with other work and fell behind. Since Harald has been supportive of the basic structure in the previous patch review, I've kept it largely unchanged but added some comments and documentation. I would appreciate it if you could review it again. .../device_drivers/ethernet/intel/ice.rst | 23 ++++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 74 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_flow.h | 22 ++++++ drivers/net/ethernet/intel/ice/ice_lib.c | 37 ++++++++++ include/uapi/linux/ethtool.h | 41 ++++++++++ 5 files changed, 192 insertions(+), 5 deletions(-) diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst index 5038e54586af..6bc1c6f10617 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst @@ -368,16 +368,29 @@ more options for Receive Side Scaling (RSS) hash byte configuration. # ethtool -N rx-flow-hash