From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id 2350B1B16C for ; Mon, 16 Apr 2018 09:13:40 +0200 (CEST) Received: by mail-wr0-f178.google.com with SMTP id l49so22825342wrl.4 for ; Mon, 16 Apr 2018 00:13:40 -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=1KNzPSDAvSVaN5BQl93UT4ImtQ3ynI1tuB1PiGfVGsY=; b=CVAxKKIhnYyO4Nb2NKCjQFAJgCspR4Qo9f9Bdswburw8kkPmiHdQfT51Blx9KM11kA nr/ZNds7YtXHLyPMu8PaH2gcET59km8xA6dMrHww3GCaDEB9nxBMkKfz2iHBkzJ13ZTm OKqrcsVWRgM0eNehLQZ+eva1zCW9rBOtdCekHV4BDeUjhytoQvFlGWiPsoo+UBSkHxPw x1DlHzuBxsg7dH4k1LW6tmMHeALPOlY9ONXi8MUhcjFdPjP5ft1Ve/dyz9buiSRgrS4S JAqgOXdwAIZCYU5dfIEgdYglhZ5dvRPuLmdKtcfmeyWWcFFDmndwbEV84TpJlC7iqbrJ 4xcQ== 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=1KNzPSDAvSVaN5BQl93UT4ImtQ3ynI1tuB1PiGfVGsY=; b=lMj6pMmZK6/uycFAgLNk/zZmfzDPY0A7Q2+AVwHm5BQq9m+mteaDWiX3Gv3pIFzjeR N1heev0Rm0aHjdYYxcHfb/oz1dyH5X8dtMwLR01rRRLG48DRFJKvp6rMUi9Gds58GuKf zhynnLilnIwir71eCqXngH7jh+9l38+3tpx54wfZGb+O3RbzvEd4SIjKGAcHZAk+JxTd AiTKdRwCBVrAGlHG2ELpnrjRbgfH/dKruh79qA5fXKV4ig7fQbG/83CSAmcS470FQxLu PPA9lTIQl9MH4GJlQ5Nlmw0OvALXE+gTJYgJmn8MowAwo7q7SALLOtoF0OAq0C7cRB85 SkNA== X-Gm-Message-State: ALQs6tBB3dBhx2X/BAnZVuoC9KBfDQuzpYQ72/0u4BEU9XfNFEoG+2mP H1aGpcXee91cJtmqQKo2d5Jv5EonRw== X-Google-Smtp-Source: AIpwx49c57Yb1mQI7dFrYDWeBRj2wLiyR1rX7+xyibTcn4I50BCtOgX34SNEH7+kjmWfxh4+XFF4vw== X-Received: by 10.223.129.194 with SMTP id 60mr2871693wra.13.1523862819776; Mon, 16 Apr 2018 00:13:39 -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 v35sm7523021wrc.18.2018.04.16.00.13.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Apr 2018 00:13:39 -0700 (PDT) Date: Mon, 16 Apr 2018 09:14:09 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: "Xueming(Steven) Li" Cc: Shahaf Shuler , "dev@dpdk.org" Message-ID: <20180416071409.oee2ttblbrg46yc6@laranjeiro-vm.dev.6wind.com> References: <20180410133415.189905-1-xuemingl@mellanox.com> <20180410133415.189905-8-xuemingl@mellanox.com> <20180411085529.ecxuku77hg3mkybl@laranjeiro-vm.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2 07/15] net/mlx5: support tunnel RSS level 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: Mon, 16 Apr 2018 07:13:40 -0000 On Sat, Apr 14, 2018 at 12:25:12PM +0000, Xueming(Steven) Li wrote: >[...] > > > @@ -1211,23 +1322,23 @@ mlx5_flow_convert(struct rte_eth_dev *dev, > > > if (ret) > > > goto exit_free; > > > } > > > - if (parser->mark) > > > - mlx5_flow_create_flag_mark(parser, parser->mark_id); > > > - if (parser->count && parser->create) { > > > - mlx5_flow_create_count(dev, parser); > > > - if (!parser->cs) > > > - goto exit_count_error; > > > - } > > > /* > > > * Last step. Complete missing specification to reach the RSS > > > * configuration. > > > */ > > > if (!parser->drop) > > > - ret = mlx5_flow_convert_rss(parser); > > > + ret = mlx5_flow_convert_rss(dev, parser); > > > if (ret) > > > goto exit_free; > > > mlx5_flow_convert_finalise(parser); > > > mlx5_flow_update_priority(dev, parser, attr); > > > + if (parser->mark) > > > + mlx5_flow_create_flag_mark(parser, parser->mark_id); > > > + if (parser->count && parser->create) { > > > + mlx5_flow_create_count(dev, parser); > > > + if (!parser->cs) > > > + goto exit_count_error; > > > + } > > > > Why do you need to move this code? > > To avoid counter resource missing if anything wrong in function > mlx5_flow_convert_rss(). Why this modification is addressed in this patch, why should it it be in the patch introducing the mlx5_flow_convert_rss()? >[...] > > > @@ -1386,6 +1386,8 @@ mlx5_ind_table_ibv_verify(struct rte_eth_dev *dev) > > > * Number of queues. > > > * @param tunnel > > > * Tunnel type. > > > + * @param rss_level > > > + * RSS hash on tunnel level. > > > * > > > * @return > > > * The Verbs object initialised, NULL otherwise and rte_errno is set. > > > @@ -1394,13 +1396,17 @@ struct mlx5_hrxq * mlx5_hrxq_new(struct > > > rte_eth_dev *dev, > > > const uint8_t *rss_key, uint32_t rss_key_len, > > > uint64_t hash_fields, > > > - const uint16_t *queues, uint32_t queues_n, uint32_t tunnel) > > > + const uint16_t *queues, uint32_t queues_n, > > > + uint32_t tunnel, uint32_t rss_level) > > > > tunnel and rss_level seems to be redundant here. > > > > rss_level > 1 is equivalent to tunnel, there is no need to have both. > > There is a case of tunnel and outer rss(1). Why cannot it be handled by a regular Hash Rx queue, i.e. what is the benefit of creating a tunnel hash Rx queue to make the same job as a legacy one? See below, > > > { > > > struct priv *priv = dev->data->dev_private; > > > struct mlx5_hrxq *hrxq; > > > struct mlx5_ind_table_ibv *ind_tbl; > > > struct ibv_qp *qp; > > > int err; > > > +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT > > > + struct mlx5dv_qp_init_attr qp_init_attr = {0}; #endif > > > > > > queues_n = hash_fields ? queues_n : 1; > > > ind_tbl = mlx5_ind_table_ibv_get(dev, queues, queues_n); @@ -1410,6 > > > +1416,33 @@ mlx5_hrxq_new(struct rte_eth_dev *dev, > > > rte_errno = ENOMEM; > > > return NULL; > > > } > > > +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT > > > + if (tunnel) { Why not: if (rss_level > 1) ? > > > + qp_init_attr.comp_mask = > > > + MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS; > > > + qp_init_attr.create_flags = MLX5DV_QP_CREATE_TUNNEL_OFFLOADS; > > > + } > > > + qp = mlx5_glue->dv_create_qp( > > > + priv->ctx, > > > + &(struct ibv_qp_init_attr_ex){ > > > + .qp_type = IBV_QPT_RAW_PACKET, > > > + .comp_mask = > > > + IBV_QP_INIT_ATTR_PD | > > > + IBV_QP_INIT_ATTR_IND_TABLE | > > > + IBV_QP_INIT_ATTR_RX_HASH, > > > + .rx_hash_conf = (struct ibv_rx_hash_conf){ > > > + .rx_hash_function = IBV_RX_HASH_FUNC_TOEPLITZ, > > > + .rx_hash_key_len = rss_key_len, > > > + .rx_hash_key = (void *)(uintptr_t)rss_key, > > > + .rx_hash_fields_mask = hash_fields | > > > + (tunnel && rss_level ? > > > + (uint32_t)IBV_RX_HASH_INNER : 0), >[...] .rx_hash_fields_mask = hash_fields | (rss_level > 1) ? (uint32_t)IBV_RX_HASH_INNER : 0), Thanks, -- Nélio Laranjeiro 6WIND