From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by dpdk.org (Postfix) with ESMTP id 11E911B28D for ; Fri, 6 Oct 2017 10:52:49 +0200 (CEST) Received: by mail-wr0-f176.google.com with SMTP id r79so7202853wrb.13 for ; Fri, 06 Oct 2017 01:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=W+Ts8i5sD67rij+fzUSwK6/sXDr3nywE99iy9Cbqv5M=; b=I7a7YEi8v9Pba7oTpawUQE6eM1IVk46KtdHRXhEJxta7+Ixm6g63d4P7MR5bj0MiXm plX+Lyl9aaeWN5DcrZCfu3wcVexV4S3RRNeRcc30M9D4t3RL+0tt5uRfZ0+ltXkeucLM DWmmcLh8IY5LqhAswx51lf6GJEtyqdmwxmgH3Yjqc8vozo6V9QFslinlv0JWTVQb4AEG AMjKvxlO7tNv1lKgcwnDt1yCCgb9UjknFSIfZW1WxoyVapdSNLVAogcN18MqSk4uyFZX sa5Oh/JyN18QBSlqQ2TERiUF0npDJMzHQ9duNqtvfTZQSj2J4fBORLlWy92LPHoV+dx8 diPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=W+Ts8i5sD67rij+fzUSwK6/sXDr3nywE99iy9Cbqv5M=; b=L6YU1FJMJNLqCmcbR0mr4tG1L/yDpGzS78rp62WJLSUlJK71Rq7ifGIQWCcJnX+lp+ STWfXiEtLTRObDS/uAF5AARsRG5+bgRluGSV7kkn7zyDxNahCREr+HQswe+8UE+E22jE p6xWsJ/d3ko9bLdBvdiLPN+4VtvxmV7dAk3LT8NEhzmAcV4ftgBNzQWIpeCOPPv0avEd PWD0vBPuKr8v66TryT3A3/WwbJM5y3ymT1sumPpCUqyyfACdozoiEPWozHVCoI1DVy16 wxnGpGH5fq1Z9zHw5XUueXqz2HsppnK1EzHuLuvPp6+D4AEj26efv0AhOzcbkV8kdUwV 5OfQ== X-Gm-Message-State: AMCzsaXYOBwnZhIQ23MU0pIm0BpKInI5hb15DMjUtN6hkHAAT8J8G0m1 lP9d6w5YELBked+Rvkle6LFY X-Google-Smtp-Source: AOwi7QCxvOBMp4IFMFAkOiVnkU2ujrX45vzBDGe0YGcG3Gy+t+FTaayTHl/be+3ySQ00ncLDXbq1Bw== X-Received: by 10.223.160.170 with SMTP id m39mr1215126wrm.174.1507279969764; Fri, 06 Oct 2017 01:52:49 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g25sm1909019wmc.16.2017.10.06.01.52.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 01:52:49 -0700 (PDT) Date: Fri, 6 Oct 2017 10:52:38 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Yongseok Koh Cc: dev@dpdk.org, adrien.mazarguil@6wind.com, ferruh.yigit@intel.com Message-ID: <20171006085238.GP15330@autoinstall.dev.6wind.com> References: <473a992610787eb996537bf2384cc314561f45f8.1507207731.git.nelio.laranjeiro@6wind.com> <20171006032637.GA19330@yongseok-MBP.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171006032637.GA19330@yongseok-MBP.local> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 10/30] net/mlx5: separate DPDK from Verbs Rx queue objects X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2017 08:52:50 -0000 On Thu, Oct 05, 2017 at 08:26:38PM -0700, Yongseok Koh wrote: > On Thu, Oct 05, 2017 at 02:49:42PM +0200, Nelio Laranjeiro wrote: > [...] > > +struct mlx5_rxq_ibv* > > +mlx5_priv_rxq_ibv_get(struct priv *priv, uint16_t idx) > > +{ > > + struct mlx5_rxq_data *rxq_data = (*priv->rxqs)[idx]; > > + struct mlx5_rxq_ctrl *rxq_ctrl; > > + > > + if (idx >= priv->rxqs_n) > > + return NULL; > > + if (!rxq_data) > > + return NULL; > > + rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq); > > + if (rxq_ctrl->ibv) { > > + priv_mr_get(priv, rxq_data->mp); > > One rxq_ibv has one mr as one rxq has one mp. As long as rxq_ibv exist, the mr > can't be released. So, it looks unnecessary to increase refcnt of the mr here. >[...] But on MP can be shared among several queues, (see eth_rx_queue_setup() and eth_tx_queue_setup()), which means that a queue is not the single owner of the Memory pool and thus the memory region. As the Memory region can be shared among several queues, it is necessary to increase/decrease the ref count accordingly. Thanks, -- Nélio Laranjeiro 6WIND