From patchwork Fri Jan 26 03:13:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 192363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp417473dyb; Thu, 25 Jan 2024 19:14:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP7eDgvkuSJG1pK1/n+0SPmOHvGRjhgRFkT/uOdaP8eAKnkQXiFlcFyRe5wEzfOARckK7v X-Received: by 2002:a81:c90b:0:b0:5fb:9947:6bfd with SMTP id o11-20020a81c90b000000b005fb99476bfdmr762198ywi.85.1706238881973; Thu, 25 Jan 2024 19:14:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706238881; cv=pass; d=google.com; s=arc-20160816; b=aJVWXhc0PcXFYxv3D5ZvhRhQm67LAKOFivsrXFRVQ76lXTJApm7zk8h1M7mQiA6z9x tykJizMVC83g6I7YfCGund/R35iHzfKBx0+I3W5Ih2rwSTupwcyUN5kF99w1DpU5acDD jOQ9X9NjcgI5VUmLGFHmsdd6IxiKvIG/Rl5D6nThchk4nuR+EHrZxjPO0EASvRRXYLDF o0VfhCptR/iOlfGf32spTZbjCetr6N9fQqqrsxWxi/SWH5T5w/UVlkdnuDgzfYZrYqNE 62mcYrl1+0QGX+sHUg4mpt03RORrVCkPc7Ki0DcTAyeWtM5LB5UtMCwErv2oLR5P7WvQ 4QpA== 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=EpxMCECa24DVULXh1Faijfwc0unMyRWhKf+jeqyDsDI=; fh=fXglUzvFb2UdN+tlgKJuWgCnq9kfiKpmowIOK0NHDwM=; b=el3TeRGreqST34ue79IHx2Kewv4+JuFUApCv0pOtGrrubrHP2VImL0Jy7y57F/CMK3 Zu1uyOYGEpmghPrPoK0wSmw1s2rx/ivU8wQrek4IfpCDTgrTfYQThNmm6f4iTUaXktFf MgInF1IvVhyxrthQY2RJ250z7nj0K26MVd99PWJKZsZn2hrudHEYFZdeWKyMo40RtYUa Na4NoASrKjA3P7O2X0FxXe01+kxWqs/zgDE0omEFoeSpQTuEiRutNd76STIGyw6tQcE7 gXL53/kra2/rQdI+jFFYPaFKbtRF54YY+tO8bbc2x9G81F9bjuAnA1B1rM3NQsQZ10bs BDKg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="H7A/9wLZ"; 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-39564-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39564-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q4-20020a17090aa00400b0028fef76a8f6si2392807pjp.8.2024.01.25.19.14.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 19:14:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39564-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="H7A/9wLZ"; 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-39564-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39564-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 AE3BE28D411 for ; Fri, 26 Jan 2024 03:14:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADFD7D29B; Fri, 26 Jan 2024 03:14:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H7A/9wLZ" Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (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 BA59D8F45; Fri, 26 Jan 2024 03:13:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706238838; cv=none; b=mJQLKc3+EA8tkMeirz85Bixnq9y3E0CbWKAHo+nmGCwSl9yFDkXiuqS957+aqHpJ6Nrg9nVjhumZnevcgcd87rs27vPm3iKh25eEkidN3v7cHbEkWd6+DlFtUOpHT/Rjk5xMAheOAeVCUKgUpPzHChYmhiz+t7DCvj8k0RS27Qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706238838; c=relaxed/simple; bh=yq+hu6UuOULfSrJRxAYoKdWzYYH+F7MC7QZ3Cfm+6gk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=qaHJGEvK4/5YS39eaJPUB96wxwDp5g1am963S97KsCtRrsanmaFiloFgYhNkwq3x7vN76GAG/qAoX9zwtDsniV2I+HsnPl8zXPKylklH3+TxiOcxYet9rjv5tiOiJPwnbXEYuNJYUNvlPARrYMCg9BgJNKTaDOjYNwqSbnCGKzU= 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=H7A/9wLZ; arc=none smtp.client-ip=209.85.210.54 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-ot1-f54.google.com with SMTP id 46e09a7af769-6ddef319fabso4871999a34.1; Thu, 25 Jan 2024 19:13:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706238836; x=1706843636; 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=EpxMCECa24DVULXh1Faijfwc0unMyRWhKf+jeqyDsDI=; b=H7A/9wLZ8VEtq4US1o0jHMUMlmoHfMK7LWDMBVCfrtmDQzeQYzeTj3jYVqLf4MdT1X ioiWI/mMydt8HIG388Y3puKWlhvY1R7Y0V47TAeYItemh4U/W7v2mIVtwtIrSrCvwzbQ HKeJogamRQgNsbVhpUc9v9IMK3ihTX3Z8mxGLa2VdUDEuPkIPbhBISLQsVnIIn+e14Uk JUrxdZtwefu9qZZrfkyW/0/nQJg4dazWW7fChBkUqFGsUDQKQYa1vvTOhWAILBCpLUWL VQlHCoOrnt+lYKKxfWfYFealNnnfUiZPSe6mYAHJi7D+HVazKQm6iq07LQjsEiamx9gL 9M0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706238836; x=1706843636; 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=EpxMCECa24DVULXh1Faijfwc0unMyRWhKf+jeqyDsDI=; b=T8/IhuwRsYOa4YN428SfCnmcE3NBHbZsEZkrRHs2oOPiy7gk2i/raAeXRYb+QU1O0i dFSY54onL+cg34oh82rtTHtSFhUhJgugHzBC1d6ruclaP/YICKGJugNkBqAIR4r4awUo chNm3Wdca4NcHTdSx7bN+WAzwT/A7D+XEcKtOUBWnP9teK/GY++kGxpPj6+hZ/Lstq7R +8Q9m3FVRTGHufszi5V6wZ67Mut4PTrJr22l3sDU8b6+apst0g+Lh6KpNR2ySdqYa7at zeZvnHOTo9ZOAZZcbFl4xoklzCikxIlLbJ/DhI7BxRPda/pXXNCqUsC0ZpQy6Se3urzr dU6A== X-Gm-Message-State: AOJu0YxV0jkBctPx+MR5FjF8R1rRQCjbE5a4ey5KrzQBDLDzpME+I775 LbZ+6ib5OpysjWMxKC9mZYL2o67rt3VT8BFq6RbMkrS+dOHbhsb5 X-Received: by 2002:a05:6358:923:b0:176:58ed:212 with SMTP id r35-20020a056358092300b0017658ed0212mr851028rwi.4.1706238835384; Thu, 25 Jan 2024 19:13:55 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.62]) by smtp.gmail.com with ESMTPSA id t8-20020a17090a024800b00293d54a85f5sm286469pje.32.2024.01.25.19.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 19:13:54 -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:13:42 +0000 Message-Id: <20240126031342.770766-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: 1789121141760268965 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 got behind. Since Harald-san has been supportive of the basic structure in the previous patch review, I've kept it largely unchanged. 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 | 14 ++++ drivers/net/ethernet/intel/ice/ice_lib.c | 37 ++++++++++ include/uapi/linux/ethtool.h | 35 +++++++++ 5 files changed, 178 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