From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id BE05F1B2F4 for ; Mon, 30 Oct 2017 08:41:48 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id r68so14333632wmr.3 for ; Mon, 30 Oct 2017 00:41:48 -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=0BejDRYZxY41VthpYYFF8eEo5LCKehGvLKKQFyNOnSw=; b=yfgNGjhmfqd0lK0BHNqwVo3bXYq/5V7DrVHBBHFU0A2OFk72C1jlKxYoElBOdD88EH Xl4RjVnymFdhmUQaFLTOw3mi4gRl7CAywmWs3xx1bC4JPfWU5DHVK8UeEX4vq38UkZm4 903cdGawt2Hh+NXarimstYj54lMzvH6UIa6YpJBrTQv3YF6sQnPRKzVtI+xlzx3ZwAjW vKowbUsep3NqrKCMUPK/cDJbMgQvMGREXrwhz5ZsjQeJiRmAFXhk/AuGp+BGDAM6m27U jJpmWzrddEoM/BoiaPuLbcB5CFcPSGr7JSw+2aJupjfKsNyX7kB3/qGbUjW25g90Nxtt logg== 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=0BejDRYZxY41VthpYYFF8eEo5LCKehGvLKKQFyNOnSw=; b=ZEJ1Riw/gF+gHIPu0VGLMNzXeM6rbpwuhUAZ4Y0XnY5yl/VxHnqiuwNSs1UqAG3aCy 7Sdu88T7JZWNYdS0nGyOUeK+1vbPstJoC9tx8xmOGO+r8+rffn5reXq+etzC312rRaM/ f24F1faqTx7HxuGiEBInGXJEtWMweD2MpyrWAhGegegLwmbZedN3XhxAsindeZBANLAA R2Ly/n2L9X6UJdO9mxXKCNxAPw6olFHYpnTmvWd+F79DBjv6qpLGnyZwj7C6/lcc3k8K 5RBijxv1fWt4Ap7ur0pcc9+lhlPX5u2o1xI4EPviVN/+hhcrAftogUfEZJs1ZSLZ35Sb UoUg== X-Gm-Message-State: AMCzsaWDJkWejS8Y0dJQgt9aFNQLxtqkZXAIyTBDeEBxBxeqsRVwdfn8 LQ6CUmdiquhR4NfFJaMu3/uk X-Google-Smtp-Source: ABhQp+Rd3grFRIneHI9eksA61DELE2bMQbqekICmu6RH8IYTZzOd4clzAw3Sgxzncg5GcDuw/UuQIg== X-Received: by 10.80.231.145 with SMTP id b17mr10698502edn.94.1509349308284; Mon, 30 Oct 2017 00:41:48 -0700 (PDT) Received: from laranjeiro-vm (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id o60sm9632934eda.48.2017.10.30.00.41.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Oct 2017 00:41:47 -0700 (PDT) Date: Mon, 30 Oct 2017 08:41:43 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Ori Kam Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, dev@dpdk.org Message-ID: <20171030074143.ietugmsvi7syaw7j@laranjeiro-vm> References: <1509348744-20476-1-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1509348744-20476-1-git-send-email-orika@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix add counter when dev not started 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, 30 Oct 2017 07:41:48 -0000 On Mon, Oct 30, 2017 at 09:32:24AM +0200, Ori Kam wrote: > When adding count action to a drop flow rule while the device was not > stated, the counter was not saved in the flow. > > Fixes: 9a761de8ea14 ("net/mlx5: flow counter support") > Cc: orika@mellanox.com > > Signed-off-by: Ori Kam > --- > drivers/net/mlx5/mlx5_flow.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index f392f1f..3999b84 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1690,13 +1690,13 @@ struct ibv_spec_header { > ++parser->drop_q.ibv_attr->num_of_specs; > parser->drop_q.offset += size; > flow->drxq.ibv_attr = parser->drop_q.ibv_attr; > + if (parser->count) > + flow->cs = parser->cs; > if (!priv->dev->data->dev_started) > return 0; > parser->drop_q.ibv_attr = NULL; > flow->drxq.ibv_flow = ibv_create_flow(priv->flow_drop_queue->qp, > flow->drxq.ibv_attr); > - if (parser->count) > - flow->cs = parser->cs; > if (!flow->drxq.ibv_flow) { > rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE, > NULL, "flow rule creation failure"); > -- > 1.7.1 Acked-by: Nelio Laranjeiro Thanks, -- Nélio Laranjeiro 6WIND