From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4BFD845E88; Thu, 12 Dec 2024 18:11:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF8544027D; Thu, 12 Dec 2024 18:11:07 +0100 (CET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id E7BFD40269 for ; Thu, 12 Dec 2024 18:11:05 +0100 (CET) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-20cf3e36a76so8529505ad.0 for ; Thu, 12 Dec 2024 09:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734023465; x=1734628265; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=23SXZJX7i7xAS0GNigzZ2Xax+dJdQX1I436Rvk7vJho=; b=XOv/psOBeIAfcpaBEOMhLYLyjKezsISFfSnWFNFbo8YdXLg1uyWZRtFqNnW+z9daW1 8KRi5kBHR5tET0DdMCSEWGClydn/HHNqn3+fncFgt0jt5QxjUtKwJwGybyeNi1tkOsHU 79TjjPQoVjGyvi8TCo66idJmdN1vW3ifb51CRW5q2keCE/aSsbYkm7sxHDY67L8UP7tP ufnEJoQk6sy9sXCzfdPhj4NxjwMgRAXRrey7WOHtFkssgAmpvRkaqKZ7ATNbzYH4/y3d JwpugmFjwMaerybE8qbuzn6ViY0D8uIAmKQrMC5AI+V8Poeqq0iwbCf+2aKT4r6wY56F NbKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734023465; x=1734628265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=23SXZJX7i7xAS0GNigzZ2Xax+dJdQX1I436Rvk7vJho=; b=wzYMbpQEkknols+i2JkROWU1+RUYQBny3ckrY+NTTMLUGNoYa8xjvMUzcoUKmannK6 iwoxZIJVOE+AOBKv5UC3TCGORCz/5JWaxCD6qYHVioc9LcbtMz5PmIgloqET6dboVTol 6iuY/CgPw9eUEC71UHL8wQiGJU7qK0+kd5giIYub4V4pKs6TX/cN2BIr6W3qXo4+uIVR 5ZZoCn7/ZTRA8s9lpxQZH/qBXnC5EYgJG4W3MoWRs15b8stWnanP264G0D6ojA/h+kPG m4GfnCHeCHw85a6bqbl70LQ6QzVie3sqMVL8uYZHA9lJYq+d42RnReTZnKmFRBad8qkm mUDw== X-Forwarded-Encrypted: i=1; AJvYcCVRg1AWi0ZmHWq43u6R5KysMofvfFs/Jwn7D4eD9rYrFO2mQ96p2w9SrxsLaHDW6K87Fus=@dpdk.org X-Gm-Message-State: AOJu0Yz0bsnsZzbkPAaMz6A8CNOEadHb7Yph4UyIDUIs7QqQSO8Dthax FOk6S+g+OPRyoAFNneF2oUQj6FY4csHylswwOfV+tHY5aAPIa6yZPNdKxzqBnIw= X-Gm-Gg: ASbGncu8kY1p/JItkxT1R29qgratDqyhCRYTRghX7ygx3Ns+OTtRwK4vnAthsX555lL 0A+6Zbjt/uhdK7deGIBjVOGEUmsBod38oZ22MbkcU3GAztV3hq26yuDFtQiCC7era8BZuij0oj1 IXU16RY8/q1jAON8iW27zulL51bcVZdmnLEEVjVIjOw/Fp8GYt3a0T9rrhysdUPdPSeLRPU6QaT YjnfRgsaVQcCkWJcjUM2r/dTtxwnD00mTMavPy6q33h6oIjQkG1eV+nBf20FETw4vXOdFg13FB+ 8LcPqowosT4osHHKPa7z5mGCKjEbcND1pg== X-Google-Smtp-Source: AGHT+IFJ7eTWvWwjcMO9EIAK+hAG5fSuxvelj4PHqm4v4WwU82Aj15fhRb4MC9drEFNDl5fcU4hwAg== X-Received: by 2002:a17:902:f70b:b0:216:5af7:eb2a with SMTP id d9443c01a7336-2177851e770mr130538165ad.33.1734023464508; Thu, 12 Dec 2024 09:11:04 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215f8efcc4fsm125475065ad.135.2024.12.12.09.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 09:11:04 -0800 (PST) Date: Thu, 12 Dec 2024 09:11:02 -0800 From: Stephen Hemminger To: Tudor Cornea Cc: linville@tuxdriver.com, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org Subject: Re: [PATCH] net/af_packet: allow disabling packet fanout Message-ID: <20241212091102.20422f95@hermes.local> In-Reply-To: <20241212080442.1628366-1-tudor.cornea@gmail.com> References: <20241212080442.1628366-1-tudor.cornea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 12 Dec 2024 10:04:42 +0200 Tudor Cornea wrote: > This allows us to control whether the PMD will attempt to use > the PACKET_FANOUT socket option, and allows the binary compiled > against newer kernel headers to run on an older kernel, which > lacks support for it. >=20 > Signed-off-by: Tudor Cornea Controlling fanout more is a good idea but not sure what this patch is trying to do with it. - DPDK minimum kernel version is now 4.19 so no point in worrying about backward compatibility. According to man page for packet, fanout was added in 3.1 kernel. - It would be useful to allow application to control fanout in more detail. According to man page: =E2=80=A2 The load-balance mode PACKET_FANOUT_LB implements a= round- robin algorithm. =E2=80=A2 PACKET_FANOUT_CPU selects the socket based on the CPU t= hat the packet arrived on. =E2=80=A2 PACKET_FANOUT_ROLLOVER processes all data on a single = socket, moving to the next when one becomes backlogged. =E2=80=A2 PACKET_FANOUT_RND selects the socket using a pseud= o-random number generator. =E2=80=A2 PACKET_FANOUT_QM (available since Linux 3.14) sele= cts the socket using the recorded queue_mapping of the received skb. The default should be for packet to behave like a hardware NIC if RSS is enabled. And use a single queue if RSS is not enabled. The PMD kind of does this now but not the same.