All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <hangbin.liu@linux.dev>
Cc: sashiko-reviews@lists.linux.dev, bpf@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/6] tools: ynl: convert enum selector to string for sub-message parsing
Date: Mon, 5 Oct 2026 15:33:48 -0700	[thread overview]
Message-ID: <20261005153348.02d269e9@kernel.org> (raw)
In-Reply-To: <asCfefn6IADLNDtD@fedora>

On Sat, 3 Oct 2026 14:23:53 +0800 Hangbin Liu wrote:
> > [Severity: High]
> > Does returning 0 here abort the entire parsing loop?
> > 
> > If a generated YNL parser encounters an unrecognized sub-message enum
> > selector (for example, sent by a newer kernel), it looks like `return 0;`
> > executes directly inside the attribute loop of the parsing function.
> > 
> > This would silently abort processing the remainder of the Netlink message and
> > drop all trailing attributes without returning an error. Is it possible to
> > skip the attribute and continue parsing instead?  
> 
> OK, I will use continue then.

Ehm, probably do something like:

  return ynl_submsg_failed(yarg, self.name, "enum-lookup-failed")

? AFAICT if string lookup fails we'd error out.

  reply	other threads:[~2026-10-05 22:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  1:50 [PATCH net-next v3 0/6] netlink: add lwtunnel encap sub-message support to rt-route Hangbin Liu
2026-09-30  1:50 ` [PATCH net-next v3 1/6] net: lwtunnel: change encap fill order Hangbin Liu
2026-10-01 14:09   ` Ido Schimmel
2026-09-30  1:50 ` [PATCH net-next v3 2/6] tools: ynl: convert enum selector to string for sub-message parsing Hangbin Liu
2026-10-01  1:51   ` sashiko-bot
2026-10-03  6:23     ` Hangbin Liu
2026-10-05 22:33       ` Jakub Kicinski [this message]
2026-09-30  1:50 ` [PATCH net-next v3 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support Hangbin Liu
2026-09-30  1:50 ` [PATCH net-next v3 4/6] netlink: specs: rt-route: describe lwtunnel IP options Hangbin Liu
2026-09-30  1:50 ` [PATCH net-next v3 5/6] netlink: specs: rt-route: describe lwt BPF program options Hangbin Liu
2026-10-01  1:51   ` sashiko-bot
2026-10-03  6:09     ` Hangbin Liu
2026-09-30  1:50 ` [PATCH net-next v3 6/6] netlink: specs: rt-route: describe seg6-local attrs Hangbin Liu
2026-10-01  1:51   ` sashiko-bot
2026-10-03  6:17     ` Hangbin Liu

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=20261005153348.02d269e9@kernel.org \
    --to=kuba@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=hangbin.liu@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.