From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 98BFB43091;
	Thu, 17 Aug 2023 16:07:03 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 3A84740ED9;
	Thu, 17 Aug 2023 16:07:03 +0200 (CEST)
Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com
 [209.85.214.177])
 by mails.dpdk.org (Postfix) with ESMTP id 5B7E740685
 for <dev@dpdk.org>; Thu, 17 Aug 2023 16:07:01 +0200 (CEST)
Received: by mail-pl1-f177.google.com with SMTP id
 d9443c01a7336-1bf1935f6c2so3952315ad.1
 for <dev@dpdk.org>; Thu, 17 Aug 2023 07:07:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692281220;
 x=1692886020; 
 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=ViRQ1q93w7qmN2WNlyILDQXcrip4w7e5OtRr0EsZNiA=;
 b=0UyNdGHTglHSrtqIj8gshaVPpSEoqUdyEuqFhkjynGUAoaG0ewO3TWqBV1aXf00Esz
 OtrPfHY7OGysM6euQScO3ZNvTnIlmPtJ9xi9zBadJxDwG3K0wB58Xfe3F7MV2Oy0Wdap
 DTIu7y+h3YC+FdFjsB3FPqwQxLOC9UQLi4T9bx8UM2sVnSiU7xTHyllO9501aXrtaVs3
 wDCUdmpqqXjecKl8or6cC0y16hoCNMOGYCe8shJO74nkS0yP3ODCJ031c1567CnXBZ/5
 jFP6uhBisGMt4gZZVs9dL0C7Q8flj0MSdGQktRxXxoSI4XY3vWp0NI8ZVuZ5rMv69BI3
 3fyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692281220; x=1692886020;
 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=ViRQ1q93w7qmN2WNlyILDQXcrip4w7e5OtRr0EsZNiA=;
 b=U4Cm34horOtJ4X9ltjtb5QGJsKFzmoOy3U7BsW2DBOEefNEJwuTpPyWQbh8QowJsG+
 PtRMAUSwItx/uaymfPbpdHEMVxhyZXP8nl9QfPtfgqfpAUaEBAc45ZurE4SIfnxDGjk/
 6oJoTZ78j8Ixo8Rbv6ajFcPZFPDp7YAkRDh5oMusHYVqEEi7YacNitw+Gvpn0sx9QNiv
 fxGKfO2yfFJPWsNS1ZpVEy/JwJ6yqDyDcwfYE5/EDJ6acWoYmSoE2D5lMf2RN7FpW8A/
 sHmLgD1vWaDPHNEdeWDwXzcYwd9tZ8NTeQSbCJUjUddw93kVqEnTYRp9/QZdCI9BgPDL
 TLzA==
X-Gm-Message-State: AOJu0Yz9kYy/Dkf7DqwOdHWm/gIgT/pvEGYjdDy4Rd6dH7XbFcaJR5d4
 c4oM2Tp4CVIJvHwooArsXqjDxg==
X-Google-Smtp-Source: AGHT+IFlmEhutCPbTl0f0AlQyVPxSE8fxf9Yl0oa9wxt7HZuiC2Gvql2gyla8XNb4VVdLuumVQ2fGA==
X-Received: by 2002:a17:902:d2cd:b0:1bb:f669:e856 with SMTP id
 n13-20020a170902d2cd00b001bbf669e856mr3711669plc.27.1692281220361; 
 Thu, 17 Aug 2023 07:07:00 -0700 (PDT)
Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207])
 by smtp.gmail.com with ESMTPSA id
 i9-20020a170902eb4900b001bc5dc0cd75sm9130672pli.180.2023.08.17.07.06.59
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 17 Aug 2023 07:07:00 -0700 (PDT)
Date: Thu, 17 Aug 2023 07:06:58 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Matan Azrad <matan@nvidia.com>,
 "viacheslavo@nvidia.com" <viacheslavo@nvidia.com>, Tyler Retzlaff
 <roretzla@linux.microsoft.com>, Wathsala Wathawana Vithanage
 <wathsala.vithanage@arm.com>, nd <nd@arm.com>
Subject: Re: MLX5 PMD access ring library private data
Message-ID: <20230817070658.45576e6d@hermes.local>
In-Reply-To: <AM8PR08MB5810D340131AB38AC72EDA57981AA@AM8PR08MB5810.eurprd08.prod.outlook.com>
References: <AM8PR08MB5810D340131AB38AC72EDA57981AA@AM8PR08MB5810.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu, 17 Aug 2023 05:06:20 +0000
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com> wrote:

> Hi Matan, Viacheslav,
> 	Tyler pointed out that the function __mlx5_hws_cnt_pool_enqueue_revert is accessing the ring private structure members (prod.head and prod.tail) directly. Even though ' struct rte_ring' is a public structure (mainly because the library provides inline functions), the structure members are considered private to the ring library. So, this needs to be corrected.
> 
> It looks like the function __mlx5_hws_cnt_pool_enqueue_revert is trying to revert things that were enqueued. It is not clear to me why this functionality is required. Can you provide the use case for this? We can discuss possible solutions.

How can reverting be thread safe? Consumer could have already looked at them?