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 1BF5BA00C2 for ; Wed, 23 Feb 2022 18:03:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08BAE4114A; Wed, 23 Feb 2022 18:03:26 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 0939040DF6 for ; Wed, 23 Feb 2022 18:03:24 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id b8so3250921pjb.4 for ; Wed, 23 Feb 2022 09:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OPuyR3Hp9L1+xj1rg+FUSuECYac5jIwIjw8KkNpHKuo=; b=UtZ9psL2dRqYw2IgkpvXVqNtnHkNUNUwEOtMK7aenN23CuK6McC8A3IDUEsZd09kUj 0HrfTBGVIwi9FuJBE9CQhc8JjntKaAymztnkjoylNkZY6g9Ys16H/A93+TJHahXdrAWj /fc+IiXRKRv9Q88vq+ZbSJULIuqk3Ee0k1vXBcrGRoo7j97MxpLU4mnmfSHUpz1Qk9cc fY5wK4MGGa1wu38XBbVJw16ykVlSbN1iG8dHAXfUgzfUFtTrrVnjlHBIy1Fji4YwE+gG BoT8Hm50N9qQdhnnyFF79Aij40ZYohOQiaOLcOMvzp0nN7nPp6UurXrFpdYKrXOvrp6+ sHsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OPuyR3Hp9L1+xj1rg+FUSuECYac5jIwIjw8KkNpHKuo=; b=RFrQoRufDRbJaZ7XgZOm9j7mQebbIRWEq++9lae1sUiIufsgnBH6amr8j5VvG+rzgH aPa6pg52tR6Ft7j1on9nu8jh9t6LhhdmYYL0wJwxKrsg949USaw/ftBfQQcchW7RqV9M aEIiDlO+YsRf2M0qNm16MxaKyyiNtDoALFnssvXkMPvwKkwZ/QiqJNimxRpxWP2nyxnj gVIMRiMgDFEKyYTb9o4YQzwjqadMRp+l0L7vE4kzK8mS84p225q2S/J5IL5NibptKn6o NH9zkbgBGjQMJm3PnQ2HSk2Gl8IBW/SoAFROCs81EIFthbTNqcArtk3SG2K/z40yi0uD /RCw== X-Gm-Message-State: AOAM532IMIvPWAnDkbs60cB5smcwbQ3gKa2w0Qb9naEYeTcT1wxsLkSN Z5z+M9qYuKIz2esrMEduQ/TJHznwZTZxrzCM X-Google-Smtp-Source: ABdhPJxy2WRpcq6XOD7cjnPA1kfDJg7AB1k5F6IqZpfGyIo00Mdujv+O758HtYozHQ90RnfaXDgegg== X-Received: by 2002:a17:902:cecf:b0:149:4c30:6dd2 with SMTP id d15-20020a170902cecf00b001494c306dd2mr648566plg.93.1645635803106; Wed, 23 Feb 2022 09:03:23 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id k11sm41530pfu.150.2022.02.23.09.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 09:03:22 -0800 (PST) Date: Wed, 23 Feb 2022 09:03:20 -0800 From: Stephen Hemminger To: "Ramin.Taraz@gd-ms.com" Cc: "users@dpdk.org" Subject: Re: [dpdk-users] Accessing packet data from different lcores Message-ID: <20220223090320.2386cd6a@hermes.local> In-Reply-To: References: <20220223075811.70e65eb6@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Wed, 23 Feb 2022 16:10:00 +0000 "Ramin.Taraz@gd-ms.com" wrote: > -----Original Message----- > From: Stephen Hemminger > If this field is going to be referenced by other cores it needs to be done inside lock or use atomic builtin primitives. > > > Mbufs are passed from core to core via rings so in practice there will 1 core accessing it at any time. > Why should it be locked against multiple access? More details please? which CPU type? and what type of ring? If you are using DPDK rings, they use atomic operations which are equivalent to locks. You should experiment with adding thread fence (__atomic_thread_fence) to make sure this is not your problem.