Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4324647pxb; Tue, 2 Mar 2021 12:06:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpQcXFGI53uNQ3mYD6XsI3VRuJ7Dpvre+GxlsYYSsLNPV4FgpgK8OFAX/uXkSEYDTUFoo0 X-Received: by 2002:a17:907:1b02:: with SMTP id mp2mr23015218ejc.419.1614715594185; Tue, 02 Mar 2021 12:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614715594; cv=none; d=google.com; s=arc-20160816; b=n243kSfE6RLDjucZ8I5drCoZqhalQNaiFEOil/sBp/7KPjv1DSKHGgKWj+rA4TjGhP SpJD+nsQ6rG+wtkIjo3c0BZw1RPKLNUkKcWZ46IDhaXqM3TY2g1GT9PZWQa0OcLorfXc GE9YczEFtqJyfLEb+QWKnJB7azwCo1+EH5PXTW0Mp73F5FZtBv3uPBpekRNI/Y9e84OS gVi2GSCRjl2AqtFt3XYPUa9Dv+K+QpBth24uYWOkt3QV9YVZ8gZY5532w9zrXwnaI0BV lmtomTiXyLGKdzxgMAYvl3yMWl2/mD/w3mqm1y8cOHWpXHFhLhJLGkOPARJIMb3G7ynB xI/w== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=jif5MZEfifFnKgkPH7KpsYB/Jos4LWYA98C+/KYgIfU=; b=EkEizn3Zmka03d5JFVa85K/CI9ke9XKZqPOduEuLsNwzqcEf/4GTjl5gmDdTSyCnf1 EdJKOZwRjzagJaBWFMRd/H49DYPZBqXi/JIojsNa3FLYgIstqzk9vTVVqajNhHAbS0LG EaiYdZ+IYDUZns2ghbIlNJ6j6l7LqqJeLFq2nbWxU6ZCbpna7EYtLgb9IBLdBmm5D7kU D3o8yy6MCCzXeEq2f+sN3NvB4MXk7TeT6RwPN+5ZiBnKi+IspGWHEFd3+XBfcoICDHOi UGhiQ0T+9DAPKiqDNQUN5J16L/T6mp4FfUaKOEe2BqOSOwS8QhNis1ra7lSTfnKsiAdh SkwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vknkfdwr; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e10si11576341ejk.173.2021.03.02.12.06.02; Tue, 02 Mar 2021 12:06:34 -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=@kernel.org header.s=k20201202 header.b=Vknkfdwr; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1836716AbhCBHUU (ORCPT + 99 others); Tue, 2 Mar 2021 02:20:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:44304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835969AbhCBGb0 (ORCPT ); Tue, 2 Mar 2021 01:31:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C76116186A; Tue, 2 Mar 2021 06:30:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614666645; bh=EPbOnkQQcY42gIMqCP33MRMRht0g1yyJCnfNd6DURw0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Vknkfdwry8Rf7wq+QHyVs59vzLyLPBJ3FNX9in5VQTfCb3VM/6nFmjzbdDSvWMTkh oYO94LgUveAu359jlk/l+Zr/jV8lnufS7eqHP34PR4DS+7YSvFFNlOHBXlgd/lxvxz 2kwCJNBLbhOWqVn6t0w6sMS3uh4YPGKDt4LKhrT4VJdsyePQ/mb3xj2PpU0taGvs0j +S9i4V11E1Tvz7lsG6gGrHcRUCAIREE3zpR9eLrlWR+FqjMldQMGe71Hgw5p7Qxu5t I8QLopPfyQBmzcP7sWtiZuNZQGi4K9/bMb+Bu3K1vzwK0MNzNpiySL+gQv7rv4tPnG wRaAowKyT6OCA== Message-ID: Subject: Re: [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition From: Saeed Mahameed To: Vlad Buslov , Arnd Bergmann Cc: Leon Romanovsky , "David S. Miller" , Jakub Kicinski , Dmytro Linkin , Roi Dayan , Arnd Bergmann , Eli Britstein , Eli Cohen , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 01 Mar 2021 22:30:43 -0800 In-Reply-To: References: <20210225125501.1792072-1-arnd@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-03-01 at 11:57 +0200, Vlad Buslov wrote: > 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 Applied to net-mlx5, Thanks.