[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200509164105.GA362499@lunn.ch>
Date: Sat, 9 May 2020 18:41:05 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Michael Grzeschik <m.grzeschik@...gutronix.de>
Cc: netdev@...r.kernel.org, f.fainelli@...il.com, davem@...emloft.net,
kernel@...gutronix.de
Subject: Re: [PATCH v3 3/5] net: tag: ksz: Add KSZ8863 tag code
> +/* For ingress (Host -> KSZ8863), 1 byte is added before FCS.
> + * ---------------------------------------------------------------------------
> + * DA(6bytes)|SA(6bytes)|....|Data(nbytes)|tag0(1byte)|tag1(1byte)|FCS(4bytes)
> + * ---------------------------------------------------------------------------
> + * tag0[1,0] : represents port
> + * (e.g. 0b00=addr-lookup 0b01=port1, 0b10=port2, 0b11=port1+port2)
> + * tag0[3,2] : bits two and three represent prioritization
> + * (e.g. 0b00xx=prio0, 0b01xx=prio1, 0b10xx=prio2, 0b11xx=prio3)
> + *
> + * For egress (KSZ8873 -> Host), 1 byte is added before FCS.
> + * ---------------------------------------------------------------------------
> + * DA(6bytes)|SA(6bytes)|....|Data(nbytes)|tag0(1byte)|FCS(4bytes)
> + * ---------------------------------------------------------------------------
> + * tag0[0] : zero-based value represents port
> + * (eg, 0b0=port1, 0b1=port2)
> + */
> +
> +static struct sk_buff *ksz8863_xmit(struct sk_buff *skb,
> + struct net_device *dev)
> +{
> + struct dsa_port *dp = dsa_slave_to_port(dev);
> + struct sk_buff *nskb;
> + __be16 *tag;
The comment says 1 byte is added. But tag is a u16?
Andrew
Powered by blists - more mailing lists