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

net: dsa: tag_xrs700x: use the dsa_xmit_port_mask() helper

The "xrs700x" is the original DSA tagging protocol with HSR TX
replication support, we now essentially move that logic to the
dsa_xmit_port_mask() helper. The end result is something akin to
hellcreek_xmit() (but reminds me I should also take care of
skb_checksum_help() for tail taggers in the core).

The implementation differences to dsa_xmit_port_mask() are immaterial.

Cc: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251127120902.292555-15-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
24099389 3c1975bb

+1 -7
+1 -7
net/dsa/tag_xrs700x.c
··· 13 13 14 14 static struct sk_buff *xrs700x_xmit(struct sk_buff *skb, struct net_device *dev) 15 15 { 16 - struct dsa_port *partner, *dp = dsa_user_to_port(dev); 17 16 u8 *trailer; 18 17 19 18 trailer = skb_put(skb, 1); 20 - trailer[0] = BIT(dp->index); 21 - 22 - if (dp->hsr_dev) 23 - dsa_hsr_foreach_port(partner, dp->ds, dp->hsr_dev) 24 - if (partner != dp) 25 - trailer[0] |= BIT(partner->index); 19 + trailer[0] = dsa_xmit_port_mask(skb, dev); 26 20 27 21 return skb; 28 22 }