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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-dsa-tag_rtl8_4-fixes-doc-and-set-keep'

Luiz Angelo Daros de Luca says:

====================
net: dsa: tag_rtl8_4: fixes doc and set keep

This small series addresses two points in the rtl8_4 tagger used by the
realtel rtl8365mb driver.

The first patch updates the documentation of the tag format while the
second patch sets the KEEP flag bit, ensuring that the switch
respects the frame's VLAN format as provided by the kernel.

These patches were previously part of a larger series but are being
submitted independently as they are self-contained and already
received review.

Link: https://patch.msgid.link/CAD++jLmX31KfhGXA6SMAPXb14dHSC1t4JQZ=PQvjh-3hUcnzJA@mail.gmail.com
====================

Link: https://patch.msgid.link/20260408-realtek_fixes-v1-0-915ff1404d56@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+13 -8
+13 -8
net/dsa/tag_rtl8_4.c
··· 17 17 * | (8-bit) | (8-bit) | 18 18 * | Protocol [0x04] | REASON | b 19 19 * |-----------------------------------+-----------------------------------| y 20 - * | (1) | (1) | (2) | (1) | (3) | (1) | (1) | (1) | (5) | t 21 - * | FID_EN | X | FID | PRI_EN | PRI | KEEP | X | LEARN_DIS | X | e 20 + * | (1) | (3) | (1) | (3) | (1) | (1) | (1) | (5) | t 21 + * | EFID_EN | EFID | PRI_EN | PRI | KEEP | VSEL | LEARN_DIS | VIDX | e 22 22 * |-----------------------------------+-----------------------------------| s 23 23 * | (1) | (15-bit) | | 24 24 * | ALLOW | TX/RX | v ··· 32 32 * EtherType | note that Realtek uses the same EtherType for 33 33 * | other incompatible tag formats (e.g. tag_rtl4_a.c) 34 34 * Protocol | 0x04: indicates that this tag conforms to this format 35 - * X | reserved 36 35 * ------------+------------- 37 36 * REASON | reason for forwarding packet to CPU 38 37 * | 0: packet was forwarded or flooded to CPU 39 38 * | 80: packet was trapped to CPU 40 - * FID_EN | 1: packet has an FID 41 - * | 0: no FID 42 - * FID | FID of packet (if FID_EN=1) 39 + * EFID_EN | 1: packet has an EFID 40 + * | 0: no EFID 41 + * EFID | Extended filter ID (EFID) of packet (if EFID_EN=1) 43 42 * PRI_EN | 1: force priority of packet 44 43 * | 0: don't force priority 45 44 * PRI | priority of packet (if PRI_EN=1) 46 45 * KEEP | preserve packet VLAN tag format 46 + * VSEL | 0: switch should classify packet according to VLAN tag 47 + * | 1: switch should classify packet according to VLAN membership 48 + * | configuration with index VIDX 47 49 * LEARN_DIS | don't learn the source MAC address of the packet 50 + * VIDX | index of a VLAN membership configuration to use with VSEL 48 51 * ALLOW | 1: treat TX/RX field as an allowance port mask, meaning the 49 52 * | packet may only be forwarded to ports specified in the 50 53 * | mask ··· 99 96 #define RTL8_4_REASON_TRAP 80 100 97 101 98 #define RTL8_4_LEARN_DIS BIT(5) 99 + #define RTL8_4_KEEP BIT(7) 102 100 103 101 #define RTL8_4_TX GENMASK(3, 0) 104 102 #define RTL8_4_RX GENMASK(10, 0) ··· 115 111 /* Set Protocol; zero REASON */ 116 112 tag16[1] = htons(FIELD_PREP(RTL8_4_PROTOCOL, RTL8_4_PROTOCOL_RTL8365MB)); 117 113 118 - /* Zero FID_EN, FID, PRI_EN, PRI, KEEP; set LEARN_DIS */ 119 - tag16[2] = htons(FIELD_PREP(RTL8_4_LEARN_DIS, 1)); 114 + /* Zero EFID_EN, EFID, PRI_EN, PRI, VSEL, VIDX; set KEEP, LEARN_DIS */ 115 + tag16[2] = htons(FIELD_PREP(RTL8_4_LEARN_DIS, 1) | 116 + FIELD_PREP(RTL8_4_KEEP, 1)); 120 117 121 118 /* Zero ALLOW; set RX (CPU->switch) forwarding port mask */ 122 119 tag16[3] = htons(FIELD_PREP(RTL8_4_RX, dsa_xmit_port_mask(skb, dev)));