From patchwork Wed Jan 31 13:46: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: 194775 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1918789dyb; Wed, 31 Jan 2024 06:17:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3tH84v7fqJtfH484pBIHom4qWIuKPnNvTT3VQk0RDnnZq8gfFzsU/xke9bYmlqfSxj43K X-Received: by 2002:a05:6358:d39c:b0:176:493f:ad4d with SMTP id mp28-20020a056358d39c00b00176493fad4dmr1640164rwb.10.1706710679020; Wed, 31 Jan 2024 06:17:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706710678; cv=pass; d=google.com; s=arc-20160816; b=0/TAzlCmF4uznw0WuIVBJ30QXscjOOSSSqOU1FB2DW5c4bvufaUkzd06FCKlLgTkgf whlF5nQeezHeBOfWekOX7jKc7QrAYd6/xSBFmbHfdKjXkJGjiXdRmBZZauGcWGwa+eUT asFGBS6Bc3hDcp2by7RCFbpO5BXIcUomlBCnFAfMLNraBG3esfQ9MFFiSbds439VtHDM 4ov2rai3pb8yyZ8BzKYUYPJ6LKgadQ/NS7OdQssAILtMWjgMNtIxLp51ia9xfduzmxoC GBWBT2C2pewFcY3OwJr5MMxHfGFqc2lPMdflsIH9QtZfKkqfO4FG+nDcxK+9MNnNk7ME whTQ== 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=UTbFEE6mXAvqbKDTCRmGgtJHK7Y+ZT4x6MqIIN0x+EI=; fh=0unOk8aHkqTF4Jyr3slEHtzHqG1DJ6KCcMTYes3bDHM=; b=fVM/+poW6DdbK3UgUMwENZuqqW6ogHEZerW7gzhpFdmTEu/gVIGPE/w5dNcJazrd+E DZWGn9X/msTObnE0gn7961HncnUjcarpDc4E89kBYXqOMOWhLhPtCHXpy6QS05wCWmPO fAnVMDm/P15RFatO0Gy6MfEsiRi94fQmDhpPw8xGCpliS1NF2r6sxIQdu1iI6hDZxM3H +yO6CU9TlSz1QF0reBQzbGrRmbgXYJN38yy1/zG1PQhAB5zi3pAyjwa8JIoCzZcecUqa Y4PTdU9ruTdeOKGlGP6MFTQ6KVKYo6lrwlYeTBcPQeP6uUZYMGKypylLqV8IwIHmxZMk ggHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C2Uvl47B; 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-46529-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46529-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCVHam1bl3WTzG5t1c7QUWM1SNm8AjogTEkzXEqnQKpPbDovDCBGrtdPsI3gGltpR5Fq2tNF4HufimMyWWoCZJvGFbAY8A== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g28-20020a63375c000000b005cf9e5947fbsi9403321pgn.270.2024.01.31.06.17.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 06:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46529-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C2Uvl47B; 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-46529-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46529-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3AE1FB31102 for ; Wed, 31 Jan 2024 13:47:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CEA580C14; Wed, 31 Jan 2024 13:46:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C2Uvl47B" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 EC0CD7F488; Wed, 31 Jan 2024 13:46:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706708809; cv=none; b=AK6lL8utKvLtm/gkAcyJ/Yuzaf3POhsAzqFaRFCjRspn4OUS+wS10eaFIB3og2mPyo25NJiF1FPONXqRkXO2CxAiqwjkTUG/rZd9dkWRad2/ZQMbx/t5fD5v+TrTLE15Kq1i5qVjvqRRoEFTJg5BL9iwJ4p3pQLTjq3mKLhIgxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706708809; c=relaxed/simple; bh=lsBL7JTR1eIouYLSKHC4WUUVHG4ILFOtk2kehwFK5Ac=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=L5QMUuxkr4wq1K+MRkcU4AX6SEl1Exx6DfotNF/FVSraSWi9FS1WOveqfI9121k0CEMLERfsZQdUQv/hNAsoWwgdi6v3JpYXElKiYFmP25kiHjN+uwlvQ4i3sdUQCDVzHu/YC5Rj1uad0fbVtic8DlJbvgCTbNiD8VuxYo7AIWs= 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=C2Uvl47B; arc=none smtp.client-ip=209.85.214.181 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-f181.google.com with SMTP id d9443c01a7336-1d751bc0c15so43937795ad.2; Wed, 31 Jan 2024 05:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706708807; x=1707313607; 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=UTbFEE6mXAvqbKDTCRmGgtJHK7Y+ZT4x6MqIIN0x+EI=; b=C2Uvl47BAPPoFqUEC6W1nMiJLZH9/aGBIyxgzCGIbvfnjXM35pyYRzArX6yvybfL88 ENaz7oO0PH9YVfRlwO9XlA84kI65VHavpSOqu1M1SdP50pS7/Hsf/4oqnC+xxWgKAkRW tPi2VuVoUDsuTKQCQRVCPB2q9GVyETQxx/zHQrWkyoB/nkphq5NiTJIen94wr+ufHuCR a6tAURICas0ZjiEUmndVdu2Rb/dNIk6RMNJvC3V3R68I5tdKj6J3/X6kPY2yhwCULsvT JliSeO88UoegGU94kMMODeTAKDe/ymxtzj5EWw/PSNqcgEp+r0X3pqS1zCPj2mabkhH3 zBGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706708807; x=1707313607; 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=UTbFEE6mXAvqbKDTCRmGgtJHK7Y+ZT4x6MqIIN0x+EI=; b=OTe/bxUaxdX7JetWhK058hxTWEI3TXZGu25J9+z/Xl+X5ZKmBIHqKBVAdeAmdwrIn9 ec8GXP16yF7vmsL7QKRfJWScFGYKNDL6UuIxG0qmQ9U9Kc+hL+toAnR8cWoy/Bw1kh9T eFKxsR5m9CVnHs4tosxZj5BA7ZGQDwR5aP1YH1S8slD6td/34BWIqYhVEsG5Uaj59SHL gVuZlYFOyxhyrzaAfhAKuB0ybyhkpw9OOkBdMtcpBbsKKiY6eJJfhEVjnibdkwL91Wy3 0TDlOzbMob2Zv2i338y5noS1lCq6k0OMqmVVfFKfSS98glGiqB08IPTRlTBxeWZexUsf bsPw== X-Gm-Message-State: AOJu0Yy9+YNYiw8frUgcI5sMjlOzlXJPI6XncKL78icHcuB3p9t49J50 AprMwOTL1uNxvyW3ID5I+XqX/bIfBJdDLP+sOfitzv2kmuE9yIMa X-Received: by 2002:a05:6a20:e09:b0:19c:9f1b:1d8b with SMTP id ej9-20020a056a200e0900b0019c9f1b1d8bmr1336265pzb.16.1706708807031; Wed, 31 Jan 2024 05:46:47 -0800 (PST) Received: from ocxma-dut.. ([153.126.233.61]) by smtp.gmail.com with ESMTPSA id y11-20020a056a00190b00b006da8f6650a2sm9774851pfi.155.2024.01.31.05.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 05:46:46 -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 v6] ethtool: ice: Support for RSS settings to GTP from ethtool Date: Wed, 31 Jan 2024 13:46:22 +0000 Message-Id: <20240131134621.1017530-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: 1789568024290788137 X-GMAIL-MSGID: 1789615856799988833 This is a patch that enables RSS functionality for GTP packets using ethtool. A user can include 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. 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 (PDU session container) 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 --- v2->v3: Based on Harald-san's review, I added documentation and comments to ethtool.h and ice.rst. v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and GTPC_TEID, and revised the documentation and comments. v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding GTPC v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary blank lines.Minor fixes. .../device_drivers/ethernet/intel/ice.rst | 21 ++++- drivers/net/ethernet/intel/ice/ice_ethtool.c | 82 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_flow.h | 31 +++++-- drivers/net/ethernet/intel/ice/ice_lib.c | 37 +++++++++ include/uapi/linux/ethtool.h | 48 +++++++++++ 5 files changed, 210 insertions(+), 9 deletions(-) diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst index 5038e54586af..934752f675ba 100644 --- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst +++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst @@ -368,15 +368,28 @@ more options for Receive Side Scaling (RSS) hash byte configuration. # ethtool -N rx-flow-hash