Lines Matching refs:skb
23 const struct sk_buff *skb) in should_deliver() argument
25 return (skb->dev != p->dev && p->state == BR_STATE_FORWARDING); in should_deliver()
28 static inline unsigned packet_length(const struct sk_buff *skb) in packet_length() argument
30 return skb->len - (skb->protocol == htons(ETH_P_8021Q) ? VLAN_HLEN : 0); in packet_length()
33 int br_dev_queue_push_xmit(struct sk_buff *skb) in br_dev_queue_push_xmit() argument
36 if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb)) in br_dev_queue_push_xmit()
37 kfree_skb(skb); in br_dev_queue_push_xmit()
40 if (nf_bridge_maybe_copy_header(skb)) in br_dev_queue_push_xmit()
41 kfree_skb(skb); in br_dev_queue_push_xmit()
43 skb_push(skb, ETH_HLEN); in br_dev_queue_push_xmit()
45 dev_queue_xmit(skb); in br_dev_queue_push_xmit()
52 int br_forward_finish(struct sk_buff *skb) in br_forward_finish() argument
54 return NF_HOOK(PF_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev, in br_forward_finish()
59 static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) in __br_deliver() argument
61 skb->dev = to->dev; in __br_deliver()
62 NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, in __br_deliver()
66 static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) in __br_forward() argument
70 if (skb_warn_if_lro(skb)) { in __br_forward()
71 kfree_skb(skb); in __br_forward()
75 indev = skb->dev; in __br_forward()
76 skb->dev = to->dev; in __br_forward()
77 skb_forward_csum(skb); in __br_forward()
79 NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev, in __br_forward()
84 void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) in br_deliver() argument
86 if (should_deliver(to, skb)) { in br_deliver()
87 __br_deliver(to, skb); in br_deliver()
91 kfree_skb(skb); in br_deliver()
95 void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) in br_forward() argument
97 if (should_deliver(to, skb)) { in br_forward()
98 __br_forward(to, skb); in br_forward()
102 kfree_skb(skb); in br_forward()
106 static void br_flood(struct net_bridge *br, struct sk_buff *skb, in br_flood() argument
108 struct sk_buff *skb)) in br_flood()
116 if (should_deliver(p, skb)) { in br_flood()
120 if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL) { in br_flood()
122 kfree_skb(skb); in br_flood()
134 __packet_hook(prev, skb); in br_flood()
138 kfree_skb(skb); in br_flood()
143 void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb) in br_flood_deliver() argument
145 br_flood(br, skb, __br_deliver); in br_flood_deliver()
149 void br_flood_forward(struct net_bridge *br, struct sk_buff *skb) in br_flood_forward() argument
151 br_flood(br, skb, __br_forward); in br_flood_forward()