From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 1FCAD5682 for ; Tue, 3 Nov 2015 18:15:39 +0100 (CET) Received: by wmff134 with SMTP id f134so89993740wmf.1 for ; Tue, 03 Nov 2015 09:15:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind_com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=hszWGlLF3URsQI67tgRGOE7hmZhhiufqsl6UteTfj1s=; b=fZ0H9wRXAOd30gYBDYDh7RubiJfHQ0rPJcMm/AM36kb110zha7jzlktEWStCkqTNt0 mi8+MtcbEZb4mTu4mzSDmhtsGVjcBczyCskVJDp02MsuJJ5EkyVxqKFUsW10H700bD7E OD46Gj4Ge6egRxlPkO6Wpu3A788X0zVO+LcIt9Z4XhFCUM5uNPXPVUH9vaRfBqNEEbfl VtO04M2DoefnG7aJHOCGMLiPBuC+PCPLBTc/IHUGP16fbohYCmCZDydL0FTwkLumUBRq Pruke5BxWqaDwhsmYV2vafffMaGPKj0HQEjnma5sG2w6KM9xZqJxo28UgZSXpQ2JJT8S NSdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=hszWGlLF3URsQI67tgRGOE7hmZhhiufqsl6UteTfj1s=; b=kKkrbb5DqBV8F4Jf01EyiLltuJJnNVSyPbV2oJ2dQNqP/ydRX468Jz1ZfrqLcXUzpe o+BX8yN35iSTf04F0ftOId4YBdOSbn070QStHbnlLhMQCI+8c2xhsfwSWNdAUogKNp2D 9eaXdYgHvBPbUOOwqzEmo/D/y1iGLsIf5WY6ANDcUTdgaqN2LZzrUtx1BIhWeSAMFpJr 2xGetkyjre3SdKlNBYxJHEVPNJCX5GGQYpSyT0joY+JDfsOCkltHqGRsPY6wCapatWdW R9O3g/6Rb4QXQHVMpX16YnIedOKpMwfaDWSlXPpkE2ctmS4CgvWTyc6idmX5lkNGK+pf BOCQ== X-Gm-Message-State: ALoCoQmK8zM2ZLIoqfSTFwll4AFsnoVCiRUalmA02/gyptuVlwuKPH3YKIul2JJknw5kYX9hF2cp X-Received: by 10.28.143.21 with SMTP id r21mr19833484wmd.39.1446570939009; Tue, 03 Nov 2015 09:15:39 -0800 (PST) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id r9sm28538203wjz.35.2015.11.03.09.15.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Nov 2015 09:15:38 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Date: Tue, 3 Nov 2015 18:15:13 +0100 Message-Id: <1446570914-25996-1-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 Subject: [dpdk-dev] [PATCH 1/2] mlx5: fix compilation error with debugging enabled 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: Tue, 03 Nov 2015 17:15:39 -0000 The following error occurs when CONFIG_RTE_LIBRTE_MLX5_DEBUG=y: drivers/net/mlx5/mlx5.c:381:4: error: ISO C forbids braced-groups within expressions RTE_MIN() uses the non-standard ({ ... }) syntax to declare variables within parentheses, which is rejected by -pedantic. Since the RSS_INDIRECTION_TABLE_SIZE check is meant to go away as soon as DPDK supports larger/variable indirection tables, put it in a separate condition. Fixes: 634efbc2c8c0 ("mlx5: support RETA query and update") Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 5a95260..0cd7208 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -65,6 +65,7 @@ #include "mlx5_utils.h" #include "mlx5_rxtx.h" #include "mlx5_autoconf.h" +#include "mlx5_defs.h" /** * DPDK callback to close the device. @@ -377,9 +378,11 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) DEBUG("L2 tunnel checksum offloads are %ssupported", (priv->hw_csum_l2tun ? "" : "not ")); - priv->ind_table_max_size = - RTE_MIN((unsigned int)RSS_INDIRECTION_TABLE_SIZE, - exp_device_attr.rx_hash_caps.max_rwq_indirection_table_size); + priv->ind_table_max_size = exp_device_attr.rx_hash_caps.max_rwq_indirection_table_size; + /* Remove this check once DPDK supports larger/variable + * indirection tables. */ + if (priv->ind_table_max_size > (unsigned int)RSS_INDIRECTION_TABLE_SIZE) + priv->ind_table_max_size = RSS_INDIRECTION_TABLE_SIZE; DEBUG("maximum RX indirection table size is %u", priv->ind_table_max_size); -- 2.1.0