All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net,
	edumazet@google.com, leon@kernel.org, saeedm@nvidia.com,
	moshe@nvidia.com, jesse.brandeburg@intel.com,
	anthony.l.nguyen@intel.com, tariqt@nvidia.com, idosch@nvidia.com,
	petrm@nvidia.com, simon.horman@corigine.com,
	ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com,
	michal.wilczynski@intel.com, jacob.e.keller@intel.com
Subject: Re: [patch net-next v2 14/15] devlink: move port_del() to devlink_port_ops
Date: Sun, 28 May 2023 23:33:34 -0700	[thread overview]
Message-ID: <20230528233334.77dc191d@kernel.org> (raw)
In-Reply-To: <ZHG0dSuA7s0ggN0o@nanopsycho>

On Sat, 27 May 2023 09:42:45 +0200 Jiri Pirko wrote:
> >I didn't think this thru last time, I thought port_new will move 
> >in another patch, but that's impossible (obviously?).
> >
> >Isn't it kinda weird that the new callback is in one place and del
> >callback is in another? Asymmetric ?  
> 
> Yeah, I don't know how to do it differently. port_new() has to be
> devlink op, as it operates not on the port but on the device. However,
> port_del() operates on device. I was thinking about changing the name of
> port_del() to port_destructor() or something like that which would make
> the symmetricity issue bit less visible. IDK, up to you. One way or
> another, I think this could be easily done as a follow-up (I have 15
> patches now already anyway).

One could argue logically removing a port is also an operation of 
the parent (i.e. the devlink instance). The fact that the port gets
destroyed in the process is secondary. Ergo maybe we should skip 
this patch?

  reply	other threads:[~2023-05-29  6:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 10:28 [patch net-next v2 00/15] devlink: move port ops into separate structure Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 01/15] devlink: introduce port ops placeholder Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 02/15] ice: register devlink port for PF with ops Jiri Pirko
2023-05-26 10:52   ` Wilczynski, Michal
2023-05-26 11:35     ` Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 03/15] mlxsw_core: register devlink port " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 04/15] nfp: devlink: " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 06/15] mlx4: register devlink port with ops Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 07/15] devlink: move port_type_set() op into devlink_port_ops Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 08/15] sfc: register devlink port with ops Jiri Pirko
2023-05-30  8:02   ` Martin Habets
2023-05-26 10:28 ` [patch net-next v2 09/15] mlx5: register devlink ports " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 10/15] devlink: move port_fn_hw_addr_get/set() to devlink_port_ops Jiri Pirko
2023-05-30  8:03   ` Martin Habets
2023-05-26 10:28 ` [patch net-next v2 11/15] devlink: move port_fn_roce_get/set() " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 12/15] devlink: move port_fn_migratable_get/set() " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 13/15] devlink: move port_fn_state_get/set() " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 14/15] devlink: move port_del() " Jiri Pirko
2023-05-27  4:10   ` Jakub Kicinski
2023-05-27  7:42     ` Jiri Pirko
2023-05-29  6:33       ` Jakub Kicinski [this message]
2023-05-29  8:31         ` Jiri Pirko
2023-05-30  1:41           ` Jakub Kicinski
2023-05-30  6:33             ` Jiri Pirko
2023-05-30  6:58             ` Jiri Pirko
2023-05-30 17:34               ` Jakub Kicinski
2023-05-31  6:33                 ` Jiri Pirko
2023-06-01 22:16                   ` Jacob Keller
2023-05-26 10:28 ` [patch net-next v2 15/15] devlink: save devlink_port_ops into a variable in devlink_port_function_validate() Jiri Pirko
2023-05-30 18:00 ` [patch net-next v2 00/15] devlink: move port ops into separate structure patchwork-bot+netdevbpf

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=20230528233334.77dc191d@kernel.org \
    --to=kuba@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jiri@resnulli.us \
    --cc=leon@kernel.org \
    --cc=michal.wilczynski@intel.com \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=simon.horman@corigine.com \
    --cc=tariqt@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.