From patchwork Tue Jul 21 12:00:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 74568 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 521DAA0526; Tue, 21 Jul 2020 14:00:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34EA21BFF9; Tue, 21 Jul 2020 14:00:12 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 7B8951BFE7 for ; Tue, 21 Jul 2020 14:00:10 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from matan@mellanox.com) with SMTP; 21 Jul 2020 15:00:08 +0300 Received: from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06LC07L7015168; Tue, 21 Jul 2020 15:00:07 +0300 From: Michael Baum To: dev@dpdk.org Cc: matan@mellanox.com, viacheslavo@mellanox.com, stable@dpdk.org Date: Tue, 21 Jul 2020 12:00:04 +0000 Message-Id: <1595332804-6860-1-git-send-email-michaelba@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix an ineffective calculation in hairpin splitter 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The flow_hairpin_split function defines a pointer called addr that points to the list of items. When the function wants to progress in the list, it adds the size of an item to the pointer. At the end of the function, it precedes the pointer one more time even though it is not used afterwards. In fact, this line is unaffected and the operation of the function would have been no different without it. Remove the line where the pointer is preceded unnecessarily. Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index aba8f41..cf7052b 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -3518,7 +3518,6 @@ struct mlx5_flow_tunnel_info { tag_item->data = UINT32_MAX; tag_item->id = UINT16_MAX; item->mask = tag_item; - addr += sizeof(struct mlx5_rte_flow_item_tag); item->last = NULL; item++; item->type = RTE_FLOW_ITEM_TYPE_END;