15 #include <linux/slab.h>
16 #include <linux/kernel.h>
17 #include <linux/netdevice.h>
20 #include <linux/if_vlan.h>
21 #include <linux/netfilter_bridge.h>
37 static inline unsigned int packet_length(
const struct sk_buff *skb)
46 (packet_length(skb) > skb->
dev->mtu && !skb_is_gso(skb))) {
68 if (
unlikely(netpoll_tx_running(to->
br->dev))) {
69 if (packet_length(skb) > skb->
dev->mtu && !skb_is_gso(skb))
73 br_netpoll_send_skb(to, skb);
86 if (skb_warn_if_lro(skb)) {
93 skb_forward_csum(skb);
102 if (to && should_deliver(to, skb)) {
103 __br_deliver(to, skb);
113 if (should_deliver(to, skb)) {
115 deliver_clone(to, skb, __br_forward);
117 __br_forward(to, skb);
134 dev->
stats.tx_dropped++;
138 __packet_hook(prev, skb);
150 if (!should_deliver(p, skb))
156 err = deliver_clone(prev, skb, __packet_hook);
176 prev = maybe_deliver(prev, p, skb, __packet_hook);
185 deliver_clone(prev, skb, __packet_hook);
187 __packet_hook(prev, skb);
199 br_flood(br, skb,
NULL, __br_deliver);
206 br_flood(br, skb, skb2, __br_forward);
209 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
213 void (*__packet_hook)(
232 port = (
unsigned long)lport > (
unsigned long)rport ?
235 prev = maybe_deliver(prev, port, skb, __packet_hook);
239 if ((
unsigned long)lport >= (
unsigned long)port)
241 if ((
unsigned long)rport >= (
unsigned long)port)
249 deliver_clone(prev, skb, __packet_hook);
251 __packet_hook(prev, skb);
263 br_multicast_flood(mdst, skb,
NULL, __br_deliver);
270 br_multicast_flood(mdst, skb, skb2, __br_forward);