From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_MUTT 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 40B03C28CC5 for ; Sat, 8 Jun 2019 08:25:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B05B214AF for ; Sat, 8 Jun 2019 08:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559982314; bh=pXQPdZkf7hXpvwQ7BeXahKKhOjXxpopdmFWTdMIX8Yw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=oGLeo/8i32607iq74gs1nxzBonKpgOAvPgAVYnZbVwICNpuzNLwFwPZEJuY32Bewn LIBmxvlMaIop2ONo+PWFJjTQ1j/b1Q0cVKir3gSkfocMDStKRLOoggjGrfRTS+IYHD hPofoO6iyIENTfISJsAV2nFyiqkGUueOqUfaorfU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726164AbfFHIZN (ORCPT ); Sat, 8 Jun 2019 04:25:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:57066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbfFHIZM (ORCPT ); Sat, 8 Jun 2019 04:25:12 -0400 Received: from localhost (unknown [37.142.3.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E10E42146E; Sat, 8 Jun 2019 08:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559982312; bh=pXQPdZkf7hXpvwQ7BeXahKKhOjXxpopdmFWTdMIX8Yw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xWw110iSzBaMC6/JCUT7EejO+vI37Vjh85WA8864Rmr8PUyI7UU8P+BcTMEO+DxjK n2CdnVe/3iA20XBaXRND0QChKbWS1dv7PEX9VrQUYwa5VyH42pyhr5tpuZs4kMwcgg 2/mu5kBInqLvsCkz2IaHyy3NRruSPskzlqn9ETEk= Date: Sat, 8 Jun 2019 11:25:01 +0300 From: Leon Romanovsky To: Parav Pandit Cc: Doug Ledford , Jason Gunthorpe , RDMA mailing list , Maor Gottlieb , Mark Bloch , Saeed Mahameed , linux-netdev Subject: Re: [PATCH mlx5-next 1/3] net/mlx5: Expose eswitch encap mode Message-ID: <20190608082500.GQ5261@mtr-leonro.mtl.com> References: <20190606110609.11588-1-leon@kernel.org> <20190606110609.11588-2-leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jun 06, 2019 at 01:08:46PM +0000, Parav Pandit wrote: > > > > -----Original Message----- > > From: linux-rdma-owner@vger.kernel.org > owner@vger.kernel.org> On Behalf Of Leon Romanovsky > > Sent: Thursday, June 6, 2019 4:36 PM > > To: Doug Ledford ; Jason Gunthorpe > > > > Cc: Leon Romanovsky ; RDMA mailing list > rdma@vger.kernel.org>; Maor Gottlieb ; Mark Bloch > > ; Saeed Mahameed ; > > linux-netdev > > Subject: [PATCH mlx5-next 1/3] net/mlx5: Expose eswitch encap mode > > > > From: Maor Gottlieb > > > > Add API to get the current Eswitch encap mode. > > It will be used in downstream patches to check if flow table can be created > > with encap support or not. > > > > Signed-off-by: Maor Gottlieb > > Signed-off-by: Leon Romanovsky > > --- > > drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 10 ++++++++++ > > include/linux/mlx5/eswitch.h | 10 ++++++++++ > > 2 files changed, 20 insertions(+) > > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c > > b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c > > index 9ea0ccfe5ef5..1da7f9569ee8 100644 > > --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c > > @@ -2452,6 +2452,16 @@ u8 mlx5_eswitch_mode(struct mlx5_eswitch > > *esw) } EXPORT_SYMBOL_GPL(mlx5_eswitch_mode); > > > > +u16 mlx5_eswitch_get_encap_mode(struct mlx5_core_dev *dev) { > > Encap mode as well defined devlink definition. > So instead of u16, it should return enum devlink_eswitch_encap_mode. > > Since this is only reading the mode, it is better to define struct mlx5_core_dev* as const struct mlx5_core_dev *. Thanks Parav, I'll change and resend, anyway second patch uses wrong types too.