Lines Matching refs:skb

25 			 struct sk_buff *skb,
27 struct sk_buff *skb));
31 const struct sk_buff *skb) in should_deliver() argument
36 return ((p->flags & BR_HAIRPIN_MODE) || skb->dev != p->dev) && in should_deliver()
37 br_allowed_egress(vg, skb) && p->state == BR_STATE_FORWARDING; in should_deliver()
40 int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb) in br_dev_queue_push_xmit() argument
42 if (!is_skb_forwardable(skb->dev, skb)) in br_dev_queue_push_xmit()
45 skb_push(skb, ETH_HLEN); in br_dev_queue_push_xmit()
46 br_drop_fake_rtable(skb); in br_dev_queue_push_xmit()
47 skb_sender_cpu_clear(skb); in br_dev_queue_push_xmit()
49 if (skb->ip_summed == CHECKSUM_PARTIAL && in br_dev_queue_push_xmit()
50 (skb->protocol == htons(ETH_P_8021Q) || in br_dev_queue_push_xmit()
51 skb->protocol == htons(ETH_P_8021AD))) { in br_dev_queue_push_xmit()
54 if (!__vlan_get_protocol(skb, skb->protocol, &depth)) in br_dev_queue_push_xmit()
57 skb_set_network_header(skb, depth); in br_dev_queue_push_xmit()
60 dev_queue_xmit(skb); in br_dev_queue_push_xmit()
65 kfree_skb(skb); in br_dev_queue_push_xmit()
70 int br_forward_finish(struct net *net, struct sock *sk, struct sk_buff *skb) in br_forward_finish() argument
73 net, sk, skb, NULL, skb->dev, in br_forward_finish()
79 static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) in __br_deliver() argument
84 skb = br_handle_vlan(to->br, vg, skb); in __br_deliver()
85 if (!skb) in __br_deliver()
88 skb->dev = to->dev; in __br_deliver()
91 if (!is_skb_forwardable(skb->dev, skb)) in __br_deliver()
92 kfree_skb(skb); in __br_deliver()
94 skb_push(skb, ETH_HLEN); in __br_deliver()
95 br_netpoll_send_skb(to, skb); in __br_deliver()
101 dev_net(skb->dev), NULL, skb,NULL, skb->dev, in __br_deliver()
105 static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) in __br_forward() argument
110 if (skb_warn_if_lro(skb)) { in __br_forward()
111 kfree_skb(skb); in __br_forward()
116 skb = br_handle_vlan(to->br, vg, skb); in __br_forward()
117 if (!skb) in __br_forward()
120 indev = skb->dev; in __br_forward()
121 skb->dev = to->dev; in __br_forward()
122 skb_forward_csum(skb); in __br_forward()
125 dev_net(indev), NULL, skb, indev, skb->dev, in __br_forward()
130 void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) in br_deliver() argument
132 if (to && should_deliver(to, skb)) { in br_deliver()
133 __br_deliver(to, skb); in br_deliver()
137 kfree_skb(skb); in br_deliver()
142 void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0) in br_forward() argument
144 if (to && should_deliver(to, skb)) { in br_forward()
146 deliver_clone(to, skb, __br_forward); in br_forward()
148 __br_forward(to, skb); in br_forward()
153 kfree_skb(skb); in br_forward()
157 struct sk_buff *skb, in deliver_clone() argument
159 struct sk_buff *skb)) in deliver_clone()
161 struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; in deliver_clone()
163 skb = skb_clone(skb, GFP_ATOMIC); in deliver_clone()
164 if (!skb) { in deliver_clone()
169 __packet_hook(prev, skb); in deliver_clone()
175 struct sk_buff *skb, in maybe_deliver() argument
177 struct sk_buff *skb)) in maybe_deliver()
181 if (!should_deliver(p, skb)) in maybe_deliver()
187 err = deliver_clone(prev, skb, __packet_hook); in maybe_deliver()
196 static void br_flood(struct net_bridge *br, struct sk_buff *skb, in br_flood() argument
199 struct sk_buff *skb), in br_flood() argument
216 BR_INPUT_SKB_CB(skb)->proxyarp_replied) in br_flood()
219 prev = maybe_deliver(prev, p, skb, __packet_hook); in br_flood()
228 deliver_clone(prev, skb, __packet_hook); in br_flood()
230 __packet_hook(prev, skb); in br_flood()
235 kfree_skb(skb); in br_flood()
240 void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, bool unicast) in br_flood_deliver() argument
242 br_flood(br, skb, NULL, __br_deliver, unicast); in br_flood_deliver()
246 void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, in br_flood_forward() argument
249 br_flood(br, skb, skb2, __br_forward, unicast); in br_flood_forward()
255 struct sk_buff *skb, struct sk_buff *skb0, in br_multicast_flood() argument
258 struct sk_buff *skb)) in br_multicast_flood()
260 struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; in br_multicast_flood()
278 prev = maybe_deliver(prev, port, skb, __packet_hook); in br_multicast_flood()
292 deliver_clone(prev, skb, __packet_hook); in br_multicast_flood()
294 __packet_hook(prev, skb); in br_multicast_flood()
299 kfree_skb(skb); in br_multicast_flood()
304 struct sk_buff *skb) in br_multicast_deliver() argument
306 br_multicast_flood(mdst, skb, NULL, __br_deliver); in br_multicast_deliver()
311 struct sk_buff *skb, struct sk_buff *skb2) in br_multicast_forward() argument
313 br_multicast_flood(mdst, skb, skb2, __br_forward); in br_multicast_forward()