From patchwork Mon Feb 12 02:04:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 199563 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2194752dyd; Sun, 11 Feb 2024 18:19:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHX+f4DGxkwYukPp2e4DiWBPGvt5UXVBE5CwO/JUcgBxNh7z4MJi7vIhioX1wKVqLRQzud+ X-Received: by 2002:a25:8445:0:b0:dc2:21fd:b17d with SMTP id r5-20020a258445000000b00dc221fdb17dmr4504587ybm.8.1707704398943; Sun, 11 Feb 2024 18:19:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707704398; cv=pass; d=google.com; s=arc-20160816; b=Z4BJNs5lwUxSOeThqNP4kjrHDl3muPOA4/qDjSes/KKptenKYV5xbX2GnA8nXwca4E M6Au3B1gPkDSAhA2UNcIFnQBOawwo1VVwykOcw+FendAZHsDVQkkr2XpCr/39WUVlRsu pVcTn8gNmVwf4kLeUD2+mgND0OUERHQSd9uv49FX3fqz9YCDKQNnE9SggtUza1Ebmdm8 sO5aJpTYAqlJ/2PelTZLdVt7oixyrjfxITZIZCn0VwxWvd5NIe8MPEiB/u/cyw7GxO/1 rDqsvUQ7kGLd8qMqAkVxwfSN0Qd23kAf2AngxHafOvvtitKg7v3O8xWo+B+rB4tLBuec 31wQ== 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=TsrxGbd+ooYSWDZTCkHy7ejEqn2Gr/9LfDCkLbwwsGE=; fh=gMn8cBa8Rtala4gXzk5ghjRxPerKlp1jWhq5woNMktw=; b=GtSGMnXBxA/2hbz/j3oG5Fx9fmn3M1npViU1wHudTXypjbsen6H2pD+2uti2upT7La k4uh5LmVhrWwSsBGb+mmStAuxlEX0a3qF9bYkQC1X4Gi2nKybQTENg1xq6CH6X9BeNbs gUHonJlF4ajhcPVWf118PmSQ06yvt+6gTtlLfGvR8gGuz5xayhTv12ltCSZJF1GqOFee /XVcTgSySSkkYUcimGC/kzwR6y6hyjJenLOd5BbjWt/RFk1iM5j5/vq+spupsTH5bqW4 3p1bb9h/qO+yjn1L0FNVEDdKaLNGh/QyUZRGatn/vlOgdpW5wXKjrR5Y/nWzRFPZoA0E V+8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Y1eo/7MU"; 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-61062-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61062-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCWxXZ3pk7cLXpAvBAjlJB6WUMhYm4Zyv/7Ma8X/CpFQL9rK7Qd9OCNIbX2Y5QkIQbzf8lzkKBeMmdV4rqTotMXBxp7q3g== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 73-20020a63014c000000b005dc47b71832si5458825pgb.374.2024.02.11.18.19.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 18:19:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61062-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="Y1eo/7MU"; 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-61062-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61062-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 07A0CB24513 for ; Mon, 12 Feb 2024 02:04:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4591B5235; Mon, 12 Feb 2024 02:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y1eo/7MU" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 65CF1538D; Mon, 12 Feb 2024 02:04:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707703464; cv=none; b=ALzB9lCRUs8pRNunbZ7jdVT6cgfaQyvrCXb/AiFds8aCVSvIQ/wRD60SueQuUeyf14LxT0CRxPOTRbdzQSexztq4aztkC/Hy6J8D4nlXPiBNnyuQ0D+DUbSxndQlYM/91Hv4MSKmWRoKgXWaY17UqCg5FKMRK5DB6bqLY0S1/kQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707703464; c=relaxed/simple; bh=r7CpmQPE0yFIMO8wUCYayc7SU5gVp4HIycN2Kkd09iM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=hki7UyFRVLX+2Qx/fSm290Ywqjl3F3pTyQS/JfeswiIDenz4SZyjw90gU4Cq5U+EB8Q/ALLNHEZ4M2gUucR8nb8uVxBQSHf3D70lHBrNBg3BmUTyz2z41RVDKr/uZrcQBV2BmDasK2bklyXbxLd/xvjCCXkz5ArMb412OM1v7tQ= 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=Y1eo/7MU; arc=none smtp.client-ip=209.85.214.175 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-f175.google.com with SMTP id d9443c01a7336-1d8aadc624dso19772975ad.0; Sun, 11 Feb 2024 18:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707703463; x=1708308263; 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=TsrxGbd+ooYSWDZTCkHy7ejEqn2Gr/9LfDCkLbwwsGE=; b=Y1eo/7MUw1LARDx3MpRagBiR7N07uv3abqjqzhNu0u5XHV8/6y+ZjzLAInXAZBdXlR 0nRJO9OkNb1w+yr8SgmR2qvZtu61Y27EbSmdoNomRUoNPr+QykBeRmx163uUXYCiPAG5 +AO4Xmhqznf33Kbqane/es3TRZ/jEbtSsFGjEYF11RZXvays52dvXWP6hGMFjw8ZD/6b 3u9+V9mFv6FgQ2FzJbaczlnnxf55+7Nxbg1AAwuAleZ6a1q4Y0xEgjbNpC+p8HvvVB0f EIKS2htDPQ5/M1ixtKYmkS+3pBxy2uzCiVAupTGLhnE5hR12TsrQgA6D17QhzSFByB6c SnVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707703463; x=1708308263; 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=TsrxGbd+ooYSWDZTCkHy7ejEqn2Gr/9LfDCkLbwwsGE=; b=J0jxc+832w9sxAoQFosPf/RRivIPtHK3QQEt+nthRDrcu8dY5DPeGXA//ckCVUh0xJ cNay6bSHq5PeuXuiWGHHVneX2PZIxM+w/aYsuB5WQSCksP+OcAl1hAgvR2Y4jzwatwjz cFn288R0KbNW/B+osSTt0SrdyecDIjdeidqixVfSXuAk+5CTGpSVSJjUzfHAnTaXSYWJ fYOVqkXnutCXnH0t7lwpAa+7lHxlcqcd2hixdLuognFxQXliqCFEpnZxVKd3YXM7TYvW Yeyc3HvSDkRUcHi2CaqbyZa5unboQVoR0Qxyk3ka10l1cYvidaJCUJH8POfL2iPyFPsH J1Cw== X-Gm-Message-State: AOJu0YzYA1yleyszXordTv4ekW8nMj/wGUrbUrCVvN4z+qDrwYzVQ6TB yiYmLghvX8xsDg3ugV60UAUrbK9MKBLb7xMxbe2Ty/OORBZU0YcS X-Received: by 2002:a17:903:1104:b0:1d9:c367:2032 with SMTP id n4-20020a170903110400b001d9c3672032mr6149354plh.10.1707703462565; Sun, 11 Feb 2024 18:04:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWy1fDCXF/hq1vAxIEA9hjG7uksPhaCkv9MPZSMuZ97awi4I71xxZCl4pqzM64Wd/1ESbZJnxGNaPd08U2bewdPYnL+TP1CAUeHhjQCakujFF4IeLGqL0fVHrh5eexQLPWEJzlTzKBTqWG7uugeB/GlH/ZG+RVIW5xvDtCH2fXmJ2CY4scAVRS/TGWAQQgUblf7IROWLnNpsmeruP7ACUqfel9tlvlqNOU9FqzwoMgivkg1DX70kx98CLw4fAefDeH/VU1/TpqtLO5JwWbOuVBGJNZAZBJYiJwY67wZVU7O7DyMCf1E6gAhYwFBnrn+IKS7q8MtagBDTHfoyeyVx152alSjTAo9Lj7O6ZxFarsmfArh24oESnH5Kpje29cnKQgg6oqV+FGWIhsCExmEWtyHoqtzYmBTRF7OV5QH0gyRaZJHdo7KLLbYNELLenwoFU7trJwUBvyLwYj6q73DrINOc5UseadQqC3uQnPrP9BybDOBMeNl3SwcUxg= Received: from ocxma-dut.. ([153.126.233.61]) by smtp.gmail.com with ESMTPSA id kc8-20020a17090333c800b001d5b93560c3sm4913556plb.167.2024.02.11.18.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 18:04:22 -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 , Marcin Szycik Subject: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h Date: Mon, 12 Feb 2024 02:04:03 +0000 Message-Id: <20240212020403.1639030-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: 1790657848114696678 X-GMAIL-MSGID: 1790657848114696678 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 Reviewed-by: Marcin Szycik --- 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. v6->v7 Based on Jakub-san's review, Split the patch. v7->v8: There are no code changes. I've resent the patch, including Marcin-san's patch, because PatchWork did not interpret the patch correctly.Simon-san told me. Thanks. include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 06ef6b78b7de..11fc18988bc2 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -2023,6 +2023,53 @@ static inline int ethtool_validate_duplex(__u8 duplex) #define IPV4_FLOW 0x10 /* hash only */ #define IPV6_FLOW 0x11 /* hash only */ #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ + +/* Used for GTP-U IPv4 and IPv6. + * The format of GTP packets only includes + * elements such as TEID and GTP version. + * It is primarily intended for data communication of the UE. + */ +#define GTPU_V4_FLOW 0x13 /* hash only */ +#define GTPU_V6_FLOW 0x14 /* hash only */ + +/* Use for GTP-C IPv4 and v6. + * The format of these GTP packets does not include TEID. + * Primarily expected to be used for communication + * to create sessions for UE data communication, + * commonly referred to as CSR (Create Session Request). + */ +#define GTPC_V4_FLOW 0x15 /* hash only */ +#define GTPC_V6_FLOW 0x16 /* hash only */ + +/* Use for GTP-C IPv4 and v6. + * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID. + * After session creation, it becomes this packet. + * This is mainly used for requests to realize UE handover. + */ +#define GTPC_TEID_V4_FLOW 0x17 /* hash only */ +#define GTPC_TEID_V6_FLOW 0x18 /* hash only */ + +/* Use for GTP-U and extended headers for the PSC (PDU Session Container). + * The format of these GTP packets includes TEID and QFI. + * In 5G communication using UPF (User Plane Function), + * data communication with this extended header is performed. + */ +#define GTPU_EH_V4_FLOW 0x19 /* hash only */ +#define GTPU_EH_V6_FLOW 0x1a /* hash only */ + +/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers. + * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by + * UL/DL included in the PSC. + * There are differences in the data included based on Downlink/Uplink, + * and can be used to distinguish packets. + * The functions described so far are useful when you want to + * handle communication from the mobile network in UPF, PGW, etc. + */ +#define GTPU_UL_V4_FLOW 0x1b /* hash only */ +#define GTPU_UL_V6_FLOW 0x1c /* hash only */ +#define GTPU_DL_V4_FLOW 0x1d /* hash only */ +#define GTPU_DL_V6_FLOW 0x1e /* hash only */ + /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ #define FLOW_EXT 0x80000000 #define FLOW_MAC_EXT 0x40000000 @@ -2037,6 +2084,7 @@ static inline int ethtool_validate_duplex(__u8 duplex) #define RXH_IP_DST (1 << 5) #define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */ #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */ +#define RXH_GTP_TEID (1 << 8) /* teid in case of GTP */ #define RXH_DISCARD (1 << 31) #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL From patchwork Mon Feb 12 02:04:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takeru Hayasaka X-Patchwork-Id: 199562 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2190697dyd; Sun, 11 Feb 2024 18:05:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEumyBJ/WpIGf/t8IyrxCVb3PhaPFohUNaZ4lBtEatKBE9idH5HsjtX+u/kBdInt63DADm0 X-Received: by 2002:a17:906:c7ce:b0:a3c:a75:c4dc with SMTP id dc14-20020a170906c7ce00b00a3c0a75c4dcmr4548479ejb.6.1707703528819; Sun, 11 Feb 2024 18:05:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707703528; cv=pass; d=google.com; s=arc-20160816; b=YGumFSHNVDX9/ul3nl17eACPMb5/rrGSKUKeVqdp0jlgnVKxCMajfXNAF7JSLtejUl /nj7tpP/0rv5cxH+utVgQpfpLCQA+eyeJraQxUoynWhUFsryUYf1nejPv/Efvzc3CAcG 7pU7j9oqybyX2v/sNIEEIgF1A2puM3gM8jV4452uTHehFTjtUPgEoGbTEy+hRTJ1t4We Gau25L0hFOpnF3MnIVTIQSeH0eCbpQntQdL6DHfSphSV2SWIvHW9FwMR9iBMY9jToP3w cWXBUy3y+1gbV5kXqxryFwoPj/zvirKvwmA2OHNE2Ek7LgcnTy3aMGc4qnBQ6PXyyTfO Ntcw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HWGN4oCsEiEGwruB1PokEjKJ6NRiHp24aKJ8G4QKuGc=; fh=yZdefkBIOU5zNbXXaDaYxl9opdckPGxq1+Nd53FrfYQ=; b=Gih4Rc5iWBVSBh8QhdhgiCHHTaBJ2Qu/w3kkJWEtm2MJuCKLbMUo/HT6kHn9PG9oV2 WR3AvrLb6PPq3CqYieH7p1QdQy0z6NtJKJAHkpUMykj1VgKgXVQqUFY09XyxK0RuFaWx cO/L8Z3lWGc9566LOxMPzkPWgOcZgg9QeFRtZGpQcz8GfDyzh4oEywi3IO3dhGsfszee 2Mp9o+OghNML8Ur4PDapD+By7FHi78+8p6UUOg41ZsZTdNS5SAUBK2sAPRfC9RiNZBNy Sfiwb7yVHhE9Ia65hbmNqu6PeJoorXDhUfAvNbGG4v9CJC0UgWQPY4MsFq+C6hfOdLoB /DvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Lo4Qxfg8; 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-61063-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61063-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCWxGf7kQhcN0rYRq7wMhQcVsRpyf4LhSn4oe5EWZ6Wd/AawOK5Fhro8FS7KIaWwYuduLtVRjDpS7webbmQcY7ZT/A4uqQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gs9-20020a1709072d0900b00a3be99f21f3si3322277ejc.767.2024.02.11.18.05.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 18:05:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61063-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Lo4Qxfg8; 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-61063-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61063-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 477C61F24602 for ; Mon, 12 Feb 2024 02:05:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E602B538D; Mon, 12 Feb 2024 02:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lo4Qxfg8" Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 89C9F5684; Mon, 12 Feb 2024 02:05:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707703502; cv=none; b=RB6iE4/C9qpoUxbAv0YhD+UkjiRaoiQLdQ9rN49Dxf/Zttz6i6neYWhEV1ZiOVGhO9ZCC+yWzcqGh0PPu3/r1v9ofActFwb51WhqAbB2PKBIl5HQszyZKv05P4YbsjKSgh64ww3Oj+pghYrF/6xytcKUXG8DWmFXXwrakqRrvzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707703502; c=relaxed/simple; bh=/yK0O9oNpKpf7hz/NM0vxbU2X3FQwYfJGi/o7iMCJgQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dDX2f5tHGSCjKFOhwIxb7pVWY2wZNoJo/NEX9uoAdGN6kEq7zIkyxrqDhI1Xj+t+cFY4pdqgFva3QKtCB7dgkrTI/IKJl3gY9b2C43lOIxVQfdWdcFqcUJyKwx3COJqXie+GV41dp0n8d/1S/t85r17ZZoqKLmKV79AIzJaORKc= 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=Lo4Qxfg8; arc=none smtp.client-ip=209.85.210.170 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-pf1-f170.google.com with SMTP id d2e1a72fcca58-6e04ea51984so1000250b3a.0; Sun, 11 Feb 2024 18:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707703500; x=1708308300; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HWGN4oCsEiEGwruB1PokEjKJ6NRiHp24aKJ8G4QKuGc=; b=Lo4Qxfg8a20ULZgUxrr3/+zJGJn6nbDzYsn8/qxknRnqYmMeuYzmPFP2QTUfuB2cEs UEp2LOGVdem6ree/qj2lUoR5kLB1rwvMvRhOMFa6f9iPk9zfdM9y50bY8hoirKc/CXeY NhzJbcD3JgPEQRRiAk8Uj0jXZtBe9G2YfLAgKiCGz2V7kThiJmUBzSRDOB3ZijMFy930 KLCbWeiD1i3Q9C5XE1fiensl6Q3RL5LPIgxDloRsa/sW0Mn+FBUgOyl6KO0DSh2ESr/E zh3s49ZXsWhnsXoxw7dpLItqy2jBzLIxdXig9S2GnA/WRt/Zvc+CBp+8eXdbZ7NVB+dI zslA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707703500; x=1708308300; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HWGN4oCsEiEGwruB1PokEjKJ6NRiHp24aKJ8G4QKuGc=; b=DHhhbSWcgUvZz78Exjn46yXNX3SPwwDyKavejyHZVMb4ErSPuct+imPtsRRult+0jA W3IgEP1PANSFcjkbEHCPIpZvELua1Qkc3DdHpVEZO+sJaR7nxJ1YKuwMkJl+lsatvww/ +rLaUDxM4GxFpvU5jInRSy1UEr9QhulnFFcVMg7V3UPLJlJe5512v55L2/FYkb0K0204 59eBLz7nptIP83l0VREm1m7VeAsJbNOZV7MrBRXatfBNaRdrLLTpanqRCDDcRP5qbUME 26hyI9nJu5zKE3edlUr/ZXH/5dPqo9gMOH8lnlQbXEX+TwGR/1PWytkSGK7BTMABwt5h 98WA== X-Gm-Message-State: AOJu0YzIh3Xb7ErrnBJeqiFsNeGFA3YbBkwXu+Bz6oiv1zPGAf2UUstN SNlJkYISUdjhvVSrLxZaar8aNqvONXS+u8M5+8Dz510+/9RDz61D3TwXvaez X-Received: by 2002:a17:902:e847:b0:1d8:fae3:2216 with SMTP id t7-20020a170902e84700b001d8fae32216mr5273989plg.35.1707703499713; Sun, 11 Feb 2024 18:04:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXYIj58maB9MbZ2dpMGsClqWQOQkSIZ3rNWAmWLQD5GM9zPAxfR31HHMZ2+oap7VeUod5RsmXk+jFduRqcZ+iFtwwQdr7BV0DVEC0wvFb7S+at9+6GvxpAvffqzpF4eP/whZdoY1XXCUWihChb8W8CfkuolDwMVbBgBsslRO7d5s4XaObeXYIfgfVtL/nQTnInlg2jUavhnVAn7xqoYkesdHSeug8k8+GxhqTPl24+6AGljyiVDjFNfuQaYWuGXyXUWUITXluIGlZlpygtvow+EUFh2sQxd3/yK0ym3V0deXkGfBCUyUTzaNbAg23KEDscRZlq0X8o24yOf926zPLX7YKa1hbZKBNr1gQroybt1pED9tNa6PvWXaXrSceL9+8o/LvG2G5NdKuZstVZS2yLq1cuTRBvr1cEgsE78/akmdpaCnhSs0Ogp4p9pVy9L05P9WWHvZf1cqxt0URiuOZCWKYMf5+ZcU8SlmvB+TQaJXVo4N+u0GcDZml4= Received: from ocxma-dut.. ([153.126.233.61]) by smtp.gmail.com with ESMTPSA id kc8-20020a17090333c800b001d5b93560c3sm4913556plb.167.2024.02.11.18.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 18:04:59 -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 , Marcin Szycik Subject: [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool Date: Mon, 12 Feb 2024 02:04:05 +0000 Message-Id: <20240212020403.1639030-2-hayatake396@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212020403.1639030-1-hayatake396@gmail.com> References: <20240212020403.1639030-1-hayatake396@gmail.com> 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: 1790656935407465883 X-GMAIL-MSGID: 1790656935407465883 Following the addition of new GTP RSS hash options to ethtool.h, this patch implements the corresponding RSS settings for GTP packets in the Intel ice driver. It enables users to configure RSS for GTP-U and GTP-C traffic over IPv4 and IPv6, utilizing the newly defined hash options. The implementation covers the handling of gtpu(4|6), gtpc(4|6), gtpc(4|6)t, gtpu(4|6)e, gtpu(4|6)u, and gtpu(4|6)d traffic, providing enhanced load distribution for GTP traffic across multiple processing units. Signed-off-by: Takeru Hayasaka Reviewed-by: Marcin Szycik --- .../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 +++++++++ 4 files changed, 162 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