diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2014-01-21 19:29:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-23 00:29:27 -0500 |
commit | bdf4351bbc62f3b24151cf19ca6e531b68d8c340 (patch) | |
tree | 9c85179f27fe9b46de73ea24d5aa6daee3826c69 /net/bridge | |
parent | 00ca9c5b2b11d44eaf20a4b647efc999734323ec (diff) |
bridge: Remove unnecessary vlan_put_tag in br_handle_vlan
br_handle_vlan() pushes HW accelerated vlan tag into skbuff when outgoing
port is the bridge device.
This is unnecessary because __netif_receive_skb_core() can handle skbs
with HW accelerated vlan tag. In current implementation,
__netif_receive_skb_core() needs to extract the vlan tag embedded in skb
data. This could cause low network performance especially when receiving
frames at a high frame rate on the bridge device.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_vlan.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 7ffc801467ec..4ca4d0a0151c 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c | |||
@@ -151,27 +151,6 @@ struct sk_buff *br_handle_vlan(struct net_bridge *br, | |||
151 | br_vlan_get_tag(skb, &vid); | 151 | br_vlan_get_tag(skb, &vid); |
152 | if (test_bit(vid, pv->untagged_bitmap)) | 152 | if (test_bit(vid, pv->untagged_bitmap)) |
153 | skb = br_vlan_untag(skb); | 153 | skb = br_vlan_untag(skb); |
154 | else { | ||
155 | /* Egress policy says "send tagged". If output device | ||
156 | * is the bridge, we need to add the VLAN header | ||
157 | * ourselves since we'll be going through the RX path. | ||
158 | * Sending to ports puts the frame on the TX path and | ||
159 | * we let dev_hard_start_xmit() add the header. | ||
160 | */ | ||
161 | if (skb->protocol != htons(ETH_P_8021Q) && | ||
162 | pv->port_idx == 0) { | ||
163 | /* vlan_put_tag expects skb->data to point to | ||
164 | * mac header. | ||
165 | */ | ||
166 | skb_push(skb, ETH_HLEN); | ||
167 | skb = __vlan_put_tag(skb, skb->vlan_proto, skb->vlan_tci); | ||
168 | if (!skb) | ||
169 | goto out; | ||
170 | /* put skb->data back to where it was */ | ||
171 | skb_pull(skb, ETH_HLEN); | ||
172 | skb->vlan_tci = 0; | ||
173 | } | ||
174 | } | ||
175 | 154 | ||
176 | out: | 155 | out: |
177 | return skb; | 156 | return skb; |