All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Buslov <vladbu@nvidia.com>
To: Arnd Bergmann <arnd@kernel.org>, Saeed Mahameed <saeedm@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Dmytro Linkin <dlinkin@nvidia.com>, Roi Dayan <roid@nvidia.com>,
	Arnd Bergmann <arnd@arndb.de>, Eli Britstein <elibr@mellanox.com>,
	Eli Cohen <eli@mellanox.com>, <netdev@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition
Date: Mon, 1 Mar 2021 11:57:30 +0200	[thread overview]
Message-ID: <ygnho8g3gprp.fsf@nvidia.com> (raw)
In-Reply-To: <20210225125501.1792072-1-arnd@kernel.org>

On Thu 25 Feb 2021 at 14:54, Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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 <arnd@arndb.de>
> ---
>  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 <vladbu@nvidia.com>

  reply	other threads:[~2021-03-01  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 12:54 [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition Arnd Bergmann
2021-03-01  9:57 ` Vlad Buslov [this message]
2021-03-02  6:30   ` Saeed Mahameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ygnho8g3gprp.fsf@nvidia.com \
    --to=vladbu@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dlinkin@nvidia.com \
    --cc=eli@mellanox.com \
    --cc=elibr@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.