Re: [PATCH net-next v4 5/8] net: dsa: microchip: Add KSZ8463 tail tag handling

From: Bastien Curutchet

Date: Wed Feb 18 2026 - 04:37:26 EST


Hi Vladimir,

On 2/2/26 2:29 PM, Vladimir Oltean wrote:
On Tue, Jan 27, 2026 at 10:06:47AM +0100, Bastien Curutchet (Schneider Electric) wrote:
@@ -383,6 +384,74 @@ static const struct dsa_device_ops ksz9893_netdev_ops = {
DSA_TAG_DRIVER(ksz9893_netdev_ops);
MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_KSZ9893, KSZ9893_NAME);
+#define KSZ8463_TAIL_TAG_PRIO GENMASK(4, 3)
+#define KSZ8463_TAIL_TAG_EG_PORT_M GENMASK(2, 0)
+
+static struct sk_buff *ksz8463_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+{
+ u16 queue_mapping = skb_get_queue_mapping(skb);
+ u8 prio = netdev_txq_to_tc(dev, queue_mapping);
+ struct dsa_port *dp = dsa_user_to_port(dev);
+ u8 *tag;
+
+ if (skb->ip_summed == CHECKSUM_PARTIAL && skb_checksum_help(skb))
+ return NULL;
+
+ tag = skb_put(skb, KSZ_INGRESS_TAG_LEN);
+
+ *tag = BIT(dp->index);

You're out of sync with mainline which has transitioned all
BIT(dp->index) users to dsa_xmit_port_mask(skb, dev).

To avoid this in the future please do not duplicate the ksz9893 xmit
implementation, but call a common function and use a "bool do_tstamp"
variable which is true when called from ksz9893 and false from ksz8463.


Ok, I'll do it, thank you.


Best regards,
Bastien