Skip to content

Commit 2409938

Browse files
vladimirolteankuba-moo
authored andcommitted
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>
1 parent 3c1975b commit 2409938

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

net/dsa/tag_xrs700x.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@
1313

1414
static struct sk_buff *xrs700x_xmit(struct sk_buff *skb, struct net_device *dev)
1515
{
16-
struct dsa_port *partner, *dp = dsa_user_to_port(dev);
1716
u8 *trailer;
1817

1918
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);
2620

2721
return skb;
2822
}

0 commit comments

Comments
 (0)