From patchwork Wed Nov 30 21:05:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9454953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70FBF6074E for ; Wed, 30 Nov 2016 21:10:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 630FE283E8 for ; Wed, 30 Nov 2016 21:10:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5758F2849E; Wed, 30 Nov 2016 21:10:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEEA6283E8 for ; Wed, 30 Nov 2016 21:10:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583AbcK3VHp (ORCPT ); Wed, 30 Nov 2016 16:07:45 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50417 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbcK3VGs (ORCPT ); Wed, 30 Nov 2016 16:06:48 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MSrrB-1cJeCd3rZl-00RtTc; Wed, 30 Nov 2016 22:05:55 +0100 From: Arnd Bergmann To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: Arnd Bergmann , "David S. Miller" , Kamal Heib , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net/mlx5e: skip loopback selftest with !CONFIG_INET Date: Wed, 30 Nov 2016 22:05:39 +0100 Message-Id: <20161130210552.1756085-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:3AB/7CQn2GEKuukzBqOQrYHCoummL1GTdPvoW8K9fsxx9EIiPe2 isQbU9QiFhKAYow21bXLwDqPIII5+dTuNUp+IFxy6XqStpI1HcNByd/uW5eCzKTmg4MO78v uv+BwK2HcpRxIDpDjtKFPD/dB9NvuHUJ5HyXgBstZGe831tid/2ge8cgjgYnvaSGrOKdr4T +N3Pz9zbVkCBQejZpa32A== X-UI-Out-Filterresults: notjunk:1; V01:K0:JUa8SG+AOh0=:0Muxq6pHrVcaSvAxOAo7rL 9ZdNSNFCuCN/0RTMoPwSeuW+vhVLEGESgmGzGFVTAYTlYoXdf0ItZ/l4S1NvK5rRpkOcJcYgn AJ/GldIt/Sa5i5L1CxVYV0svD6sAbiqSZ7oAliJ27Js9G32ByXxSQorygKLm174w7Pmu+BbUV dmXUpiDzNF9eCQIK7+qknSuUoKDr+UmZLjLdYciOXTV2/00ew7Glmpv/HZIRaQuhzLeUW/1ll NPWHUhTL8xaF25yxi6RxeAHQrbVeBCru0dqcr7btW0QMF2fPk2xM/B5i4G0B8mA4Q8MWXZNeo TDLJcFxSxHvusJ13E4N/1inSMlxM8QKlHJe2pqCJZMdqrvT7gL0saNf+Qgp8EfqgelgNJ7buX Ri+HUi3ig0MF0RutWVFPTHW+g5yx9n12qFAYlxoslT2bUSwzvZacZV1FDbad8Z/GG0dCnNvOU siQk71ykYT99fpYOO1xl3UyNTfnYc5ZwuJIbB3bU5QABIKj43ZmN5gnozG/m8MndbBCtDBeuS XAQkhwPfc7M12daeYzhhZ0gnBJaOT6BM9aD8gF7sfCD3IACL80q17NAZIDXxLLPTdcS/l+Tlx AtiqfrjM1Jvq219ahMfY8ToePd9MaRF73pUxwcnMhc9WLJhLMZnzwtTz5nmDKjID/L6ncd+ML /zkdzGkdT5jVGsFPJ+/byrEHJM41qpMlo1dH4u1bhD0fn9Dz6rsNs6RsCWdG3JDQeRQA= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_INET is disabled, the new selftest results in a link error: drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.o: In function `mlx5e_test_loopback': en_selftest.c:(.text.mlx5e_test_loopback+0x2ec): undefined reference to `ip_send_check' en_selftest.c:(.text.mlx5e_test_loopback+0x34c): undefined reference to `udp4_hwcsum' This hides the specific test in that configuration. Fixes: 0952da791c97 ("net/mlx5e: Add support for loopback selftest") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c index c32af7daf3ff..65442c36a6e1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c @@ -39,7 +39,9 @@ enum { MLX5E_ST_LINK_STATE, MLX5E_ST_LINK_SPEED, MLX5E_ST_HEALTH_INFO, +#ifdef CONFIG_INET MLX5E_ST_LOOPBACK, +#endif MLX5E_ST_NUM, }; @@ -47,7 +49,9 @@ const char mlx5e_self_tests[MLX5E_ST_NUM][ETH_GSTRING_LEN] = { "Link Test", "Speed Test", "Health Test", +#ifdef CONFIG_INET "Loopback Test", +#endif }; int mlx5e_self_test_num(struct mlx5e_priv *priv) @@ -93,6 +97,7 @@ static int mlx5e_test_link_speed(struct mlx5e_priv *priv) return 1; } +#ifdef CONFIG_INET /* loopback test */ #define MLX5E_TEST_PKT_SIZE (MLX5_MPWRQ_SMALL_PACKET_THRESHOLD - NET_IP_ALIGN) static const char mlx5e_test_text[ETH_GSTRING_LEN] = "MLX5E SELF TEST"; @@ -304,12 +309,15 @@ static int mlx5e_test_loopback(struct mlx5e_priv *priv) kfree(lbtp); return err; } +#endif static int (*mlx5e_st_func[MLX5E_ST_NUM])(struct mlx5e_priv *) = { mlx5e_test_link_state, mlx5e_test_link_speed, mlx5e_test_health_info, - mlx5e_test_loopback +#ifdef CONFIG_INET + mlx5e_test_loopback, +#endif }; void mlx5e_self_test(struct net_device *ndev, struct ethtool_test *etest,