Commit bdf4351b authored by Toshiaki Makita's avatar Toshiaki Makita Committed by David S. Miller

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: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: default avatarVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00ca9c5b
...@@ -151,27 +151,6 @@ struct sk_buff *br_handle_vlan(struct net_bridge *br, ...@@ -151,27 +151,6 @@ struct sk_buff *br_handle_vlan(struct net_bridge *br,
br_vlan_get_tag(skb, &vid); br_vlan_get_tag(skb, &vid);
if (test_bit(vid, pv->untagged_bitmap)) if (test_bit(vid, pv->untagged_bitmap))
skb = br_vlan_untag(skb); skb = br_vlan_untag(skb);
else {
/* Egress policy says "send tagged". If output device
* is the bridge, we need to add the VLAN header
* ourselves since we'll be going through the RX path.
* Sending to ports puts the frame on the TX path and
* we let dev_hard_start_xmit() add the header.
*/
if (skb->protocol != htons(ETH_P_8021Q) &&
pv->port_idx == 0) {
/* vlan_put_tag expects skb->data to point to
* mac header.
*/
skb_push(skb, ETH_HLEN);
skb = __vlan_put_tag(skb, skb->vlan_proto, skb->vlan_tci);
if (!skb)
goto out;
/* put skb->data back to where it was */
skb_pull(skb, ETH_HLEN);
skb->vlan_tci = 0;
}
}
out: out:
return skb; return skb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment