From patchwork Wed Jan 31 01:37:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 13538488 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 DABF01366; Wed, 31 Jan 2024 01:37:17 +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=1706665039; cv=none; b=nOlWWhYcLb06qgzfUdX2mWxDzA8ORDFHqGJ+CnPpm3Vwux7/uOwpfmya4glTwP+6+GpJZrcUwm2o0s5a8ROBjxRW/9/faiIFaoKGy0yYLlCA8nfFNlRu+HE44v0xOPQodtqS0Qs9xt+L/VTw9NkK6j6CViMyLmrmE1UF+FtJlBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706665039; c=relaxed/simple; bh=PBzA3mii3tD5V4xglUaDyvmq13a9r0IFuxl805MbStQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=uYUu9gRnYYzCp+kwASy/I9sEUJqTx7kchWbVRgLGCPOGSasvdDypwshQVSM/Qa9OdQ+DesELcJIvZhy8Eo03nf+kp9LoYIFesfMoa4h+YQTYcxl8RksJnHC41PCLmEtLxpkEY9msMpWol+3aOonEV49SgcKjlPDlRgRZm2vADKY= 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=aMV5yjwq; 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="aMV5yjwq" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1d751bc0c15so39508435ad.2; Tue, 30 Jan 2024 17:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706665037; x=1707269837; 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=14iB60VCBARClq1G+KDdJYIVXfRFQYBCF36CVObY9WM=; b=aMV5yjwq4WjY8/kPzSX50T40oTa2AZlnNvm5kXQ6s0sWdXP3ucRiFbrR6vDgs9imDL YuYl3OPnkk4I2Ia2+FkRMGQz9rJOzPWwNmP7bXNu6Q6G/cP1ko83E4t8PWe0wBbQqFIs Keout/SCk0UfBnUtg0qjbbyVZ1JtPZv8/IS1klioRRS+4Eq3tphF6s5At4+SiRp3q1jP yYNhscahP+7s/rEXumNXh/w5oQ4z0hKkeUNBZ144vlVDLGeVYsFfsBQgUhLlSFvQ/LZI oqk4HPsVH3ZXIdr45wBfhw654o/SXJTCgkpF5E7mvW+fqqZO2iWO1v90+rmCBmmutZHk hmJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706665037; x=1707269837; 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=14iB60VCBARClq1G+KDdJYIVXfRFQYBCF36CVObY9WM=; b=Bb7n3EjL7YC8rops3BceuIbtIxkw1c9IvZRqcqu29yLzJ+FpLtNnAyrfWiGXGgod8s P9Rt35YHX3SPHvpgaop4SN0/XzhS1Ye+rtaeUpPJFCHQdpcaxH/uTIXfgcmIsbZ+go3J 6ItKVDwI6F4IxiOwwzKUENk5nXIMMDP+WIVHZbT4xTBJE785r63hWOoirwZZ++Rz2hkJ RY0RREqV8A30WdPDhtdEB5jqtnY6UdzwVV4hdA4QFr+DACRdZmA/Mc8iSlOoCVf0J/xX tBE8X5wznct/u6puBaUwCjbTZNMlu4UwHL1sXzZf0rwTRqGiEfDiMWu4bTSsPGtJ7M83 su5w== X-Gm-Message-State: AOJu0Yx+uhpHkFoKDwh8HbCTOdnqCpmH7qyzXgMu9ekyr+w9Sf79Z6UW RtCMvFrGwy9s0ZqWuzs/ah6XQJskiFD0u9XLH6Lgh08HXDqZkCsV X-Google-Smtp-Source: AGHT+IEtGVZ4z+stbuj0A5xbtyd3s6lBmzxP4E7eG0F4MVlUqd/di52mIFxjWUJb3OBPU4l785vAKQ== X-Received: by 2002:a17:902:ea95:b0:1d7:8c9a:14b0 with SMTP id x21-20020a170902ea9500b001d78c9a14b0mr364059plb.42.1706665036804; Tue, 30 Jan 2024 17:37:16 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.61]) by smtp.gmail.com with ESMTPSA id mo12-20020a1709030a8c00b001d921bcc621sm657598plb.243.2024.01.30.17.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 17:37:16 -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 v5] ethtool: ice: Support for RSS settings to GTP from ethtool Date: Wed, 31 Jan 2024 01:37:05 +0000 Message-Id: <20240131013705.1002722-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 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 Reviewed-by: Marcin Szycik --- 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. v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding GTPC .../device_drivers/ethernet/intel/ice.rst | 23 ++++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 82 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_flow.h | 31 +++++-- drivers/net/ethernet/intel/ice/ice_lib.c | 37 +++++++++ include/uapi/linux/ethtool.h | 48 +++++++++++ 5 files changed, 211 insertions(+), 10 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