From patchwork Fri Jan 26 04:37:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 192381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp442496dyb; Thu, 25 Jan 2024 20:37:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxreWP/+KHcGl8uIgB1C8jgeLrjdQ0bT7xwhMyfcVd4DAIZF4zy1yW7+o9HAPNUzuCWxai X-Received: by 2002:a05:6214:1c4a:b0:682:2ef7:4f22 with SMTP id if10-20020a0562141c4a00b006822ef74f22mr1096053qvb.68.1706243866121; Thu, 25 Jan 2024 20:37:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706243866; cv=pass; d=google.com; s=arc-20160816; b=ThbmPmA9aAOH5YMQe4Cqqopbg5ovNageTqaSEFmHtLF8hC6Dw3PVvGJUkcOMrrTfHM ovIWZ5HtFSswhRWPdUn8vt6h46w27n6012RP8bae7fEjarBQExsZsC62pudWMY8B0Buo R1dW4JOtkuNfkZqJn/Usu8qiMYGArhAqlRGsyr26HN1LXI1V+emqY+vtnDrerd4g9hIM AYnVfd0J2KnWB/FVtvw4YZxEW+Dihp4vXQK3d+/NJdgJT/QSdPvfz6qtBzLGPr4pwbK/ Tb3OlWMw0hJvVRd/Kv7ZldlwtToszd0BLJpNU7q9gY27QhO5vYISPGj+BVdl4RzHNMQ0 sN1A== 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=9mYLeAukR0u3gm3qWYHyVWVtKS5fKPO237dC7PgFytU=; fh=fXglUzvFb2UdN+tlgKJuWgCnq9kfiKpmowIOK0NHDwM=; b=SgsrJxSUy+Oyuw9Tucl7mI93mQkGQ7GxgD82FMPvXBx3rwDQJlHaok3k3Q9TXIAyib puYUMu7MZfHXsiwR38hNO9FkxfT9Je09+Sc4jNnV0CRqxQC5zxkynXKplaca8Dlxl8hk usCpPPRzTJ4iSRKV9YfNDVNgf3wF6kKC0kqybP6TrBFQZo/7e9JPAyUxCxDcb9wuPeUF nLptG3GLSTgzfSGUy13FChQjFw6nPF0OD9i8rFZZODUa0Jeqxy319HNhTdITnVIM/+pV 3k3F32RKR+fC2BL/+s8L4llz/RuCtJlNyzfHWu7l7SPYJnpFar4+WBrc9MHGSi7db/5r rJbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="WD5/8M2b"; 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-39601-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39601-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 14-20020a0562140d4e00b006817965d028si494840qvr.301.2024.01.25.20.37.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 20:37:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39601-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="WD5/8M2b"; 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-39601-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39601-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 B26891C23284 for ; Fri, 26 Jan 2024 04:37:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03A94C2C6; Fri, 26 Jan 2024 04:37:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WD5/8M2b" Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.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 237B363AC; Fri, 26 Jan 2024 04:37:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706243845; cv=none; b=JXW1g3h52NS1c1VY2M4KrpEkHnoHx4EwI6+c6uoRb5PO68tf1ucOl1pKtjAF4Xh33jP0hrOn7lhBO2n+BaOKjVavl8jpgIfbmWhUf951mfHsyka0nJ78oU+emRAeXSHdQRF9Mlq8pV1wRo7sKUv6GHwmuZwKYNI2h/1c9kplMx0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706243845; c=relaxed/simple; bh=/lo8whTbEvElJO+zsjDSggAOiShJDKs1oiKaeZlvuXE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=L1pejmrS1jZeuULtjzCO/6Zy/+pjXiHuwinTOE1DM8uCIhsvm9HkEkSPj+Yx8kPlXDBPknzyLdTCKnSLnR/2TO2sqr42TDokoDFWWkNl+XXcixOXpLsCOx2G7o+TSCmk9mei22fVTxOgmYtZLVvcd81dtOWjtMCFSZjqC7pezhc= 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=WD5/8M2b; arc=none smtp.client-ip=209.85.222.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-qk1-f176.google.com with SMTP id af79cd13be357-783cd284528so21148885a.2; Thu, 25 Jan 2024 20:37:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706243842; x=1706848642; 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=9mYLeAukR0u3gm3qWYHyVWVtKS5fKPO237dC7PgFytU=; b=WD5/8M2b3jVgXAPEpSTqGHHwmpHUqjlzdf9VpLwsn9LSRHpgJyrTdJCpNDc59Ui2uY 668Xqs12JL80osMq09A3O++b6ONdisQTEQ5sxmmZjuRBaNjDQn8zIVciQvHC/edgORtU bJ6FsbzH7N3+lQnUVeanda76f9NUZCa98tkMI1Nt2MUySTXGDtq5YXn+n+FlkjccxQ1x 2uV99KBMe7ZZMvZ11ZeoQ8BL3eFI3f4R32a5562nLjBXvAvqq4zOKGL7+akoRRTHVM+2 n1sWcfI9lwVVpCa5wjDCQZFdH9Rl1fvs3L9pMl4sF2wTBDpIeom5TlUgAVvLq5HwfF5z 36PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706243842; x=1706848642; 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=9mYLeAukR0u3gm3qWYHyVWVtKS5fKPO237dC7PgFytU=; b=ewzsnsrpNa2GKQDpcLgWHrQjLF2518jmWoNo0tj1UWkHbuy2iVCnUOm2hilVXCswna 2GRCIukrA/fuVrpL471FUpoeVwvTPpC/evvGh6xb+nW9ApSRyo9XtVbKqeZLfH1iKKAv Dh6KDDt60UYfpBDfjYAUvHz8n0ON9uejlkoTdH9qu28NKxPcxbrqWXmNE+7hbMc71lBO CpRBwrKzfXx3JpqXz10fxs68cc+N3qeTWjgepxBE51PZbdv5WqSwa8esmYi/vMN2iOlF uhFFTNOaIXYmwmKhKbI5CKm92eGRw19+EGzT6ofhHVzHN+1eAUzX9foqed8qzeoiCoL+ k2QQ== X-Gm-Message-State: AOJu0Yz0TcIoVW52n7meapg8PmPwYooqKYEvEX9W0m1qGBJ9jaEDpGAg DuC3F1k3E/LSBJSmUipULFl+6c8HK4RXT7RsVhzKiNqEKBl1PqdZ X-Received: by 2002:a05:620a:16c5:b0:783:cdca:3bf5 with SMTP id a5-20020a05620a16c500b00783cdca3bf5mr465987qkn.98.1706243841897; Thu, 25 Jan 2024 20:37:21 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.62]) by smtp.gmail.com with ESMTPSA id pt4-20020a17090b3d0400b002943336a1easm99663pjb.12.2024.01.25.20.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 20:37:21 -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 04:37:12 +0000 Message-Id: <20240126043712.860424-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: 1789126367746971221 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 | 74 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_flow.h | 22 ++++++ drivers/net/ethernet/intel/ice/ice_lib.c | 37 ++++++++++ include/uapi/linux/ethtool.h | 41 ++++++++++ 5 files changed, 192 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