From patchwork Fri Jan 26 03:55:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 13531977 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 D83188480; Fri, 26 Jan 2024 03:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706241333; cv=none; b=BT0WaBGHKIJ3rWv7G9MTHR0+b2m69srtw+1RUKraheqoL2E3pLIsQE9f8RWIGOcjfKvGWXlMYD6ADVyq2VBYTtXdFAALcy+5nWgpSdsBycPXJ5vJvLKndHkSFvbTOR5k+LMm8ssxYsjHV13VXtCXAhL87AnEAfkQoyqVRYjw8AQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706241333; c=relaxed/simple; bh=QTMeq/tbWLwGSOmkanyrrMobHE32r9uST02llsDUBZE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Xpz+rb/nz80jLNjvw7XE3pA+y+KflU4/YaofLAXJu7bIq5cukS52uli0kvpUFjKuahfTLVW/LSIuGux9LoF/+7iHvn8o0x70T7t4yvxCict/GRJ3ftbH7zzHccE0FEu+scPGZ8qxhizZlazjLMpS5s6xGMemUXAIEtv9yIzVC5Y= 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=A4G5KlEq; arc=none smtp.client-ip=209.85.216.52 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="A4G5KlEq" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-290d59df3f0so2853721a91.2; Thu, 25 Jan 2024 19:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706241331; x=1706846131; 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=p+Q50Unqtewy7ypSZLUUF993WEutxtAN1ev6lY+kbpA=; b=A4G5KlEqoCNYvzHqQGP/byU4qhq4gIli7uH9sy4fc6+9kNRESsuHcPd1tUtgJ2MCjQ lS+im2+6Faqzki2tsd+chb+IqIfmrMFQ0Fb30wLibot5F1fyF/dNqn5iNgQ+6eVcOj4w fY7Xy/FlalAfWU8L6Z23VuYAAhYyTvAhY7TPhq2phMl8xahyCzgrAwKsc74HfCBfcfFf i+v8oXQIreNN+r6Q4IrJqlV5JmNONsOhETrAnfQ+YD6/I1JN9ifTwoMGpgtg1JwJ+nmJ ehbc/MV6MlVhO8dA1wJflE13jfNP4qQhfTynDIMaQ6KlqXkvMEP19eMUnDT/X+A/YJIt S1iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706241331; x=1706846131; 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=p+Q50Unqtewy7ypSZLUUF993WEutxtAN1ev6lY+kbpA=; b=IVsRPdxtuB75ERwLdpPNjkvPxnGcYPkatNCkwb8aG4uGad/jNcQFjfho8HOOfOtzou 7qRQvI2ADSLQ+e64ievYpUfijFYIRWRvPWFBoCl7/WXUMC7n7zr+ozzm+JpzpOCHE1VT xeysXYETgwUkrLg1Uj1Z+9sl37/8clUYLn4Lgl9LLk2QYkkkguyt0MnZA2MheSsfS9EX rKemu5tWQwgp/FvvMbBFlnG8vfD2/sFtViN3iQrRdfoHwKY/C0hWIM+EKYOrzAEJ1EtP P6laIfm+CkGsXOEiLwrBIgO69zKhDws+Ru7lFRgZB89Ni2KM18cnmmqLmBNv2sFvNe6P 0a7Q== X-Gm-Message-State: AOJu0YzIfL6B8OLlSNiFoP9dqbKXNm/DQTlK/w+B4mBq/ssAWcB3hDmQ kFtvqLMr1A6MRS0XJdDr/X9nvFXPnsL9nBcmwqUuKiGjA+20BFz/ X-Google-Smtp-Source: AGHT+IH+JRQ64P/+GFe8prxxHVSrMM/ph9ImznDhfAaSoEiuNlEyj+Q0WrWf9nWWGfv2lYBbmPEtcg== X-Received: by 2002:a17:903:124f:b0:1d7:5943:21b8 with SMTP id u15-20020a170903124f00b001d7594321b8mr982271plh.16.1706241330935; Thu, 25 Jan 2024 19:55:30 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.61]) by smtp.gmail.com with ESMTPSA id t6-20020a170902bc4600b001d704905e9fsm238888plz.259.2024.01.25.19.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 19:55:30 -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 03:55:22 +0000 Message-Id: <20240126035522.857882-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 (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-san 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 | 21 ++++++ drivers/net/ethernet/intel/ice/ice_lib.c | 37 ++++++++++ include/uapi/linux/ethtool.h | 35 +++++++++ 5 files changed, 185 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