From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50048.outbound.protection.outlook.com [40.107.5.48]) by dpdk.org (Postfix) with ESMTP id E7E141B31E for ; Mon, 30 Oct 2017 08:32:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hLXkt8EuEijjn6c/mlsKJnHMaYGKNmCZpXmoLXOqD9s=; b=OxBPRPgr25MzYBovHuvlrUdpq+JKZg9yJMPGtrJEaBcS4Mk/iUcAKW7zlxwx5Rzs4XZ7EWSemnW5RAamdTN/hz7eNHq9Tb+zS8ckc9lXT7H0GLUj2lUfjkhKDlSaVaIKYKVxyK9YAbBhlE6BDVtfukj4gERcMs8nISDAwG98r/w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; Received: from localhost.localdomain (82.166.227.17) by AM4PR05MB3202.eurprd05.prod.outlook.com (2603:10a6:205:3::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Mon, 30 Oct 2017 07:32:45 +0000 From: Ori Kam To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, yskoh@mellanox.com Cc: dev@dpdk.org, orika@mellanox.com Date: Mon, 30 Oct 2017 09:32:24 +0200 Message-Id: <1509348744-20476-1-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: HE1PR0402CA0048.eurprd04.prod.outlook.com (2603:10a6:7:7c::37) To AM4PR05MB3202.eurprd05.prod.outlook.com (2603:10a6:205:3::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c13f35c1-d1a8-40fb-40a8-08d51f686a41 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(48565401081)(2017052603199); SRVR:AM4PR05MB3202; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3202; 3:BQ3ylHkDa+ktkpGgmK531IDwzvNkiezowmeHH18AknXhRDyE0iw0eSre8F9euNBzVb8BPd6j5NqXYlv4ThzV21E+mwnIDNblOi7cjtbhKvTaxt9f8R4QLPzBEWnINjK9zahIfvdptsTXdycRIBLNkzPQb5BfFpce79SwMePGyoYYh0Dd3dFmlA51ZKpX7uiYHCdQ1tpTjvJqGwap5E0LAyODYKrONuEI+iWNSh/Zk7XegBeR7OwFLZWdjugdE+Wc; 25:LoUOGXi8NaKp9TtlFs0v9vS2G3u24w/jMkYBQ+Mi62d0VfDuV/qOrg0ilPnnxzXXQZCScXiU2Jp2nRN7ZDNS7gr7UFpL3wVuW3U2hen5eBcYKBJVqDccACrfbOMXaPbBoFhErrCQEwifToOCISqzX876PhxzkpD+OpLySWY2ykCFweWr/2w1FBqHWkl4D6UGZQDMngroKFaao7BYeviVaSjG7p9AyoEy+jD7IvhOtlN8LsFfMfZfijGhEYbxb3ZW57yJOtouXBzUg5CA5uskCvj7Sb+QXo3Q4IlofVwm/fCLhnxXXkkp+So9O79MefE9DJ9vjskQFcG4t3ksVvs/oA==; 31:MW7rXHnci5cIjydJVT4f4eKYIzPjRcNZj1OM4cRz+7IiQz+uvT8dtsb+Qdt3AnUNrlKBJnlLf4MiJyu05bs0SgfKkdVHk0ogwR8kSimRjGClFlhu1f5I47Le65Jk6gD/DvBrI7nmSl1bGsIcKLG2R9BB7nIY9MDyVh9oPf2xHIoJmX+/TCVWDdJ0+/FKDhw8+ES3rjTAKoLnz1/dtdNsTK/K10hE0f0X6WFLVi4QhNo= X-MS-TrafficTypeDiagnostic: AM4PR05MB3202: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3202; 20:gO5938l626eOjrrFzbkzlFeKFi8iqdR/+Sbi6mWY5NIHSbCPvdVb30daYAPFDzCZhmZiTwiRREJEGcyGfZqBkl05HSqznj+rETRFiGY2JABNmp5/HQ6TmsG62AdujNdyXwIpuSVV1TiecK8xJknrQw+wWjJnFcaXlrUH9YAdvjXLMGX/pqh9l9wZ6csNvlTJ+ZJKFtGbleOcCpBfrdg9Wf/Y0S6IHGGnRe03n8YCXsu6ESAc9GhIUgHI8PPmxohSWcgNhu/ibxrk/sSraAQc52K5HxF/k20VwTjk8LD07/9KqJCIRUrhBdworhWsNoBQ0/QyVg9fwjYPtIUs5qVNNv7+wwz9RL19GfZPZJgJ2u+XdFQpg9ph0ivK7WYM0tfG324Ph7YVzW1VfFbqJGvJ61bpX/pWB4NS+UUmauB9ZSFu7el53RdDA6ntcce/E/BkaqGzsMFWYbHxaPJhFQBOljRSE3ZNLC8UxmQVxZQb/j+u61beeHKlLhlRs4IPglof; 4:o9PjeLklyWa3qgDgY8vKvHqhwAGp/sPeZzlgJOFnG8jVgFOvH/9J+n/YDvBn9rOyMnr36m5fMhdaRJKQyLiuMQsSNsbSKS/4yL+5I6H+tN2b7hJi4JxzXzzxGXn22gxSJdkafCzupTaDOUWOpTeC4gLvCDifR9CXbfmkeDZJHyv+3X20X5bLPdHJH2GEp/smtV1j/S/qUxCCoA0Rhf83qlCIqa+azls/3cacmZjdyw59zxUi1utVhxXvRedps9qMvdJzDGPwRi9xW7I3UZ50yg== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3231020)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM4PR05MB3202; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM4PR05MB3202; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(39860400002)(376002)(346002)(199003)(189002)(50466002)(2906002)(5660300001)(97736004)(48376002)(16586007)(478600001)(6506006)(6486002)(107886003)(6636002)(6666003)(5003940100001)(36756003)(4326008)(86362001)(25786009)(50226002)(105586002)(68736007)(305945005)(33646002)(8936002)(81156014)(81166006)(8676002)(106356001)(3846002)(6116002)(7736002)(6512007)(53936002)(47776003)(66066001)(316002)(50986999)(16526018)(101416001)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3202; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR05MB3202; 23:X3BIW70/Fa80D8t0F8jApxQaA63TuuTAZJZw0S5eW?= =?us-ascii?Q?cvDRBt1xKbNUZ7vp2LX+7l+7s28A5NkdwuQNvCTeBxVisbVvb788ezwkc0Tu?= =?us-ascii?Q?MH8uEeq8scgNDYKE+/v5gVxKIx5KtSCg5tZduEDnZqZAXitap+9EHXson7/L?= =?us-ascii?Q?KMwpXbkeDiwOax2+1M4gR0vES0f41sWS7iOl+HK6lj4wpWEgk70P37+2GYfE?= =?us-ascii?Q?bTa2De3fbcXEeraytXLcsPr/bYge0JZH5w6gykJScgD+9CohU9K1fH468RqI?= =?us-ascii?Q?0/tfTHdU8fGs4ONDGPFbjJXWEI1lJJqPB468b3DazKAGNi2G7N1CstSwkUKw?= =?us-ascii?Q?rF8ESZWX6HfB7rm47Mrcl7PPO5ql8xtQuvabGuaoRH8O6AGFdWaaClY84/Uz?= =?us-ascii?Q?Ioyr6Z5LoQrL30qefFvaCJQ8lU94OFHhuxGnUAls7+WoontKvenVL/VMrHkS?= =?us-ascii?Q?c3oBHzgA2A/l/28GsmF9OFHbpaZgvOL9CwqKcnMqlgyZQGxGMlgpgDsIQlia?= =?us-ascii?Q?69UrVyH2QyXgRQduYiVD6ASEQli0h5h+oglzycqISxlJuko67FyBTUUgETNJ?= =?us-ascii?Q?Ro7FF4lHQa6Sw4UkN0iX/MkaXaf2UsvKhpb71XOfOvy55WqcJSxgNEHc3mil?= =?us-ascii?Q?S/QOlrKRfpL/fXUGeDBHH0w23Xxs+l03lQSDq0eK6huOU0pAf/s4t1I71xKt?= =?us-ascii?Q?/6Q/P9tNFb3d+ZwUoJNU/DZtl76zSjB6o+ZlipYaF0ru8Ta8eGoTHABz4yLE?= =?us-ascii?Q?t+Fy6jaa9WmAUdP3XGs5fFEkLBTjyecumtFQQzv4551+qB327culSKH7zZRh?= =?us-ascii?Q?w7RS2ee175/07Dcjv1kYrSacIJvJYxfjzN6fMyacK+H+vdXepc3P/uJexJWL?= =?us-ascii?Q?FeyIVhUBlLGVeulNRgh5fJgI5jMo9thCveNgIq+uUXzqBQu6fkh8l+Iky2/1?= =?us-ascii?Q?s8Ay8xXtFic6wipRKyff1+Gyad65ItZtngq2u+cEuMsp34Dj+na/U1KNmAPl?= =?us-ascii?Q?ZmhsltG0P2tWXOQsKyIVA2glEnSzoRUTWpL9HDWbx3STOaZPoQB+dyOpatZ/?= =?us-ascii?Q?2x8e26l70ikUj7sa5hcDFDz63aj?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3202; 6:3XD3mlqCi2mFxNn/9xYR1za5xWKKlYnEj96t6GCvW9Ij+i3YO/gXoMzMu+l3nx8aIkT7le/LrztVsgrCQcqw2A38t/HEy4nBx9V3ibZqY23qwSO8S/1bezxe6Ywpb89zIrlt0yHTS/AouQboQp0dTneuzYRGeosb58pCjiOTUF+PTBvtHqg0yqFHE6cZlPEwbhbyfBCUvrK1K2UtEC4HAhYTMp1HgUjpdpXeuahzqWQKURnnFrU013nu9gHl4d8atwYxdKF574qJEMTWGta49WrCjC3Tyc8XMIa4lU7LOzVEX6gNFjSasrMwQcZcaccfqun0HuBWVc8FdeaLH15v5XchDk5SPVAMHHXXqz9Ci4I=; 5:uNUwaYSPsYGBGJUi2NNGaZmDXL5zRb0nRUt10QQp+F9xy7qbPr4JacPUprrXrEQRndW+3VsT0EDOzog6x2PmD6dsHx3328AkLtT/+YW+L4I0cSzsbi2cKecgzoOm5VvwkPp1xprO+9kAonlLcbh2yRyW2+wNhhBCOKU/EsX0i2w=; 24:s/pkZGYXCr8U9jndVIw7MRMbI5j/Uq6RwhKGLcrkQ4i7jyz2lUfWzRqnetkM5FnylGrCiZmd9HKf+uYZybwHseDHLT8SZUlG3KfC1HYi2vg=; 7:kEQYqz6FYUCCwhIdW4eYBGTDzLmszXeGbf/6AaDdZqVILPtFZFSO7FiBSD0kxMzoWi9C0e9HSyQniVthaNBxHbMq4GYP6BS/D8dV+ZYm2F0pDPR4L8B+Q6CT+PSGOJOnXRTyZ1VBK4+gwcFQxgQs90TA61uaSNG0Vn9n17jd4LAcEo1izvCYTgOsiBJ39+5eob2VhKVje+w5+h8Ikj5tMyq/LC3422nWVa9J8CbztHt+kSNgNuHUETZX6Q+rUdK2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2017 07:32:45.2983 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c13f35c1-d1a8-40fb-40a8-08d51f686a41 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3202 Subject: [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:32:48 -0000 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