Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp27421pxb; Tue, 2 Mar 2021 17:56:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7zdtra0WsM3dixl+ttFYFxX/tFHKAgl9qyXxeb6zCb0k1EzeWyDQJO5z8xJML7Yt20nKX X-Received: by 2002:a17:906:3552:: with SMTP id s18mr23799940eja.497.1614736565326; Tue, 02 Mar 2021 17:56:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614736565; cv=none; d=google.com; s=arc-20160816; b=lqPQBzIa/l0Y6Jm79aI9YmCIxqatnP9eAnOBQWVVkYkax0rEwTTwGAdhKF0Hibr7Z2 Gdx/utetJO76mJNy8OGNnRPY0+jaw+KPapUDPbd7Me+rkeK+77wcCXbigVbiaeeBPpXU yyb3YrpK1QNrHomasWw2YPnPGfzduNqu/W/oWqbd++EfLvni5Ow4E494c7tNflokEpMV voGgIr+b9v2mhDnTSZiIHouZwSXg0OXfML0OS6ukwf6F2/iCexPfg0kBglv9ecotWpH1 TGWO4/wCG1hZNZdxTd0obMdjNUuL7byOww84yfABmJjG/UOP+IgPI2Ha6HXQpFpo2eBM IdmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:mime-version:date:message-id :in-reply-to:subject:cc:to:from:user-agent:references; bh=5gphWubhgnY39oqs/H/cdG90CAjjo6DZUJCuo5ulKcw=; b=D0WT/lrlSaBSl1LaR/Vor+Vy/JG+QMuenBMI6l+sIMKr8hgRrX85/unHcKgE/v76JP Q553oMVX8nca787ISmkQDkHSsVgd17BzVnuB9AvNFsdTH1KHtIJUHAR+13sg31seJsUG LPrHxiEMwhkIu0KwqpaTETzGURDIAlHe/+7O/sljGuQV5OVxmTD4ArReodHznaUrbF+P nmJP5rSSeSWWmX2sejoEQRWPiJg2RHht5Y+e5V/JZzGLDLG9ywlVpYB0pwEKppBROx7g PLEGuw9jjmmzpNwqV/yrZJ3qNJWbVGHQ6M2wVG94QWL84CGTbLQZHBrZKQtYn/MwlR3Y CijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ikSRmb9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si13346445edt.102.2021.03.02.17.55.42; Tue, 02 Mar 2021 17:56:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ikSRmb9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234099AbhCAKA4 (ORCPT + 99 others); Mon, 1 Mar 2021 05:00:56 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:1745 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234210AbhCAJ7E (ORCPT ); Mon, 1 Mar 2021 04:59:04 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Mon, 01 Mar 2021 01:58:22 -0800 Received: from reg-r-vrt-018-180.nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 1 Mar 2021 09:58:18 +0000 References: <20210225125501.1792072-1-arnd@kernel.org> User-agent: mu4e 1.4.10; emacs 27.1 From: Vlad Buslov To: Arnd Bergmann , Saeed Mahameed CC: Leon Romanovsky , "David S. Miller" , Jakub Kicinski , Dmytro Linkin , Roi Dayan , Arnd Bergmann , Eli Britstein , Eli Cohen , , , Subject: Re: [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition In-Reply-To: <20210225125501.1792072-1-arnd@kernel.org> Message-ID: Date: Mon, 1 Mar 2021 11:57:30 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614592702; bh=5gphWubhgnY39oqs/H/cdG90CAjjo6DZUJCuo5ulKcw=; h=References:User-agent:From:To:CC:Subject:In-Reply-To:Message-ID: Date:MIME-Version:Content-Type:X-Originating-IP:X-ClientProxiedBy; b=ikSRmb9kBasfdP27ka5KWc6SaAXE2tRd8CYF4zIQto2Bt9M1/p7jadQt+qbLO2nM1 1QbAarK2Mqj1kZAh5t6jnwQcGrZ+cWUixalxFj3cZePSI7p7nZEun8IHva8i9ZLDLZ /uP/TTY23lk9a4AatQoXVWwjvN+d8AWHBR2wHSscWat2uNwtTtqxSENYtHL2jMvxsN P8EQGMnSJ511DFxHuMFR/DeozGC1kMYqAuodKX/bXHqGKV1Pm3pjOCnthlg8xb6E77 PM6pEPCQxGZr+jnuU5rm6S3EVRkmSwJO7dNAUBbIgqgQiZHBOdZzue+BtNAn9+6RzU cFFBE5ZzvlHSw== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 25 Feb 2021 at 14:54, Arnd Bergmann wrote: > From: Arnd Bergmann > > The alternative implementation of this function in a header file > is declared as a global symbol, and gets added to every .c file > that includes it, which leads to a link error: > > arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/en_rx.o: in function `mlx5e_tc_tun_update_header_ipv6': > en_rx.c:(.text+0x0): multiple definition of `mlx5e_tc_tun_update_header_ipv6'; drivers/net/ethernet/mellanox/mlx5/core/en_main.o:en_main.c:(.text+0x0): first defined here > > Mark it 'static inline' like the other functions here. > > Fixes: c7b9038d8af6 ("net/mlx5e: TC preparation refactoring for routing update event") > Signed-off-by: Arnd Bergmann > --- > drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > 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 67de2bf36861..89d5ca91566e 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h > @@ -76,10 +76,12 @@ int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, > static inline int > mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv, > struct net_device *mirred_dev, > - struct mlx5e_encap_entry *e) { return -EOPNOTSUPP; } > -int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, > - struct net_device *mirred_dev, > - struct mlx5e_encap_entry *e) > + struct mlx5e_encap_entry *e) > +{ return -EOPNOTSUPP; } > +static inline int > +mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, > + struct net_device *mirred_dev, > + struct mlx5e_encap_entry *e) > { return -EOPNOTSUPP; } > #endif > int mlx5e_tc_tun_route_lookup(struct mlx5e_priv *priv, Thanks Arnd! Reviewed-by: Vlad Buslov