From patchwork Tue Jan 30 09:53:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 193940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1108416dyb; Tue, 30 Jan 2024 01:57:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRVCZM3kt4rxUNhXyM5HBWx9j60KSrHR2cX/Mo2dgUJEI31suSsJSptGrI44TpxppNVWbN X-Received: by 2002:a05:6402:4503:b0:55e:dcdf:50b0 with SMTP id ez3-20020a056402450300b0055edcdf50b0mr5048658edb.15.1706608671791; Tue, 30 Jan 2024 01:57:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706608671; cv=pass; d=google.com; s=arc-20160816; b=lt6rzWaoo/jyQqUS+6aKyDpvN+BMMlE1eVuRlBmeQqdEjel3h/gzyQCfLiIp1Iau/O vr2NHT8i6rgTSG5lrLb6bYv05uYR1jFzbCOOIxjJo+wtqaMa7TRpFspWB+oppFF5R/VB 0xIe65kaCLGeAF8YDeN9sh6bkcsdqSDSoDGrVoVnw/xju3u+xr+V1qb8KV/6wxe+C3Y0 0+9zeLelChcuXXG3wC+iaddghxIjErbHETeS73uMDK6EGb/KvRWMAFIXJIToLfOqn5nh riGsHptIeau2Gc8YHJ2BP6XIoE1Fk4lNOZZj8C47qTHZefhtMBAa2wTlsprm8OkIt//v miEg== 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=+VJ1MS6porrPSquWwAd+36Q3EfEI0u3EFCLw+C38UP8=; fh=fXglUzvFb2UdN+tlgKJuWgCnq9kfiKpmowIOK0NHDwM=; b=we6chsw58swjBmzqbwGonuRjvR3+SHZ5a6Af8VvhLT5KhqrXFJar1PNDQhAnq7QPOd iAjM0qFQmXPFWeNHm4sBlsjzEXHIHBSfJvLcHebSBZo0AKDWvD3FUZa+VP/yB0RmKG4L obR5bb0q2lMtj9+yjEF1waOGfH+o626GhPwL8KUp8tJzt5eRwqGJFlD8rJLapfwgPMay 43yVNfAOvFoIJXNJygLyuQhIV8F1kg2J4cGlRbfLvKUPJHppiV3OGLCVohK++uyN9zIW i5Sosie1VIKIva6OyiOVUoyM9XerwPp/T3q1gPAAaHJhyif5id2Ufigg8wb9kCDBZcpX Xpsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JtN54auz; 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-44321-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44321-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c7-20020a0564021f8700b0055c38ccb340si4433279edc.109.2024.01.30.01.57.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:57:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44321-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JtN54auz; 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-44321-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44321-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 48D751F270A9 for ; Tue, 30 Jan 2024 09:57:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C9A76774D; Tue, 30 Jan 2024 09:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JtN54auz" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 6436867724; Tue, 30 Jan 2024 09:53:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608401; cv=none; b=qd9ScZHfVdKJYa1IOdG37iJekMxPufKvpz6pCPoUcUSHRWHLnglVlAvwoISVBELqMvE9qEZLzWL+Vg2Vn2MiISPxeSQDPGQqO0ZK69r5qQ7N8KblbStJYS7FRXCgL0SDfgNhdYGT7s8OFtb+tlel8kWxjfRm7pBasb6sCLjCTW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608401; c=relaxed/simple; bh=wtaDpHQjBEdC7/zkr+lb8YZqLRe5LEzL1lVxvFwalMg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rw/yarLlk89jUNOJar1xggPD/iBP9Fee+MwFNuj468WPNuajYJcZ1Z1pqrtfNwrfiTdoKvHIyXl751qwHLs2U5Lo0jYKB4hc7+XcUZrkzXzyoK78+ezcOvdCjvXc1VJFvWz8l7oQY4j/a2VFp0/ll+c9sBM1THz93JldbzIS4wY= 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=JtN54auz; arc=none smtp.client-ip=209.85.214.182 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-f182.google.com with SMTP id d9443c01a7336-1d8dc0172d7so10519785ad.1; Tue, 30 Jan 2024 01:53:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706608398; x=1707213198; 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=+VJ1MS6porrPSquWwAd+36Q3EfEI0u3EFCLw+C38UP8=; b=JtN54auzxBN1PDiAegq9ZPX04r0Ubrp1JyoBmtOOa47RGsDS7tcijYOE93HX6IzhIP Tbpv+xgqlFcw8NiNGldqJ11pfGUcsi7pS/VgM71WSCbzhtkFQN09gb0HX87pcV9MWZML G1YeqAbBJ0NzQ1+MVtnevCD6iXY6eazTp3435OleNYvygL/2WsiGQPTxG+jnEO40R/ZJ pmVmoGPcVAiYihuEVoW3PRxdguutgC3H+ej3QjgMu0RLPqsobc7w6Mz9vyt7anXLFGD6 0bsze9tdUkAPcJPV3DEoisl7kmeZfx6aoVV7HIVYKzFyxstSbheKQ7wMMbbrVoMstgLK jJlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706608398; x=1707213198; 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=+VJ1MS6porrPSquWwAd+36Q3EfEI0u3EFCLw+C38UP8=; b=g/ISgIRyX4vVPysnh4N2IcyTTKUcKi5HMRlZOZntWO9I7Fqxk3Y8ctmtqzIFABOJwZ 5vTu2+fZieAbAWe7sfeHQ5+Z1nfWyXcHHq6Az7fsLYe9v2Ajsg7sRhia8iJ7SVezya9t lvn8kzuWgcJsT46YQ5n898xGGngpjL0R23GqwJdi02eFQQ4w2UJADFnyJKGRty97p7fu zqNsJEm4vZ+JydIMayuAWyxDi16aOiYHUuXHFE5GgicP3oMLMtFiInnHF/QBSStiXo/p P7ruVcKplRA2KBCRywMKEqAbPjFKorORuBTQ/bAZV0weUYJrK//yRAL7j3m4LbYZPHoW HIJQ== X-Gm-Message-State: AOJu0YwBZTN3VXsZmFGBBpNo5Z34d5ie6HhDDXEZ0SIdWrHLD11lbzLg KX04dipAoeTVEdmgayCx9TWBHC1GNgeRAi20CjCutrklYCHIjoBv X-Received: by 2002:a17:902:654e:b0:1d8:d583:1811 with SMTP id d14-20020a170902654e00b001d8d5831811mr3494710pln.38.1706608397617; Tue, 30 Jan 2024 01:53:17 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.62]) by smtp.gmail.com with ESMTPSA id r18-20020a170902c61200b001d8f0e4bc32sm2624486plr.144.2024.01.30.01.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:53:17 -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 v4] ethtool: ice: Support for RSS settings to GTP Date: Tue, 30 Jan 2024 09:53:07 +0000 Message-Id: <20240130095307.951049-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: 1789508894741301639 X-GMAIL-MSGID: 1789508894741301639 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 --- v2->v3: Based on Harald-san's review, I added documentation and comments to ethtool.h and ice.rst. v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and GTPC_TEID, and revised the documentation and comments. .../device_drivers/ethernet/intel/ice.rst | 23 ++++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 82 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_flow.h | 22 +++++ drivers/net/ethernet/intel/ice/ice_lib.c | 37 +++++++++ include/uapi/linux/ethtool.h | 48 +++++++++++ 5 files changed, 207 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..6f48688940c4 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