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 8AA2F43F17; Fri, 26 Apr 2024 17:10:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0B0643ECB; Fri, 26 Apr 2024 17:10:27 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id D414543D7A for ; Fri, 26 Apr 2024 17:10:26 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6eced6fd98aso2134856b3a.0 for ; Fri, 26 Apr 2024 08:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714144226; x=1714749026; 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=w2i90yxt4cJuQo4RnjB/8OcUqVaBlVGvRqTFwoB6ULE=; b=ig4U0srPNYE+1re4zVkhO7OGF+wmTQhtd+KGJxThlbZMV0IS/z3pmJxZ6VkAD5HdXQ 47+6l9TWfVelxOokiI/fOFqUHiy/pNT0UB6sMdmqPTOODWXcjon8I/hQPaKoNf3oMt80 hQUbfBVV2NjU3yesHo1hmqroG25keViRk7IwrpYHst29SyhCCceuei1XwLNXHMB6Fi/b 92bI5YiS3DAUX0d3tnD32Inq5o1layJ4x9OE2wQvznLk0qXpJRYU5rrV65zdl1f/A0KZ usY8Lwg6pdup9AbvVpIGoVuworCVmXmLql8V9Vnz0JI7i5H9uGnNjoblKpt75ulNdPZN Vvgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714144226; x=1714749026; 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=w2i90yxt4cJuQo4RnjB/8OcUqVaBlVGvRqTFwoB6ULE=; b=MyKeWYvRjIAIB29ahvpKjIclGF1lJcwF7SNth+5Vs5J6G4mR9AUgOaNQMUFk1yl5ww qOZFC6Kudw1OH6CTqQtfJNwd5dDORvJuGy4YBKcNb1JyLSbd6Ke7Bp4LUQmNQ5tojbLH u+Ev69dO31rSxkO9xc01S0Qe2/ebUt/Qwq6ZmErxTmM0+R0dq4c8Dzl8ciSzSqv/yXA0 LTP/Q3IFe9ld7PBoMnGzBfEO5477eWRcnzK6tJReo5GXj4L77aXcSNmA4zPkq62fPdRg vLfxfrv/fXL3Vh4x+cuFxL0hYFWA6f5M9PGctoQvbtwRNzd3m59Nb9h9n9GuGwaHjyRP 5VMw== X-Gm-Message-State: AOJu0YyBWmvtI6GQiSUJFAUpTW1mRWD+FZvxjXms6TUTBS+mnF2ENHSa ll5P7lrhCb+tTAB7nd7ZI0+5735nURk7hz6jGBfoT5OQ62md5dyeJ6x90DvUK4Y= X-Google-Smtp-Source: AGHT+IGg/qzuRJ5zcY5mhLEnfcG3Fmgl+DOmdPKgwsxHB19t/lrV81f5lATOcjJeJ4nKSSU7hjVnpw== X-Received: by 2002:a17:902:e546:b0:1e5:b82:2f82 with SMTP id n6-20020a170902e54600b001e50b822f82mr4053535plf.42.1714144225793; Fri, 26 Apr 2024 08:10:25 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id s13-20020a17090330cd00b001e60ae3da22sm15586789plc.245.2024.04.26.08.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:10:19 -0700 (PDT) Date: Fri, 26 Apr 2024 08:10:16 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , , Morten =?UTF-8?B?QnLDuHJ1cA==?= , Thomas Monjalon , "John W . Linville" , Ferruh Yigit , Subject: Re: [PATCH v3] net/af_packet: cache align Rx/Tx structs Message-ID: <20240426081016.7c613114@hermes.local> In-Reply-To: <20240426090502.100487-1-mattias.ronnblom@ericsson.com> References: <20240426073824.100386-1-mattias.ronnblom@ericsson.com> <20240426090502.100487-1-mattias.ronnblom@ericsson.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 Fri, 26 Apr 2024 11:05:02 +0200 Mattias R=C3=B6nnblom wrote: > Cache align Rx and Tx queue struct to avoid false sharing. >=20 > The RX struct happens to be 64 bytes on x86_64 already, so cache > alignment has no effect there, but it does on 32-bit ISAs. >=20 > The TX struct is 56 bytes on x86_64. >=20 > Both structs keep counters, and in the RX case they are updated even > for empty polls. >=20 > v3: Move __rte_cache_aligned directive to a MSVC-compatible location. >=20 > Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devi= ces") > Cc: stable@dpdk.org >=20 > Signed-off-by: Mattias R=C3=B6nnblom Looks good. Acked-by: Stephen Hemminger If you want to go further with this: - could rx and tx rings be next to each other so that any of the lookahe= ad in cpu helps, not hurts? - what about secondary process support - would sendmmsg() and recvmmsg() help for bursting.