From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 626782BCE for ; Wed, 13 Jul 2016 16:33:30 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id f126so31765729wma.1 for ; Wed, 13 Jul 2016 07:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=N/JFUToQGrxytHh0duywLDQJZ0DjyGLG3CdQ57s9wYg=; b=dkh0ppJHw1UV7XsQvrHNsIYLXJfpfvIbOEp9rscMYoKkwJiF05ixgekZ8iOffXMDLk SKi+jmtDFiCQaRunG206PW5tdaFKo+AaEed+EhnojgYP/THn1AXWec6pwpeZuvK2P1JZ Qzbf2oYq3yDxV3BEYV/STRhhVedvVSxEPRbXKKEgn3vTycW9EFvpE4Hxy3eDW6jvLcRo wv1BuDdrowvA4caCYIONQq+k0qqevoNsf7LzsCcfsC7r2liY30sJSEo8tbdd0eQ81LFU anB6rbWGWoW9Kg3xXa40ANmhsU+WGXFWVlnqIeUmbUUUSEUuorLZmIWBSi3MPR5w6U5L bnwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=N/JFUToQGrxytHh0duywLDQJZ0DjyGLG3CdQ57s9wYg=; b=HAQML6ACDsQ6g65s2+KEGMLiDL5AuxUS8NUzzalkzCSluOHOx2QdiA/PdGYI038Vlm X5AZbvhuC589if4LQ6xvut6z/M2ip7M4kX1AErN7TNwtCA9jXemZlleeRmHUkslSq1Lb +AX6CWJX/QkhP7P8oGl/rMBozaSuV17F1LRXkMyNO+nCefKyCq+2pf6gK8hgoXqLk3AA v4SxbNhv5E2zfP7p8oRTlgZtfPR4M5sHDSoIkw5n9ZVW4YZgI0sBasPzjgJn6cyCQXy+ tHHX2EyWPBotAHJWun7VRh3xdX6V0hMEqINMWcSgjrMMBQTQcGOZSGFHGLL9GoP9kVlf j/bA== X-Gm-Message-State: ALyK8tJkLYQP6ykOw3vU8SbzZOmOhRMpqsrdfk86iJV9ySiNCVL3XVLtRl7COzElo1B8a2xA X-Received: by 10.28.141.4 with SMTP id p4mr29447497wmd.46.1468420409929; Wed, 13 Jul 2016 07:33:29 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id g6sm1201693wjx.0.2016.07.13.07.33.28 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 13 Jul 2016 07:33:29 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Cc: Olga Shern Date: Wed, 13 Jul 2016 16:33:22 +0200 Message-Id: <1468420402-27477-1-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] net/mlx5: work around compilation issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 14:33:30 -0000 From: Olga Shern RHEL 7.1's GCC for POWER8 reports the following error in one rte_memcpy() macro call by mlx5: error: array subscript is above array bounds [-Werror=array-bounds] It appears to be a GCC bug which can be worked around by making parentheses more explicit. Signed-off-by: Olga Shern Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 615de94..fce3381 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -472,8 +472,8 @@ mlx5_wqe_write_inline_vlan(struct txq *txq, volatile union mlx5_wqe *wqe, (uint8_t *)addr, 12); rte_memcpy((uint8_t *)(uintptr_t)wqe->inl.eseg.inline_hdr_start + 12, &vlan, sizeof(vlan)); - rte_memcpy((uint8_t *)(uintptr_t)wqe->inl.eseg.inline_hdr_start + 16, - ((uint8_t *)addr + 12), 2); + rte_memcpy((uint8_t *)((uintptr_t)wqe->inl.eseg.inline_hdr_start + 16), + (uint8_t *)(addr + 12), 2); addr += MLX5_ETH_VLAN_INLINE_HEADER_SIZE - sizeof(vlan); length -= MLX5_ETH_VLAN_INLINE_HEADER_SIZE - sizeof(vlan); size = (sizeof(wqe->inl.ctrl.ctrl) + -- 2.1.4