linux/tools/net/ynl
Zahari Doychev 8b4e023d79 ynl: samples: add tc filter example
Add a sample tool demonstrating how to add, dump, and delete a
flower filter with two VLAN push actions. The example can be
invoked as:

  # samples/tc-filter-add p2

    flower pref 1 proto: 0x8100
    flower:
      vlan_id: 100
      vlan_prio: 5
      num_of_vlans: 3
    action order: 1 vlan push id 200 protocol 0x8100 priority 0
    action order: 2 vlan push id 300 protocol 0x8100 priority 0

This verifies correct handling of tc action attributes for multiple
VLAN push actions. The tc action indexed arrays start from index 1,
and the index defines the action order. This behavior differs from
the YNL specification, which expects arrays to be zero-based. To
accommodate this, the example adds a dummy action at index 0, which
is ignored by the kernel.

Signed-off-by: Zahari Doychev <zahari.doychev@linux.com>
Link: https://patch.msgid.link/20251119203618.263780-2-zahari.doychev@linux.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-20 18:20:40 -08:00
..
generated tools: ynl: enable codegen for TC 2025-05-21 12:38:23 -07:00
lib tools: ynl: fix string attribute length to include null terminator 2025-10-27 16:47:29 -07:00
pyynl tools: ynl: cli: Display enum values in --list-attrs output 2025-11-20 15:43:04 +01:00
samples ynl: samples: add tc filter example 2025-11-20 18:20:40 -08:00
ynltool tools: ynltool: ignore *.d deps files 2025-11-18 17:35:52 -08:00
Makefile tools: ynltool: create skeleton for the C command 2025-11-11 12:21:04 +01:00
Makefile.deps psp: base PSP device support 2025-09-18 12:32:06 +02:00
pyproject.toml tools: ynl: add initial pyproject.toml for packaging 2025-01-09 12:53:27 -08:00
requirements.txt tools: ynl: add the Python requirements.txt file 2023-03-24 19:11:02 -07:00
ynl-regen.sh tools: ynl: move python code to separate sub-directory 2025-01-09 12:53:27 -08:00