Re: [PATCH 1/2] net: dsa: tag_yt921x: add support for Motorcomm YT921x tags
From: Andrew Lunn
Date: Fri Aug 08 2025 - 15:06:45 EST
On Sat, Aug 09, 2025 at 01:38:02AM +0800, David Yang wrote:
> Add support for Motorcomm YT921x tags, which includes a configurable
> ethertype field (default to 0x9988).
Hi David
Please take a read of:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
We are in the merge window at the moment, so you need to post patches
as RFC. And you need to indicate the tree in the Subject: line.
> +#define YT921X_TAG_PORT_ENf BIT(15)
> +#define YT921X_TAG_RX_PORTf GENMASK(14, 11)
> +#define YT921X_TAG_TX_PORTf GENMASK(10, 0)
> +#define YT921X_TAG_TX_PORTnv(port) BIT(port)
These lower case letters at the end are unusual. What do they
represent?
> +static struct sk_buff *
> +yt921x_tag_xmit(struct sk_buff *skb, struct net_device *netdev)
> +{
> + struct dsa_port *dp = dsa_user_to_port(netdev);
> + __be16 *tag;
> +
> + skb_push(skb, YT921X_TAG_LEN);
> + dsa_alloc_etype_header(skb, YT921X_TAG_LEN);
> +
> + tag = (__be16 *)(skb->data + 2 * ETH_ALEN);
dsa_etype_header_pos_tx() ?
> +static struct sk_buff *
> +yt921x_tag_rcv(struct sk_buff *skb, struct net_device *netdev)
> +{
> + __be16 *tag;
> + u16 rx;
> + int rx_port;
Reverse Christmas tree. Longest to shortest.
Andrew
---
pw-bot: cr