• Home
  • Raw
  • Download

Lines Matching refs:skb

22 static void rmnet_set_skb_proto(struct sk_buff *skb)  in rmnet_set_skb_proto()  argument
24 switch (skb->data[0] & 0xF0) { in rmnet_set_skb_proto()
26 skb->protocol = htons(ETH_P_IP); in rmnet_set_skb_proto()
29 skb->protocol = htons(ETH_P_IPV6); in rmnet_set_skb_proto()
32 skb->protocol = htons(ETH_P_MAP); in rmnet_set_skb_proto()
40 rmnet_deliver_skb(struct sk_buff *skb) in rmnet_deliver_skb() argument
42 struct rmnet_priv *priv = netdev_priv(skb->dev); in rmnet_deliver_skb()
44 skb_reset_transport_header(skb); in rmnet_deliver_skb()
45 skb_reset_network_header(skb); in rmnet_deliver_skb()
46 rmnet_vnd_rx_fixup(skb, skb->dev); in rmnet_deliver_skb()
48 skb->pkt_type = PACKET_HOST; in rmnet_deliver_skb()
49 skb_set_mac_header(skb, 0); in rmnet_deliver_skb()
50 gro_cells_receive(&priv->gro_cells, skb); in rmnet_deliver_skb()
56 __rmnet_map_ingress_handler(struct sk_buff *skb, in __rmnet_map_ingress_handler() argument
63 if (RMNET_MAP_GET_CD_BIT(skb)) { in __rmnet_map_ingress_handler()
65 return rmnet_map_command(skb, port); in __rmnet_map_ingress_handler()
70 mux_id = RMNET_MAP_GET_MUX_ID(skb); in __rmnet_map_ingress_handler()
71 pad = RMNET_MAP_GET_PAD(skb); in __rmnet_map_ingress_handler()
72 len = RMNET_MAP_GET_LENGTH(skb) - pad; in __rmnet_map_ingress_handler()
81 skb->dev = ep->egress_dev; in __rmnet_map_ingress_handler()
84 skb_pull(skb, sizeof(struct rmnet_map_header)); in __rmnet_map_ingress_handler()
85 rmnet_set_skb_proto(skb); in __rmnet_map_ingress_handler()
88 if (!rmnet_map_checksum_downlink_packet(skb, len + pad)) in __rmnet_map_ingress_handler()
89 skb->ip_summed = CHECKSUM_UNNECESSARY; in __rmnet_map_ingress_handler()
92 skb_trim(skb, len); in __rmnet_map_ingress_handler()
93 rmnet_deliver_skb(skb); in __rmnet_map_ingress_handler()
97 kfree_skb(skb); in __rmnet_map_ingress_handler()
101 rmnet_map_ingress_handler(struct sk_buff *skb, in rmnet_map_ingress_handler() argument
106 if (skb->dev->type == ARPHRD_ETHER) { in rmnet_map_ingress_handler()
107 if (pskb_expand_head(skb, ETH_HLEN, 0, GFP_ATOMIC)) { in rmnet_map_ingress_handler()
108 kfree_skb(skb); in rmnet_map_ingress_handler()
112 skb_push(skb, ETH_HLEN); in rmnet_map_ingress_handler()
116 while ((skbn = rmnet_map_deaggregate(skb, port)) != NULL) in rmnet_map_ingress_handler()
119 consume_skb(skb); in rmnet_map_ingress_handler()
121 __rmnet_map_ingress_handler(skb, port); in rmnet_map_ingress_handler()
125 static int rmnet_map_egress_handler(struct sk_buff *skb, in rmnet_map_egress_handler() argument
140 if (skb_headroom(skb) < required_headroom) { in rmnet_map_egress_handler()
141 if (pskb_expand_head(skb, required_headroom, 0, GFP_ATOMIC)) in rmnet_map_egress_handler()
146 rmnet_map_checksum_uplink_packet(skb, orig_dev); in rmnet_map_egress_handler()
148 map_header = rmnet_map_add_map_header(skb, additional_header_len, 0); in rmnet_map_egress_handler()
154 skb->protocol = htons(ETH_P_MAP); in rmnet_map_egress_handler()
160 rmnet_bridge_handler(struct sk_buff *skb, struct net_device *bridge_dev) in rmnet_bridge_handler() argument
162 if (skb_mac_header_was_set(skb)) in rmnet_bridge_handler()
163 skb_push(skb, skb->mac_len); in rmnet_bridge_handler()
166 skb->dev = bridge_dev; in rmnet_bridge_handler()
167 dev_queue_xmit(skb); in rmnet_bridge_handler()
179 struct sk_buff *skb = *pskb; in rmnet_rx_handler() local
183 if (!skb) in rmnet_rx_handler()
186 if (skb->pkt_type == PACKET_LOOPBACK) in rmnet_rx_handler()
189 dev = skb->dev; in rmnet_rx_handler()
192 atomic_long_inc(&skb->dev->rx_nohandler); in rmnet_rx_handler()
193 kfree_skb(skb); in rmnet_rx_handler()
199 rmnet_map_ingress_handler(skb, port); in rmnet_rx_handler()
202 rmnet_bridge_handler(skb, port->bridge_ep); in rmnet_rx_handler()
214 void rmnet_egress_handler(struct sk_buff *skb) in rmnet_egress_handler() argument
221 sk_pacing_shift_update(skb->sk, 8); in rmnet_egress_handler()
223 orig_dev = skb->dev; in rmnet_egress_handler()
225 skb->dev = priv->real_dev; in rmnet_egress_handler()
228 port = rmnet_get_port_rcu(skb->dev); in rmnet_egress_handler()
232 if (rmnet_map_egress_handler(skb, port, mux_id, orig_dev)) in rmnet_egress_handler()
235 rmnet_vnd_tx_fixup(skb, orig_dev); in rmnet_egress_handler()
237 dev_queue_xmit(skb); in rmnet_egress_handler()
242 kfree_skb(skb); in rmnet_egress_handler()