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: 13532092 X-Patchwork-Delegate: kuba@kernel.org 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y9/OqgHn" 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-Google-Smtp-Source: AGHT+IE9jwdXNArL6NHF5udFDsw+h2e7CQ9gVUoLcoq+TSLGeYsdGuNhweDxzbMioqJFf5cjv/V0ag== 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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