From patchwork Fri Jan 26 02:09:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 192351 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp394851dyb; Thu, 25 Jan 2024 18:10:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+duJ+d3vD5+2Z6kL362cWzj1RJu6AlkgzuMuSBT5cmgCvXMiAn9f6jtCsg0gvRuWywQyS X-Received: by 2002:a05:6a20:b70f:b0:19c:5ae6:4429 with SMTP id fg15-20020a056a20b70f00b0019c5ae64429mr534095pzb.57.1706235041960; Thu, 25 Jan 2024 18:10:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706235041; cv=pass; d=google.com; s=arc-20160816; b=zicdwxJKcvheuwvFofMSdj16EKKz5ZNdlDxghpskyG+/cERTX2hT8Lp9mfkf0oC/II mhwi0EIi66NFsUa0VdaLQc76RKAKblFQhtg+31Tq+ApqkqH0D91b0Se/D+8xcLcbv1mH Rlx6gzbnhur503TvI877FnuOgklfmM+3wu1amJH/4AEnYNS1c+ZMbKw+gqazGjgVu+Gg EW20O0FRJa7ETNASR2UmPpJBMsFyFEzJItOE4jT3VsKskyFSISVzn1kwv20RnSmoDVg1 8uWgQbJXfA/PaGuPAHSo5fDVkyMHw8ZkDVAD04Kd54R/DWy3iNhyhjburdqVSH6zNRak CTiQ== 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=r8B1O00SdeuKEg/sH/EZDUoyazytZxHGS8kZbS7zUUA=; fh=fXglUzvFb2UdN+tlgKJuWgCnq9kfiKpmowIOK0NHDwM=; b=RofnJJE+hCKfZxvV+Ki9TF/Se1lAYbfpc8BZQYQLZ/xrFwK2HpTy4zdNb0eyoklC90 3hUSgNADrw6ja4d6S2q4zT/ZoSHVoZUZggzUymw4UR9yqVYx4nCdF2RyBwL3dKWU1MeE Nr3UzffHWQA9Tqp0k3wGFWl5BMFWWNARCKWenJqOlawV29KBUlz3VVKGdregL/nCahOn zMBzbyyapxKy7PYLji3MmsuBu+aKQslABZ5baCgtG8F97Ja9osaz+tOPmHrGXtzD7tfD go8bDh/eMxoan6p6fZl7VX6N2zVnVhY1F+VOJYqQdAXZ+h9irEjOENKVDI464MJTxp9m T4Mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CFcBfBg2; 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-39530-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39530-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g5-20020a17090a7d0500b00293a5d2bd40si299477pjl.34.2024.01.25.18.10.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 18:10:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39530-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CFcBfBg2; 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-39530-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39530-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B1EB6290D01 for ; Fri, 26 Jan 2024 02:10:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2B517499; Fri, 26 Jan 2024 02:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CFcBfBg2" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 860704687; Fri, 26 Jan 2024 02:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706235020; cv=none; b=oyZ/Ep1s5qcBWNXSGIrEF+B2jy0ukso+5MAExzXs0OhGQ+ALEIJ4kMiPTgJpCDHYfhKPKm6azWX2h7yQ3EJQ/1Z2Wg1vhhxIcM7iixzJYNe75I8KTo0aWXblJIkfS/KfYX0l6brLd8LvpFgj6pDPfpZ/8BTajNaAJ8omC+gBMKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706235020; c=relaxed/simple; bh=6v2FN2p81kidGMFBYwnq5KT+TLDFlAZQmj4CY+00aGQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=m/NYumyNUI8cmt425lRYFIAAySCMbGNAqos2T7PDygFCOFIaxavrR0UMEgO8hZPsyPSnIRqKFg5YpfHhKkYD6erYO6UYFzl92KsBA9npxLUlwAlRd/zJStsgbn0cz4K52IdIcYAO/slPzAtaFYsYRCgHjoviyIdshGu/1RjGmK0= 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=CFcBfBg2; arc=none smtp.client-ip=209.85.214.179 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-f179.google.com with SMTP id d9443c01a7336-1d731314e67so31104495ad.1; Thu, 25 Jan 2024 18:10:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706235018; x=1706839818; 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=r8B1O00SdeuKEg/sH/EZDUoyazytZxHGS8kZbS7zUUA=; b=CFcBfBg2RHXUQ24Ha+IBIj2b40/u4XexcChNshKdX1/CnPF0f/DbJoPtgcZjT6Kb3C oXTOBBjRc7XbbIJpI5xY8Uux6ZM9MGE6r2DzROEj6e8z6WTSYJ5hTmiQBIxQO3KjuQja PjLgiJGMVmLji4jqOZ2HUUTRRGGbJK6vtNZwOQgwpXgr+z5GkxZswF/P+1EEvFWKbGDd klSaISDzwWkiDuGBY7SpwDooQMXks0OOpLlzVAKZnbv/Q0U/iK+ROd/noCSXnWKIyxG+ /rKNQ7LtQiEFM6UJHnxkAZuOueZ6S1Q05BW4jOIexCm4cIeOAMHsRx6U+r13XK6LFvET KMTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706235018; x=1706839818; 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=r8B1O00SdeuKEg/sH/EZDUoyazytZxHGS8kZbS7zUUA=; b=qVyZqVXxqp0ug5nb02q3r+BmxywLB9bNKCuAIDTMH2VCzOEYsr9S+mtgfmvBdrrCmi Dz3vq6a1ULqInh0Ra3hyQnVj7S8npRKEa2ym+h0mjJJ2CSGLBUo6BvoYA6LJgfE6uZAG TG5zk6ekPI30Ytgp8ghGF3MXLsizkCoCyi6dYucPs1z8XqirkbaeznnwO9a/cQBO0SeS n5eXvjsos+AZG/77XzbTieErOy3fTniajiwwaGpBjij2NIRD4IhVsmD9u12LvP56XNqb uJp3t+nGaSVuAqOwHoeKeJuNhHCsYxGt0mQS9KEoQ4l25aNomg2Aam2BHZxEBiwyl1Ke 7lzQ== X-Gm-Message-State: AOJu0YzMUCC9SHABqHlqH+U4O0st8d+QvSUVZn1AfNSIvxfSu4yzdrYl f3kZX1IwiWUeGUY0z+v55zpKlY3QKHi721ibrSY3lndBu4dhkjpq X-Received: by 2002:a17:903:191:b0:1d4:e084:571e with SMTP id z17-20020a170903019100b001d4e084571emr713097plg.129.1706235017658; Thu, 25 Jan 2024 18:10:17 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.62]) by smtp.gmail.com with ESMTPSA id j3-20020a170902f24300b001d6f584ee1esm157288plc.34.2024.01.25.18.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 18:10: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 v3] ethtool: ice: Support for RSS settings to GTP from ethtool Date: Fri, 26 Jan 2024 02:09:49 +0000 Message-Id: <20240126020949.758175-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: 1789117115340919770 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 (Tunnel Endpoint Identifier). 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 (Packet Service Charge) 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 | 42 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_lib.c | 20 +++++++-- include/uapi/linux/ethtool.h | 37 +++++++++++++--- 4 files changed, 108 insertions(+), 14 deletions(-) diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst index e4d065c55ea8..4b32e510ecdb 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