lkml.org 
[lkml]   [2021]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2021-04-26 14:28    [W:0.044 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site