summaryrefslogtreecommitdiff
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2013-03-09 16:38:39 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-10 03:05:44 -0400
commit6aed0c8bf7d2f389b472834053eb6e3bd6926999 (patch)
tree0b180bcbbefd6e6e447b8771d50fe5371b75bd29 /drivers/net/vxlan.c
parent4f3ed9209f7f75ff0ee21bc5052d76542dd75b5f (diff)
tunnel: use iptunnel_xmit() again
With recent patches from Pravin, most tunnels can't use iptunnel_xmit() any more, due to ip_select_ident() and skb->ip_summed. But we can just move these operations out of iptunnel_xmit(), so that tunnels can use it again. This by the way fixes a bug in vxlan (missing nf_reset()) for net-next. Cc: Pravin B Shelar <pshelar@nicira.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index f057ec00bba3..f3a135cb50a9 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -855,7 +855,6 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
__u16 src_port;
__be16 df = 0;
__u8 tos, ttl;
- int err;
bool did_rsc = false;
const struct vxlan_fdb *f;
@@ -980,18 +979,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
if (handle_offloads(skb))
goto drop;
- err = ip_local_out(skb);
- if (likely(net_xmit_eval(err) == 0)) {
- struct vxlan_stats *stats = this_cpu_ptr(vxlan->stats);
-
- u64_stats_update_begin(&stats->syncp);
- stats->tx_packets++;
- stats->tx_bytes += pkt_len;
- u64_stats_update_end(&stats->syncp);
- } else {
- dev->stats.tx_errors++;
- dev->stats.tx_aborted_errors++;
- }
+ iptunnel_xmit(skb, dev);
return NETDEV_TX_OK;
drop: