Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'doc-netlink-specs-add-vlan-support'

Hangbin Liu says:

====================
doc/netlink/specs: Add vlan support

Add vlan support in rt_link spec.
====================

Link: https://lore.kernel.org/r/20240327123130.1322921-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+82 -3
+78 -2
Documentation/netlink/specs/rt_link.yaml
··· 50 50 name: dormant 51 51 - 52 52 name: echo 53 - 53 + - 54 + name: vlan-protocols 55 + type: enum 56 + entries: 57 + - 58 + name: 8021q 59 + value: 33024 60 + - 61 + name: 8021ad 62 + value: 34984 54 63 - 55 64 name: rtgenmsg 56 65 type: struct ··· 738 729 - 739 730 name: filter-mask 740 731 type: u32 741 - 732 + - 733 + name: ifla-vlan-flags 734 + type: struct 735 + members: 736 + - 737 + name: flags 738 + type: u32 739 + enum: vlan-flags 740 + enum-as-flags: true 741 + - 742 + name: mask 743 + type: u32 744 + display-hint: hex 745 + - 746 + name: vlan-flags 747 + type: flags 748 + entries: 749 + - reorder-hdr 750 + - gvrp 751 + - loose-binding 752 + - mvrp 753 + - bridge-binding 754 + - 755 + name: ifla-vlan-qos-mapping 756 + type: struct 757 + members: 758 + - 759 + name: from 760 + type: u32 761 + - 762 + name: to 763 + type: u32 742 764 743 765 attribute-sets: 744 766 - ··· 1548 1508 name: num-disabled-queues 1549 1509 type: u32 1550 1510 - 1511 + name: linkinfo-vlan-attrs 1512 + name-prefix: ifla-vlan- 1513 + attributes: 1514 + - 1515 + name: id 1516 + type: u16 1517 + - 1518 + name: flag 1519 + type: binary 1520 + struct: ifla-vlan-flags 1521 + - 1522 + name: egress-qos 1523 + type: nest 1524 + nested-attributes: ifla-vlan-qos 1525 + - 1526 + name: ingress-qos 1527 + type: nest 1528 + nested-attributes: ifla-vlan-qos 1529 + - 1530 + name: protocol 1531 + type: u16 1532 + enum: vlan-protocols 1533 + byte-order: big-endian 1534 + - 1535 + name: ifla-vlan-qos 1536 + name-prefix: ifla-vlan-qos 1537 + attributes: 1538 + - 1539 + name: mapping 1540 + type: binary 1541 + multi-attr: true 1542 + struct: ifla-vlan-qos-mapping 1543 + - 1551 1544 name: linkinfo-vrf-attrs 1552 1545 name-prefix: ifla-vrf- 1553 1546 attributes: ··· 1739 1666 - 1740 1667 value: tun 1741 1668 attribute-set: linkinfo-tun-attrs 1669 + - 1670 + value: vlan 1671 + attribute-set: linkinfo-vlan-attrs 1742 1672 - 1743 1673 value: vrf 1744 1674 attribute-set: linkinfo-vrf-attrs
+4 -1
tools/net/ynl/lib/ynl.py
··· 819 819 if display_hint == 'mac': 820 820 formatted = ':'.join('%02x' % b for b in raw) 821 821 elif display_hint == 'hex': 822 - formatted = bytes.hex(raw, ' ') 822 + if isinstance(raw, int): 823 + formatted = hex(raw) 824 + else: 825 + formatted = bytes.hex(raw, ' ') 823 826 elif display_hint in [ 'ipv4', 'ipv6' ]: 824 827 formatted = format(ipaddress.ip_address(raw)) 825 828 elif display_hint == 'uuid':