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: 194425 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1610718dyb; Tue, 30 Jan 2024 17:37:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxCS9do72oj2C3vK7t/eOdqF3W2HeURPBAho/UkGcBkXvA0P0TAY3VTO2a5U9zrPndoKVM X-Received: by 2002:a2e:7c06:0:b0:2d0:51f3:12f8 with SMTP id x6-20020a2e7c06000000b002d051f312f8mr120359ljc.46.1706665062421; Tue, 30 Jan 2024 17:37:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706665062; cv=pass; d=google.com; s=arc-20160816; b=YTEPGkdIsIsiRtpyd+DHOFTcVref4NI1veX+GnvKNz//OK3gSvE4NZeY9efAscELRc iGtiG7x+WqxUWN0tMcrrqS50slP4soa1lTfJREM0EaXrtRgHqJRI6MBxCIzVbvvjcHgE AImVTEFCEjbigr4VWbjMgrwZOHycqQ5ptrhK3HJhKeyx1ttmlL5y+2qkN8JQItOCpy5y KRU8eNrw/0ipV8C3dGzbQBzo663Lip3cFQVy4GmlH8MbCPeigz1NPz2BMjXaswKHRxgQ edJc5H1/FwPSt0qR3iMWNVcAQafDE2bwfOuk2wntxI0PZW/JH6MkXhiVLFMNcDj6jA8X UOIg== 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=14iB60VCBARClq1G+KDdJYIVXfRFQYBCF36CVObY9WM=; fh=e91j9r/bdBwC8wrC35meKC+pS3UZ7QkyRURxHCIFpw0=; b=Px6Kz941z9RmIxtw1QD/P/lf2BxViT/Mk7/50qxNgJodGc7gjrmuLIP5iPCOirLV2A qLU+tnPW05LgagJhKlTACyl0JSyFr1Z5Y17KtKj03Utpl5jrJRKhjMquFLXQGhB+z+6k bKLE/6+r3rkNSWOJJW+eRY8OeXbI89xJOekwY8Zq+aT0+g1YI3a2fq53CtwDQMBjDdpX vJtTWjd7OoZ9UQRYdlnfeWDJkvB7/Bk//MFwcAQqvZLyWTiLbNnWlLchmNy7a+ze1eZR y7h5qj79I5TapxQ2vCBH9cCtyXkeD2fE6crUAqhzvvPorzbLTD5+xgZrN0DRPMIpwIM0 OseQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aMV5yjwq; 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-45599-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45599-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCVa7aCiknx6SU0m0CX+NEXDBiEbfU28o7UtxWPwd60bg5EDIMyn27GFUw22ozDhqHFK6FmIkV6kKnu4XndKP3NRBqLtMw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r26-20020a50d69a000000b0055f5ceac045si556167edi.573.2024.01.30.17.37.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 17:37:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45599-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=aMV5yjwq; 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-45599-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45599-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 D638D1F262D5 for ; Wed, 31 Jan 2024 01:37:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA5EC4C90; Wed, 31 Jan 2024 01:37:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aMV5yjwq" 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 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-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: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789568024290788137 X-GMAIL-MSGID: 1789568024290788137 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