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: 192368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp429960dyb; Thu, 25 Jan 2024 19:56:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnel5F3kcRz5nEh5Jiztua4NnpAeeZn3+L/uH3t/UXdGO1VFzScSgFEOoR2XN+C7f3UovQ X-Received: by 2002:a05:6214:da8:b0:686:ad7f:671e with SMTP id h8-20020a0562140da800b00686ad7f671emr807585qvh.32.1706241385228; Thu, 25 Jan 2024 19:56:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706241385; cv=pass; d=google.com; s=arc-20160816; b=GEsTXa/m9xyjKrANa38Q+SwpuDmIGfTjDpxb/5eZluZc34GK4Mr29ny3enCUh/12dh 2rWGMs0zHt5LD8cQZB+sQq+fkHV7h16NEymm/B0R6kwpm5mcjJ5WPtj1GIZr234E6fem sX0jChYXZZ+IqjTq7s0M1Wo/jRQulA605w6AQdbxZZ0gEMeQYsqJGX8VVxuv0sDNdqsR qIF+DBAkvbkHymynNFjBdJGEOeRtjDVL2Eb2BkV2lQuWizHQLNFf78Q2NeaSBliiE0dd 1Rgx2uQZ3ZL6txqfs9mSll7q/th6vN3FliqMPC9GXEZOPhLMpsxI9B7CfE1ev1vcO3S9 LSKA== 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=p+Q50Unqtewy7ypSZLUUF993WEutxtAN1ev6lY+kbpA=; fh=fXglUzvFb2UdN+tlgKJuWgCnq9kfiKpmowIOK0NHDwM=; b=t/shIFtHYyAZElFYJ9WKBPr+x4mzcIgEL55+T/MmFxaOUJITIgIQXY52fL7YxYbkQs NJXrnSsh1LZnZ2TFqK1/O6bxkkxb0bX+VS6ibgmNISiPDMeeaGXnUFsNJ3Ma2hHFuNwG O0y0GCFE98jXfqm96IWU5g923cDFC5XuL2AbppDpPQ2eJ7+tmZuRQ9hysA4busMHRp8M BoKvJCO9DnW26W83iYQmt6eoHCAmaDnztvasVC4Qy+SRHWA8l6QaeIUoK/fCIUCWpjVu nwx3AAehKGH1d8xvNI4XBtx5imqPAww2AXvvcGiRw1lS3+zSG2EJEK3zW2A62O0FSbeX IVnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A4G5KlEq; 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-39577-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39577-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e4-20020a0562140d8400b0068080203e07si418654qve.460.2024.01.25.19.56.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 19:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39577-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A4G5KlEq; 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-39577-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39577-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E8FB51C2297A for ; Fri, 26 Jan 2024 03:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E43C711C84; Fri, 26 Jan 2024 03:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A4G5KlEq" 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 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-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: 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: 1789123766933915840 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