From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 7180D19342B for ; Fri, 3 Jan 2025 02:36:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735871820; cv=none; b=jeBd7jbRXMqOT3DhtIcCkZImNEC5rVxbLuv+rbLLPU4LsPxlzVxBDEz4Hef2Pp/ZAQ6KkXE2/VDdgP/bRP2Tzd0TGHFnlX0Am1IOisq2whgZ6ZUGtkHKZx+dCzGq1ZIkFmwUDeIs+shaIAH/Do4HvmmCiBKIRt2+X8fx+/brc/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735871820; c=relaxed/simple; bh=ewbCAEa1HCYTZ/da2eh8J5IoXaFWtdrPanhkagUdKfI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NOo/NFiAoJwbC8/Uu4pAyrHhB/ppNqQeh/7XJ2usSH7uuLCM5ASLNhOK0iH8M87tyr3WCvupB56pWRR9YNAYdD7a+JktI4I/UQWKbnbM2rLSJH2n0dSKG8HvshWV0PeBVcz80tl9ija80IMTgj5VEYu0cfoDM3wOtCAqMFKFkIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shopee.com; spf=pass smtp.mailfrom=shopee.com; dkim=pass (2048-bit key) header.d=shopee.com header.i=@shopee.com header.b=BiLM9rMO; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shopee.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shopee.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shopee.com header.i=@shopee.com header.b="BiLM9rMO" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2166651f752so189818455ad.3 for ; Thu, 02 Jan 2025 18:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; t=1735871818; x=1736476618; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=pShsrZzLuZZugsMDraq2n40cWRm+2AwH1RmFN69x8Oo=; b=BiLM9rMOWIYanHNhUAJCFxhzheE6b6LW9RN3rrrZAzzbU9Z+BojM766FYAzA8NSLKX 6qsfJaU/i0Irw0UPEfg06PMJVAXRWeQOSZ6ZseiknAJARBhzXLu20upIQi5zayI6juxt wiedh49lKxPVQzmeyEVCRA97JOA56QGVhcHfrUGrVoMXqqu6Oh9jMrA9biILl6uZ3lPR 4Z6/WTMafEU4sfQPzJTed3xSBCnHF7x7b4IebgmXSRPQP3HTcuNEUFgvH8PXTRS33cKT iHP3rGdpk13d6XyBycxkpNjyppE18ADFJdPaIGc7d8aXGU8jT6zNIimim1iq1OETAF/H ZGUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735871818; x=1736476618; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pShsrZzLuZZugsMDraq2n40cWRm+2AwH1RmFN69x8Oo=; b=qpg1TJUGzyOFaxahBMHlYQpUwToXFtyB+p1CdrYkNX+fWqq/e4HnD+qC0uPGDB4UHV 2P9OW7z0NwGeYq1uc7ZnX8orHRKIxMNYJFq4xmRDvmf6VWoXmJKT3hJoqjs1g2xqglr1 CZZ4a7jbABXazMcD0faBwF44zc9h5QL1Dt6xfF8ukXcQFECa7mfQg5P6NIrY3iz8WkjE SzFLWE8qEFnr6b9JvOSKI7EskMwaClmBgACYkF93iHuxpcT1cVBdHqeXJDW4FrWJqcFz 1Z/LCUAYT6E7MuBDMA2hiai5v3DHT60v3HIr4GpAjB/wo6SkSmcjM+nqQZDbjM/Icht4 4j8A== X-Forwarded-Encrypted: i=1; AJvYcCUMwfsbCSX9tvRQ2TH6SD0jtHCoseqfCJBpPdiRdYHYYYFRkUEFrDopjyWxCTCORw6UPcIoZA7CJgpHj8o=@vger.kernel.org X-Gm-Message-State: AOJu0Yx35PsrZf8uxWgRPTx7jWEH/XXrbvXQzNoNdbogIiQfweEqK2UZ D7YunDzPH5nVtDf1Fbr0acKj9qcuep1XgUPE2S56SbC1xqhTRlozck4hpW3GM4A= X-Gm-Gg: ASbGncs3Wv4frZR7Ob72Wu05hFbeyHaunSY6Ajyoy9kTjmltQO8Fb9e/DPrY48JU1Xs gv7u8IkfcYu4Zot5C1IFrX5MJO4f9SuJb86q8oUzyhf7q9Pki/attNt0SqAjY7ehe0jQLO5MiBg 0P+Pw6iWPtDGZee7kQSIyazFP6bdpVT4jLrqSMutp6LbJxvxOL5XgvZLNQBoKve2PszrE9A7g+C Ty/0tYISXscmgKD/i7JIwiUusC0s6+bu5RZbHJmNNnouk1PCfriR4/Tdnr5pm0GB1DS+g== X-Google-Smtp-Source: AGHT+IElcPb5SdyKwOYf2hMzQ7oB5RMpBcE/E/qNMOnvQzCZhDGbGZG/16W8RKFUUlBN64vu4WnKdA== X-Received: by 2002:a05:6a00:392a:b0:728:e906:e446 with SMTP id d2e1a72fcca58-72abdeb7855mr76549430b3a.24.1735871817695; Thu, 02 Jan 2025 18:36:57 -0800 (PST) Received: from [10.54.24.59] ([143.92.118.3]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad90c1b1sm25991849b3a.185.2025.01.02.18.36.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jan 2025 18:36:57 -0800 (PST) Message-ID: <03b02880-4aae-4a4a-9533-7a756cc84001@shopee.com> Date: Fri, 3 Jan 2025 10:36:50 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?Q?Re=3A_=5BQuestion=5D_ixgbe=EF=BC=9AMechanism_of_RSS?= To: Eric Dumazet Cc: Tony Nguyen , Przemek Kitszel , "David S. Miller" , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org References: From: Haifeng Xu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2025/1/2 19:46, Eric Dumazet wrote: > On Thu, Jan 2, 2025 at 12:23 PM Haifeng Xu wrote: >> >> >> >> On 2025/1/2 18:34, Eric Dumazet wrote: >>> On Thu, Jan 2, 2025 at 9:43 AM Haifeng Xu wrote: >>>> >>>> >>>> >>>> On 2025/1/2 16:13, Eric Dumazet wrote: >>>>> On Thu, Jan 2, 2025 at 4:53 AM Haifeng Xu wrote: >>>>>> >>>>>> Hi masters, >>>>>> >>>>>> We use the Intel Corporation 82599ES NIC in our production environment. And it has 63 rx queues, every rx queue interrupt is processed by a single cpu. >>>>>> The RSS configuration can be seen as follow: >>>>>> >>>>>> RX flow hash indirection table for eno5 with 63 RX ring(s): >>>>>> 0: 0 1 2 3 4 5 6 7 >>>>>> 8: 8 9 10 11 12 13 14 15 >>>>>> 16: 0 1 2 3 4 5 6 7 >>>>>> 24: 8 9 10 11 12 13 14 15 >>>>>> 32: 0 1 2 3 4 5 6 7 >>>>>> 40: 8 9 10 11 12 13 14 15 >>>>>> 48: 0 1 2 3 4 5 6 7 >>>>>> 56: 8 9 10 11 12 13 14 15 >>>>>> 64: 0 1 2 3 4 5 6 7 >>>>>> 72: 8 9 10 11 12 13 14 15 >>>>>> 80: 0 1 2 3 4 5 6 7 >>>>>> 88: 8 9 10 11 12 13 14 15 >>>>>> 96: 0 1 2 3 4 5 6 7 >>>>>> 104: 8 9 10 11 12 13 14 15 >>>>>> 112: 0 1 2 3 4 5 6 7 >>>>>> 120: 8 9 10 11 12 13 14 15 >>>>>> >>>>>> The maximum number of RSS queues is 16. So I have some questions about this. Will other cpus except 0~15 receive the rx interrupts? >>>>>> >>>>>> In our production environment, cpu 16~62 also receive the rx interrupts. Was our RSS misconfigured? >>>>> >>>>> It really depends on which cpus are assigned to each IRQ. >>>>> >>>> >>>> Hi Eric, >>>> >>>> Each irq was assigned to a single cpu, for exapmle: >>>> >>>> irq cpu >>>> >>>> 117 0 >>>> 118 1 >>>> >>>> ...... >>>> >>>> 179 62 >>>> >>>> All cpus trigger interrupts not only cpus 0~15. >>>> It seems that the result is inconsistent with the RSS hash value. >>>> >>>> >>> >>> I misread your report, I thought you had 16 receive queues. >>> >>> Why don't you change "ethtool -L eno5 rx 16", instead of trying to >>> configure RSS manually ? >> >> Hi Eric, >> >> We want to make full use of cpu resources to receive packets. So >> we enable 63 rx queues. But we found the rate of interrupt growth >> on cpu 0~15 is faster than other cpus(almost twice). I don't know >> whether it is related to RSS configuration. We didn't make any changes >> on the RSS configration after the server is up. >> >> >> >> FYI, on another server, we use Mellanox Technologies MT27800 NIC. >> The rate of interrupt growth on cpu 0~63 seems have little gap. >> >> It's RSS configration can be seen as follow: >> >> RX flow hash indirection table for ens2f0np0 with 63 RX ring(s): >> 0: 0 1 2 3 4 5 6 7 >> 8: 8 9 10 11 12 13 14 15 >> 16: 16 17 18 19 20 21 22 23 >> 24: 24 25 26 27 28 29 30 31 >> 32: 32 33 34 35 36 37 38 39 >> 40: 40 41 42 43 44 45 46 47 >> 48: 48 49 50 51 52 53 54 55 >> 56: 56 57 58 59 60 61 62 0 >> 64: 1 2 3 4 5 6 7 8 >> 72: 9 10 11 12 13 14 15 16 >> 80: 17 18 19 20 21 22 23 24 >> 88: 25 26 27 28 29 30 31 32 >> 96: 33 34 35 36 37 38 39 40 >> 104: 41 42 43 44 45 46 47 48 >> 112: 49 50 51 52 53 54 55 56 >> 120: 57 58 59 60 61 62 0 1 >> 128: 2 3 4 5 6 7 8 9 >> 136: 10 11 12 13 14 15 16 17 >> 144: 18 19 20 21 22 23 24 25 >> 152: 26 27 28 29 30 31 32 33 >> 160: 34 35 36 37 38 39 40 41 >> 168: 42 43 44 45 46 47 48 49 >> 176: 50 51 52 53 54 55 56 57 >> 184: 58 59 60 61 62 0 1 2 >> 192: 3 4 5 6 7 8 9 10 >> 200: 11 12 13 14 15 16 17 18 >> 208: 19 20 21 22 23 24 25 26 >> 216: 27 28 29 30 31 32 33 34 >> 224: 35 36 37 38 39 40 41 42 >> 232: 43 44 45 46 47 48 49 50 >> 240: 51 52 53 54 55 56 57 58 >> 248: 59 60 61 62 0 1 2 3 >> >> >> I am confused that why ixgbe NIC can dispatch the packets >> to the rx queues that not specified in RSS configuration. > > Perhaps make sure to change RX flow hash indirection table on the > Intel NIC then... > > Maybe you changed the default configuration. > > ethtool -X eno5 equal 64 The maximum number of RSS queues supported by Intel Corporation 82599ES NIC is 16. When I specify the number which is larger than 16, it shows the below message. "Cannot set RX flow hash configuration: Invalid argument." > Or > ethtool -X eno5 default This command can run sucessfully and as I saied above, it only has 16 queues. RX flow hash indirection table for eno5 with 63 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 24: 8 9 10 11 12 13 14 15 32: 0 1 2 3 4 5 6 7 40: 8 9 10 11 12 13 14 15 48: 0 1 2 3 4 5 6 7 56: 8 9 10 11 12 13 14 15 64: 0 1 2 3 4 5 6 7 72: 8 9 10 11 12 13 14 15 80: 0 1 2 3 4 5 6 7 88: 8 9 10 11 12 13 14 15 96: 0 1 2 3 4 5 6 7 104: 8 9 10 11 12 13 14 15 112: 0 1 2 3 4 5 6 7 120: 8 9 10 11 12 13 14 15 Thanks!