Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1665305rdb; Wed, 31 Jan 2024 05:47:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzlpO+e0KLV/mq8wtIOBT2eVA8eImSGJmjBsdrbY4yQ41Mo5hTEIREF5zmyKXw6CVbSBKC X-Received: by 2002:a17:90b:a4a:b0:295:aa97:d6d1 with SMTP id gw10-20020a17090b0a4a00b00295aa97d6d1mr1761268pjb.9.1706708823838; Wed, 31 Jan 2024 05:47:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706708823; cv=pass; d=google.com; s=arc-20160816; b=pdFWfugo29xpR/bA6/WvGQ1ZfuDuvNs1Kz76KS+121Ke320gXiM52uOBRj68ESd1x4 aX/ZN31eJaS5jOumKha6qXq2yACNk+8UOJliX8w4ngsUvJrnKHRshF+OVqFLsSDwvQ0R 27ipwAi41aSGe5rxXBR/jnbxe6l6YEEbPU1OiYVFyzWlAsQywDpVjxNxJrAilA2NceuK 1ZCxxsM7bYVvRMUxBKk4LRJ/7bYSNt+bxcaFNXZkD6jMVTpdTRprb16mwN0ypCK3nVUW 92KAs0YrC6Ff6TebGbQtG/7uBWRuZgMVR1bXauy5RFsoQpWcFKZSCrXSbteAdTHSWyQP ObBg== 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=DKctHHLSna5o7St4EvqutZDrWat4h9x3xCq9biv1dg4=; b=QsPi6C8qd9AhTHDJ+xA2gAQSWWUcgQnOX0qZlwUbzVCBimptTR8X0Kx7hXBy3rvqa1 TuiAoXOb/pLxNLsAqWy8LhqgsR/ZOGWPvWjhmdLZagP3YQy2F/terJsiRK78ZMdS0xCc jluqLpTVFz9xJXPpeOkKwuZv82dkSK37/fovR+nW5gkjLgZ2PkLhZgZyOp1kjk46uqDX 5NfNFswwsOJFu/M9ko2GvjGa1wB1bIGQzJpeUrFzruKzNk5CcSizQYGJJSU7D03+CMA5 GUnw6yYOpi3GNZomtFZMz8JvNXa7mmiDTtIxki5ispMsPYTE67KoAXdIt/YXPaWa1Dkb EsTw==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46529-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCV4njp12NxQzD/5pDQVSkMYRZTncAUrkgrJlxfrIRTplPY9B70E58OspYpF6DQr0UsfhlfPgpG9cKH5n493b/A0yT8/bbt50KNh1VrE2A== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r7-20020a17090aad0700b00290e0e74a9bsi1208965pjq.75.2024.01.31.05.47.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 05:47:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46529-linux.lists.archive=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=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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46529-linux.lists.archive=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 7429F282752 for ; Wed, 31 Jan 2024 13:47:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 542FC80C03; Wed, 31 Jan 2024 13:46:51 +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 Content-Transfer-Encoding: 8bit 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