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 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 ; Thu, 17 Aug 2023 16:07:01 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1bf1935f6c2so3952315ad.1 for ; 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 To: Honnappa Nagarahalli Cc: "dev@dpdk.org" , Matan Azrad , "viacheslavo@nvidia.com" , Tyler Retzlaff , Wathsala Wathawana Vithanage , nd Subject: Re: MLX5 PMD access ring library private data Message-ID: <20230817070658.45576e6d@hermes.local> In-Reply-To: References: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 17 Aug 2023 05:06:20 +0000 Honnappa Nagarahalli 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?