From patchwork Thu Dec 3 23:12:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 336964 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp699843ilb; Thu, 3 Dec 2020 15:15:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+5w1W43ZubhM7BMYEMEq+ZWWYLZm3PdgjN40/I5/xFQ154gj/rM/V382AXVzb8WuP2yk9 X-Received: by 2002:aa7:dd52:: with SMTP id o18mr4987865edw.177.1607037337642; Thu, 03 Dec 2020 15:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607037337; cv=none; d=google.com; s=arc-20160816; b=UQkCl0gNoX4UkFWj7oLidvxMA89h4yuBTAXshEqtRUBTcYoZxGlBoTFboM1pYxOgcK CFlq/wuQuHbg+D04tbTxF/XyiFvePc8I7fFc3lGsf+OILqNJXwbVOeyT7JP7okcujEIH XvKY98kHVgFExdMas+kWFNHxKsIg4k1DI6vxsUouohTou49ufbN4D5oc38j6qHOS8Vim QH3ZCBRsc2BHmfgam2jS5IMMAHC3XI0MgGH9eF5USIvhP3/YshRLRJdhj5Cix9OCio22 UwZofKSS+RaviKHtxBAa/vY+4+I+9vBzS+LXhbqLm74NVqwhpqXPRS+CjV7cPTPtMI0O D/FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=VuETBlt/HqxOiEPRJrkTE2bwfiEs9gzIivSoQx3GxpI=; b=Lav1te3CX4ULW/0qcfyX+jQEGMvDP5HW5oDBbJlGYTLXMh1NfemUSZefnNJELUDDkB +XhlBg5nIf6/zYMEULOVbYUJNqtojIT+3HVCsNCsaFmRPe6Eb5HqRaqcg8g5tGusVKGE xFP1Mz5M2eiMSHBVTVEkPwKxgYvpIe4atF1kKjQn+ELL7HrAAgTl4uTAz+2eTWp/94p2 JKxShDUgrHR1HBbtB2w8QSgUt6O21c3UH+fGpSfvsk2a9mJgX1HKDeLDOF6ekLp4wd+t TVXifhXhpjIx5qU4PZ0IxvTfJVvjJN7mCA/S2nnYrWXJ5rtQEwL72m5oGwPVp4zIH4/X Fh3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr1si270239ejb.742.2020.12.03.15.15.37; Thu, 03 Dec 2020 15:15:37 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387510AbgLCXOA (ORCPT + 8 others); Thu, 3 Dec 2020 18:14:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:36126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgLCXOA (ORCPT ); Thu, 3 Dec 2020 18:14:00 -0500 From: Arnd Bergmann Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Jakub Kicinski , Tariq Toukan , Maxim Mikityanskiy Cc: Arnd Bergmann , Boris Pismenny , Denis Efremov , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/mlx5e: fix non-IPV6 build Date: Fri, 4 Dec 2020 00:12:59 +0100 Message-Id: <20201203231314.1483198-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann When IPv6 is disabled, the flow steering code causes a build failure: drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: error: no member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'? &sk->sk_v6_daddr, 16); ^ include/net/sock.h:380:34: note: expanded from macro 'sk_v6_daddr' #define sk_v6_daddr __sk_common.skc_v6_daddr Hide the newly added function in an #ifdef that matches its callers and the struct member definition. Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c index 97f1594cee11..e51f60b55daa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c @@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(struct mlx5_flow_spec *spec, struct sock outer_headers.dst_ipv4_dst_ipv6.ipv4_layout.ipv4); } +#if IS_ENABLED(CONFIG_IPV6) static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk) { MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria, outer_headers.ip_protocol); @@ -63,6 +64,7 @@ static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6), 0xff, 16); } +#endif void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule) {