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 9BF6443F17 for ; Fri, 26 Apr 2024 17:10:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7665E43D7A; Fri, 26 Apr 2024 17:10:27 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id CE01A4064E for ; Fri, 26 Apr 2024 17:10:26 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1e51398cc4eso20778835ad.2 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=GuOY2axK2PBM3K4txhh1vpf84w1s0QBMDVjREc+/Hifgxn4/V5KsRc3zN+9l8uLayO NHoKL8VDMb3LBvu/dpoVj6S72mUASsp2ekHJgcEk3KNt4RTOGsMX3Y5ujnvm1lFWX4Mt x+IKVr8dxHQjI2bi6JyU77ik9LDf62TwlXNpsQgqUFMBfM3s3pg8eTRFSY1C2dT3RVwS 5fmnNbW+ePjxEFLU8xJiMsTGS3Nir0n7SIyyt2nNQgAUhvtHKi2obvveNW3c4AnlchIj OuN+NLkT5vHbbdRMhmzo2izfCvYIiWFDqCnuCZvJRQMP0NW2PsEYQYCy91Z0Vp1Pq4n7 7DaQ== X-Forwarded-Encrypted: i=1; AJvYcCUY16xXBwbFm31B8X3bkFyyHVcEZ/boYc4/1qWC9pUpS6hnCP0YZr2i37lU+q+zaih9LG4npNUmlMfAF3GdAro= X-Gm-Message-State: AOJu0YxGFaQxTdNgse/F1IBW+lK7EdKaLJ34qnc6269m+GJuq4DN9A0k Qrq+qucPnDKJPySe1UnK7hIctjndDU9cQn+IHpQcz0sX3hQNBeLr3QZlAchdNNs= 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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.