Thread (9 messages) 9 messages, 4 authors, 2022-02-18

Re: [PATCH net-next 1/2] net: dsa: tag_rtl8_4: add rtl8_4t tailing variant

From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-02-11 19:39:07

On Wed, Feb 09, 2022 at 11:51:58PM +0200, Vladimir Oltean wrote:
Re: title. Tail or trailing?

On Wed, Feb 09, 2022 at 06:13:11PM -0300, Luiz Angelo Daros de Luca wrote:
quoted
+static inline void rtl8_4_write_tag(struct sk_buff *skb, struct net_device *dev,
+				    char *tag)
 {
 	struct dsa_port *dp = dsa_slave_to_port(dev);
-	__be16 *tag;
-
-	skb_push(skb, RTL8_4_TAG_LEN);
-
-	dsa_alloc_etype_header(skb, RTL8_4_TAG_LEN);
-	tag = dsa_etype_header_pos_tx(skb);
+	__be16 *tag16 = (__be16 *)tag;
Can the tail tag be aligned to an odd offset? In that case, should you
access byte by byte, maybe? I'm not sure how arches handle this.
You should use get_unaligned_be16().

    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