From patchwork Tue Feb 9 20:37:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 379810 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09C82C43333 for ; Tue, 9 Feb 2021 20:55:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE28564EB4 for ; Tue, 9 Feb 2021 20:54:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234147AbhBIUxz (ORCPT ); Tue, 9 Feb 2021 15:53:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:41064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233686AbhBIUj1 (ORCPT ); Tue, 9 Feb 2021 15:39:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 16512614A7; Tue, 9 Feb 2021 20:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612903086; bh=UCVCf7yUcekAeACjiviGcShpRA/ElW6S8Ut0FNZ9g+0=; h=From:To:Cc:Subject:Date:From; b=iqCG3ICItorPiwC1uoUrkOzVMrzvnF8ZhKXBjrGofak9qodkRCQPOK07MoOHwLWiT KCFUp3dR/2bSPcKc9nSTbo+54fsKxDNhOqGs906KOwt1318a/PtwQCOkPdIJ9ARMbm cuzxde4Yd2B6kymhTTJfC7o9UPidgMQV5u3C8NU/9wms3g9Ii8F5SbtWfRUZ3yZdRA C6Avnswzb81kRKWFyzNrxABparnTfn2HjEp9csip+T/PsiqDwwKBNCWhIw8CYZBTe8 Ad/o4UkfHNJj6yqilkPoSXmJbaf5EclIhp53w1g73g0IOOGX+8L7xma2BZa21XkC2L KluuItrVi+LTw== From: Saeed Mahameed To: Jakub Kicinski , "David S. Miller" Cc: netdev@vger.kernel.org, Vlad Buslov , Saeed Mahameed Subject: [PATCH net-next] net/mlx5e: Fix tc_tun.h to verify MLX5_ESWITCH config Date: Tue, 9 Feb 2021 12:37:22 -0800 Message-Id: <20210209203722.12387-1-saeed@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vlad Buslov Exclude contents of tc_tun.h header when CONFIG_MLX5_ESWITCH is disabled to prevent compile-time errors when compiling with such config. Signed-off-by: Vlad Buslov Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h index fa992e869044..67de2bf36861 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h @@ -11,6 +11,8 @@ #include "en.h" #include "en_rep.h" +#ifdef CONFIG_MLX5_ESWITCH + enum { MLX5E_TC_TUNNEL_TYPE_UNKNOWN, MLX5E_TC_TUNNEL_TYPE_VXLAN, @@ -99,4 +101,6 @@ int mlx5e_tc_tun_parse_udp_ports(struct mlx5e_priv *priv, void *headers_c, void *headers_v); +#endif /* CONFIG_MLX5_ESWITCH */ + #endif //__MLX5_EN_TC_TUNNEL_H__