netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Parav Pandit <parav@nvidia.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"horms@kernel.org" <horms@kernel.org>,
	Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net-next] devlink: Notify eswitch mode changes to devlink monitor
Date: Tue, 18 Nov 2025 12:15:52 -0800	[thread overview]
Message-ID: <20251118121552.7e1bae0c@kernel.org> (raw)
In-Reply-To: <CY8PR12MB719576A592BCF41591F83C23DCD6A@CY8PR12MB7195.namprd12.prod.outlook.com>

On Tue, 18 Nov 2025 05:25:23 +0000 Parav Pandit wrote:
> > From: Jakub Kicinski <kuba@kernel.org>
> > Sent: 18 November 2025 09:11 AM
> > 
> > On Sat, 15 Nov 2025 04:51:25 +0200 Parav Pandit wrote:  
> > > +	err = devlink_nl_eswitch_fill(msg, devlink,  
> > DEVLINK_CMD_ESWITCH_SET,
> > 
> > I've never seen action command ID being used for a notification.
> > Either use an existing type which has the same message format, or if no
> > message which naturally fits exists allocate a new ID.  
> 
> I am not sure fully.
> 1. devlink_notify() uses DEVLINK_CMD_NEW.
> 
> 2. devlink_port_notify() uses DEVLINK_CMD_PORT_NEW which is the input
> cmd on port creation supplied by the user space.
> 
> 3. devlink_params_notify_register() uses DEVLINK_CMD_PARAM_NEW.
> 
> Do you mean #1 and #3 are not user-initiated commands, hence such an
> action command ID is ok vs #2 is not ok? I probably misunderstanding
> your comment.

Let me put it more simply at some cost to accuracy..
The notification types and command ids usually match the response
to a GET command. Please TAL at the messages which are generated 
in response to a GET for the objects you listed...

Netlink command IDs are not required to match in a request-response
pair. In "modern" families we recommend that they do match, not because
the old model was wrong, but because a casual contributors usually got
it wrong.

  reply	other threads:[~2025-11-18 20:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15  2:51 [PATCH net-next] devlink: Notify eswitch mode changes to devlink monitor Parav Pandit
2025-11-18  3:41 ` Jakub Kicinski
2025-11-18  5:25   ` Parav Pandit
2025-11-18 20:15     ` Jakub Kicinski [this message]
2025-11-19 13:49       ` Parav Pandit

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=20251118121552.7e1bae0c@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parav@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 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).