netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Or Gerlitz <gerlitz.or@gmail.com>,
	netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Michael Chan <michael.chan@broadcom.com>,
	Sathya Perla <sathya.perla@broadcom.com>,
	David Miller <davem@davemloft.net>,
	simon.horman@netronome.com
Subject: Re: [RFC] switchdev: generate phys_port_name in the core
Date: Fri, 28 Jul 2017 07:58:15 +0200	[thread overview]
Message-ID: <20170728055815.GB1857@nanopsycho> (raw)
In-Reply-To: <20170728053507.GA1857@nanopsycho>

Fri, Jul 28, 2017 at 07:35:07AM CEST, jiri@resnulli.us wrote:
>Fri, Jul 28, 2017 at 04:31:22AM CEST, jakub.kicinski@netronome.com wrote:
>>On Thu, 27 Jul 2017 13:30:44 +0300, Or Gerlitz wrote:
>>> > want to add port splitting support, for example, reporting the name on
>>> > physical ports will become more of a necessity.  
>>> 
>>> > If we adopt Jiri's suggestion of returning structured data it will be
>>> > very easy to give user space type and indexes separately, but we should
>>> > probably still return the string for backwards compatibility.  
>>> 
>>> I am not still clear how the structured data would look like
>>
>>I decided to just quickly write the code, that should be easier to 
>>understand.  We can probably leave out the netlink part of the API
>>if there is no need for it right now, but that's what I ment by
>>returning the information in a more structured way.
>>
>>Tested-by: nobody :)
>>Suggested-by: Jiri (if I understood correctly)
>
>Yes, you did :) Couple of nits inlined.
>
>
>>---
>> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c |  8 ++-
>> drivers/net/ethernet/mellanox/mlxsw/switchx2.c   | 10 ++--
>> drivers/net/ethernet/netronome/nfp/nfp_port.c    | 26 ++++-----
>> drivers/net/ethernet/netronome/nfp/nfp_port.h    |  4 +-
>> include/linux/netdevice.h                        | 18 ++++++-
>> include/uapi/linux/if_link.h                     | 16 ++++++
>> net/core/dev.c                                   | 31 +++++++++--
>> net/core/rtnetlink.c                             | 69 ++++++++++++++++++++++++
>> 8 files changed, 153 insertions(+), 29 deletions(-)
>>
>>diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
>>index 45e60be9c277..7a71291b8ec3 100644
>>--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
>>+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
>>@@ -637,16 +637,14 @@ static int mlx5e_rep_close(struct net_device *dev)
>> }
>> 
>> static int mlx5e_rep_get_phys_port_name(struct net_device *dev,
>>-					char *buf, size_t len)
>>+					struct netdev_port_info *info)
>
>Either we rename ndo to something like ndo_get_port_info or you rename
>the struct to netdev_port_name_info. These 2 should be in sync

As this is strictly related to port name, I think it should be:
struct netdev_phys_port_name_info

And the rest named in-sync with this

  reply	other threads:[~2017-07-28  5:58 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 16:34 [PATCH net-next 00/10] bnxt_en: Updates for net-next Michael Chan
2017-07-24 16:34 ` [PATCH net-next 01/10] bnxt_en: Update firmware interface spec to 1.8.0 Michael Chan
2017-07-24 16:34 ` [PATCH net-next 02/10] bnxt_en: Retrieve the hardware bridge mode from the firmware Michael Chan
2017-07-24 16:34 ` [PATCH net-next 03/10] bnxt_en: Implement ndo_bridge_{get|set}link methods Michael Chan
2017-07-24 16:34 ` [PATCH net-next 04/10] bnxt_en: Add bnxt_get_num_stats() to centrally get the number of ethtool stats Michael Chan
2017-07-24 16:34 ` [PATCH net-next 05/10] bnxt_en: Allow the user to set ethtool stats-block-usecs to 0 Michael Chan
2017-07-24 16:34 ` [PATCH net-next 06/10] bnxt_en: Report firmware DCBX agent Michael Chan
2017-07-24 16:34 ` [PATCH net-next 07/10] bnxt_en: Set ETS min_bw parameter for older firmware Michael Chan
2017-07-24 16:34 ` [PATCH net-next 08/10] bnxt_en: add support to enable VF-representors Michael Chan
2017-07-25  2:28   ` kbuild test robot
2017-07-24 16:34 ` [PATCH net-next 09/10] bnxt_en: add vf-rep RX/TX and netdev implementation Michael Chan
2017-07-24 16:34 ` [PATCH net-next 10/10] bnxt_en: add support for port_attr_get and and get_phys_port_name Michael Chan
2017-07-25  2:44   ` kbuild test robot
2017-07-25  4:06     ` Jakub Kicinski
2017-07-25  4:21       ` David Miller
2017-07-25  4:45   ` Jakub Kicinski
2017-07-25  5:13     ` [RFC] switchdev: clarify ndo_get_phys_port_name() formats Jakub Kicinski
2017-07-25 15:22       ` Andy Gospodarek
2017-07-25 22:26         ` Jakub Kicinski
2017-07-26  1:48           ` Andy Gospodarek
2017-07-26  2:34             ` Jakub Kicinski
2017-07-26 17:54               ` Andy Gospodarek
2017-07-26  5:48       ` Jiri Pirko
2017-07-26  8:13         ` Jakub Kicinski
2017-07-26  9:23           ` Or Gerlitz
2017-07-26 20:11             ` Jakub Kicinski
2017-07-27 10:30               ` Or Gerlitz
2017-07-28  2:31                 ` [RFC] switchdev: generate phys_port_name in the core Jakub Kicinski
2017-07-28  2:37                   ` Jakub Kicinski
2017-07-28  5:35                   ` Jiri Pirko
2017-07-28  5:58                     ` Jiri Pirko [this message]
2017-07-28  7:28                       ` Jakub Kicinski
2017-07-28  7:27                     ` Jakub Kicinski
2017-07-28 14:13                   ` Andrew Lunn
2017-07-25  9:55     ` [PATCH net-next 10/10] bnxt_en: add support for port_attr_get and and get_phys_port_name Sathya Perla
2017-07-25 22:27       ` Jakub Kicinski
2017-07-26  9:13     ` Or Gerlitz
2017-07-25  0:32 ` [PATCH net-next 00/10] bnxt_en: Updates for net-next David Miller

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=20170728055815.GB1857@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=gerlitz.or@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=sathya.perla@broadcom.com \
    --cc=simon.horman@netronome.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).