[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YIaxpsBFDiEiiRj4@lunn.ch>
Date: Mon, 26 Apr 2021 14:27:18 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Prasanna Vengateshan <prasanna.vengateshan@...rochip.com>
Cc: Vladimir Oltean <olteanv@...il.com>, netdev@...r.kernel.org,
robh+dt@...nel.org, UNGLinuxDriver@...rochip.com,
hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
kuba@...nel.org, linux-kernel@...r.kernel.org,
vivien.didelot@...il.com, f.fainelli@...il.com,
devicetree@...r.kernel.org
Subject: Re: [PATCH v2 net-next 3/9] net: dsa: tag_ksz: add tag handling for
Microchip LAN937x
> > > +#define LAN937X_TAIL_TAG_LOOKUP BIT(12)
> > > +#define LAN937X_TAIL_TAG_VALID BIT(13)
> > > +#define LAN937X_TAIL_TAG_PORT_MASK 7
> > > +
> > > +static struct sk_buff *lan937x_xmit(struct sk_buff *skb,
> > > + struct net_device *dev)
> > > +{
> > > + struct dsa_port *dp = dsa_slave_to_port(dev);
> > > + __be16 *tag;
> > > + u8 *addr;
> > > + u16 val;
> > > +r
> > > + tag = skb_put(skb, LAN937X_INGRESS_TAG_LEN);
> >
> > Here we go again.. why is it called INGRESS_TAG_LEN if it is used during
> > xmit, and only during xmit?
> Definition is ingress to the LAN937x since it has different tag length for
> ingress and egress of LAN937x. Do you think should it be changed?
tag drivers run on Linux, not the switch. So all ingress/egress should
be relative to linux, not the switch. You are writing a linux driver
here, not firmware running on the switch.
Andrew
Powered by blists - more mailing lists