netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Zahari Doychev <zahari.doychev@linux.com>
Cc: donald.hunter@gmail.com, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
	jacob.e.keller@intel.com, ast@fiberby.net, matttbe@kernel.org,
	netdev@vger.kernel.org, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, jiri@resnulli.us,
	johannes@sipsolutions.net
Subject: Re: [PATCH v2 3/3] tools: ynl: ignore index 0 for indexed-arrays
Date: Mon, 10 Nov 2025 17:20:16 -0800	[thread overview]
Message-ID: <20251110172016.3b58437d@kernel.org> (raw)
In-Reply-To: <20251106151529.453026-4-zahari.doychev@linux.com>

On Thu,  6 Nov 2025 16:15:29 +0100 Zahari Doychev wrote:
> Linux tc actions expect the action order to start from index one.
> To accommodate this, update the code generation so array indexing
> begins at 1 for tc actions.
> 
> This results in the following change:
> 
>         array = ynl_attr_nest_start(nlh, TCA_FLOWER_ACT);
>         for (i = 0; i < obj->_count.act; i++)
> -               tc_act_attrs_put(nlh, i, &obj->act[i]);
> +               tc_act_attrs_put(nlh, i + 1, &obj->act[i]);
>         ynl_attr_nest_end(nlh, array);
> 
> This change does not impact other indexed array attributes at
> the moment, as analyzed in [1].

YNL does not aim to provide perfect interfaces with weird old families.

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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 15:15 [PATCH v2 0/3] ynl: Fix tc filters with actions Zahari Doychev
2025-11-06 15:15 ` [PATCH v2 1/3] ynl: samples: add tc filter example Zahari Doychev
2025-11-11  1:17   ` Jakub Kicinski
2025-11-11 19:09     ` Zahari Doychev
2025-11-11 23:54       ` Jakub Kicinski
2025-11-06 15:15 ` [PATCH v2 2/3] tools: ynl: call nested attribute free function for indexed arrays Zahari Doychev
2025-11-06 15:15 ` [PATCH v2 3/3] tools: ynl: ignore index 0 for indexed-arrays Zahari Doychev
2025-11-11  1:20   ` Jakub Kicinski [this message]
2025-11-11 19:34     ` Zahari Doychev
2025-11-11 23:49       ` Jakub Kicinski
2025-11-11  1:30 ` [PATCH v2 0/3] ynl: Fix tc filters with actions 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=20251110172016.3b58437d@kernel.org \
    --to=kuba@kernel.org \
    --cc=ast@fiberby.net \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=zahari.doychev@linux.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).