Thread (31 messages) flat view 31 messages, 5 authors, 2021-05-06

Re: [PATCH v2 net-next 3/9] net: dsa: tag_ksz: add tag handling for Microchip LAN937x

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-04-26 12:27:33
Also in: linux-devicetree, lkml

quoted
quoted
+#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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help