From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 2CAA41BE6D for ; Tue, 3 Jul 2018 09:18:03 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id k7-v6so792469wrq.0 for ; Tue, 03 Jul 2018 00:18:03 -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:openpgp :user-agent; bh=hnIcIcEZ9kW1EoaEKrsCo0kcwf73+94GDO3ctJnFrS8=; b=qfXhaFSl7Lj+5j1jwfwVF5twTDQM0HqsJUeA+aIjDQHURtMJ+VhMLn90ZAEVYlHeaa LuvtzH2/LIum0Z0HXun3WKDwKqt/kVGBhPJVtYMoUA1E//PwGGmNvbFfcwI6BCiKq01U OGPYlfMXVI6A8mBuG2XjhoCeUol1jC51q8jrKMpSgG3THNgiVgvzgWYq9LdP85rLyyCP Hl89Vuo5TI34tAfTstsHdaYyRjVGg/On5ynWETi1wxn+qqHYPWSPrUJrmIrbNbapXUtS 9n4IKQ6cfL7WE6bFTLGYHXa19wQy4OzA1r3ErSf5E4RhhPVVH94ta2octN8Ljl8fvEtL oPlw== 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:openpgp:user-agent; bh=hnIcIcEZ9kW1EoaEKrsCo0kcwf73+94GDO3ctJnFrS8=; b=he9Q2qrNqmOupEQToHgWyOtW33G11k12SKlN0qdrO0kkuJe0304l9fIj3lyh7WMbZ3 LGWHHIKATArKc1P1T0sB/BMTV1jS4femcuCoAWh1MMKzIN4vklihBupEYdZ837fBMGXt cK/mEPUgR47q/rHYPziYAqfGUEnKZZ5BgqZs3+V1VFFsc/N4ij3Yg0n+83/9vzc0DnHO 6n5mewc/TFsAhrdFS9Ua8dnMPD/oNXbp0lT81DhAqEWTD1+nThCEblM+fOUeirvQR3X9 ij1IetNRI+Gt1RGfi2ZXXXoiHjg5vp/rnwxPzgaUaJ6+l3GlTRjl7bZEhaIE9Ohsnu2v 7/Lw== X-Gm-Message-State: APt69E1knbikat7Ctxfm36rd2Q8cVM/n+1G8VcEHxmm19m0KEM4/P3Vi UzqiBhhVHyIJOs0GL9J9Svuk X-Google-Smtp-Source: AAOMgpebeq1W5NeI2S9HWcVpApggUWAxQuSwhwC2YmAJurQbhTAz1fwV7FeOC54JeALOSupiGiofZQ== X-Received: by 2002:adf:a634:: with SMTP id k49-v6mr5703630wrc.181.1530602282840; Tue, 03 Jul 2018 00:18:02 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l6-v6sm562524wmh.41.2018.07.03.00.18.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 00:18:02 -0700 (PDT) Date: Tue, 3 Jul 2018 09:17:56 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Yongseok Koh Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20180703071756.5fqggm5o77ytaptg@laranjeiro-vm.dev.6wind.com> References: <1368a8720f3ec3c40e47a6b1d9ef1edf0f38a646.1530111623.git.nelio.laranjeiro@6wind.com> <20180703010703.GB38831@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: <20180703010703.GB38831@yongseok-MBP.local> OpenPGP: id=A0075DA8F66A5949 preference=signencrypt User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2 02/20] net/mlx5: handle drop queues are regular queues 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: Tue, 03 Jul 2018 07:18:03 -0000 On Mon, Jul 02, 2018 at 06:07:03PM -0700, Yongseok Koh wrote: > On Wed, Jun 27, 2018 at 05:07:34PM +0200, Nelio Laranjeiro wrote: > > Drop queues are essentially used in flows due to Verbs API, the > > information if the fate of the flow is a drop or not is already present > > in the flow. Due to this, drop queues can be fully mapped on regular > > queues. > > The title doesn't look good. Maybe typo? > net/mlx5: handle drop queues are regular queues > 'are' -> 'as'? [...] Right, > > struct priv { > > LIST_ENTRY(priv) mem_event_cb; /* Called by memory event callback. */ > > struct rte_eth_dev_data *dev_data; /* Pointer to device data. */ > > @@ -175,7 +178,7 @@ struct priv { > > struct rte_intr_handle intr_handle; /* Interrupt handler. */ > > unsigned int (*reta_idx)[]; /* RETA index table. */ > > unsigned int reta_idx_n; /* RETA index size. */ > > - struct mlx5_hrxq_drop *flow_drop_queue; /* Flow drop queue. */ > > + struct mlx5_drop drop; /* Flow drop queues. */ > > priv->drop sounds strange. Why did you change the name? > How about priv->flow_drop if you didn't like the full name? >[...] flow_drop_queue is also confusing as it is a drop hash rx queue, it can be used without a flow as a regular queue. Renaming it to drop_hrxq. > > +/** > > + * Release a drop Rx queue Verbs object. > > + * > > + * @param dev > > + * Pointer to Ethernet device. > > + * @param rxq > > + * Pointer to the drop Verbs Rx queue. > > + * > > + * @return > > + * The Verbs object initialised, NULL otherwise and rte_errno is set. > > + */ > > +void > > +mlx5_rxq_ibv_drop_release(struct rte_eth_dev *dev, struct mlx5_rxq_ibv *rxq) > > If rxq for drop is saved in priv->drop.rxq, then why does it have to get rxq > pointer as an argument? Looks redundant. >[...] Like for all hrxqs, indirection tables, rxqs, which are stored in priv inside a list or an array. Priv is used as a storage place which is only access through *_{new,get,release} functions. This is also to keep a consistency between regular hrxqs, and drop hrxq also. > > +void > > +mlx5_ind_table_ibv_drop_release(struct rte_eth_dev *dev, > > + struct mlx5_ind_table_ibv *ind_tbl) > > ind_tbl is a redundant argument. Can be referenced by > priv->drop.hrxq->ind_table. >[...] Ditto. > > +/** > > + * Release a drop hash Rx queue. > > + * > > + * @param dev > > + * Pointer to Ethernet device. > > + * @param hrxq > > + * Pointer to Hash Rx queue to release. > > + */ > > +void > > +mlx5_hrxq_drop_release(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq) >[...] > > hrxq is a redundant argument. Can be referenced by priv->drop.hrxq. >[...] Ditto. Thanks, -- Nélio Laranjeiro 6WIND