Re: [PATCH 11/18] net: iosm: encode or decode datagram
From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-01-07 21:57:04
Also in:
netdev
From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-01-07 21:57:04
Also in:
netdev
+/* Pass the DL packet to the netif layer. */
+static int mux_net_receive(struct iosm_mux *ipc_mux, int if_id,
+ struct iosm_wwan *wwan, u32 offset, u8 service_class,
+ struct sk_buff *skb)
+{
+ /* for "zero copy" use clone */
+ struct sk_buff *dest_skb = skb_clone(skb, GFP_ATOMIC);
+
+ if (!dest_skb)
+ return -1;
+
+ skb_pull(dest_skb, offset);
+
+ skb_set_tail_pointer(dest_skb, dest_skb->len);
+
+ /* Goto the start of the Ethernet header. */
+ skb_push(dest_skb, ETH_HLEN);
+
+ /* map session to vlan */
+ __vlan_hwaccel_put_tag(dest_skb, htons(ETH_P_8021Q), if_id + 1);Well, that explains a bit, my comments on the netdev patch. So there is no Ethernet header on the 'wire'. This is not an Ethernet device at all. More in the documentation patch... Andrew