From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [net-next V9 PATCH 14/16] mlx5: use page_pool for xdp_return_frame call Date: Wed, 4 Apr 2018 15:36:37 +0200 Message-ID: <20180404153637.7f9b655c@redhat.com> References: <152275360298.1026.10333759008401281682.stgit@firesoul> <152275372705.1026.11963048035925660701.stgit@firesoul> <72eccc60-21d2-0789-81c6-1bad2adb41ed@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, =?UTF-8?B?QmrDtnJuVMO2cGVs?= , magnus.karlsson@intel.com, eugenia@mellanox.com, Jason Wang , John Fastabend , Eran Ben Elisha , Saeed Mahameed , galp@mellanox.com, Daniel Borkmann , Alexei Starovoitov , brouer@redhat.com To: Tariq Toukan Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43096 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751167AbeDDNgm (ORCPT ); Wed, 4 Apr 2018 09:36:42 -0400 In-Reply-To: <72eccc60-21d2-0789-81c6-1bad2adb41ed@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 4 Apr 2018 16:12:14 +0300 Tariq Toukan wrote: > > @@ -432,9 +434,12 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c, > > > > rq->buff.map_dir = rq->xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE; > > rq->buff.headroom = mlx5e_get_rq_headroom(mdev, params); > > + pool_size = 1 << params->log_rq_mtu_frames; > > > > switch (rq->wq_type) { > > case MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ: > > + > > + pool_size = pool_size * MLX5_MPWRQ_PAGES_PER_WQE; > > For rq->wq_type != MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ, please use: > pool_size = 1 << params->log_rq_mtu_frames; > > For rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ, please use: > pool_size = MLX5_MPWRQ_PAGES_PER_WQ * mlx5e_mpwqe_get_log_rq_size(params); Okay, fixed. Ready for V10, when net-next opens again... -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer