From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH] net/mlx5: fix adjust priority for drop queue Date: Tue, 24 Oct 2017 10:55:03 -0700 Message-ID: <20171024175502.GB20667@yongseok-MBP.local> References: <8c8fb4394ba85f5bda005119cbfc851a3b728fa6.1508844772.git.nelio.laranjeiro@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Adrien Mazarguil To: Nelio Laranjeiro Return-path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0062.outbound.protection.outlook.com [104.47.1.62]) by dpdk.org (Postfix) with ESMTP id E599D23A for ; Tue, 24 Oct 2017 19:55:17 +0200 (CEST) Content-Disposition: inline In-Reply-To: <8c8fb4394ba85f5bda005119cbfc851a3b728fa6.1508844772.git.nelio.laranjeiro@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 24, 2017 at 01:33:19PM +0200, Nelio Laranjeiro wrote: > Drop queue should also adjust their priority according the most specific > layer in the pattern they are matching to avoid dropping all the traffic. > > Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") > > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_flow.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 26cf593af..549ae6916 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1185,6 +1185,14 @@ priv_flow_convert(struct priv *priv, > parser->queue[HASH_RXQ_ETH].ibv_attr->priority = > attr->priority + > hash_rxq_init[parser->layer].flow_priority; > + } else if (parser->drop) { Isn't this condition redundant? And the following could be more consistent (and readable) with the similar code above. But I'd leave it as your choice. if (parser->drop) { ... } else if (parser->queues_n == 1) { ... } else { ... } > + /* > + * Drop queue priority needs to be adjusted to > + * their most specific layer priority. > + */ > + parser->drop_q.ibv_attr->priority = > + attr->priority + > + hash_rxq_init[parser->layer].flow_priority; > } > exit_free: > /* Only verification is expected, all resources should be released. */ > -- Thanks, Yongseok