X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Flinux-2.6%2Fcompat-2.6%2Fip_gre.c;h=4c47b92530af17f600dca771efce05e4e0dc61ac;hb=410dd7bfda014a7c90bb5bd1de3274dd40ef6906;hp=05c6055b5b524683bd1eca4b29a04e39fa19c942;hpb=02059c09d4d7bc4860db9aee7f4daae43b6eab68;p=openvswitch diff --git a/datapath/linux-2.6/compat-2.6/ip_gre.c b/datapath/linux-2.6/compat-2.6/ip_gre.c index 05c6055b..4c47b925 100644 --- a/datapath/linux-2.6/compat-2.6/ip_gre.c +++ b/datapath/linux-2.6/compat-2.6/ip_gre.c @@ -696,6 +696,9 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev { struct ip_tunnel *tunnel = netdev_priv(dev); struct net_device_stats *stats; +#ifdef HAVE_NETDEV_QUEUE_STATS + struct netdev_queue *txq = netdev_get_tx_queue(dev, 0); +#endif struct iphdr *old_iph = ip_hdr(skb); struct iphdr *tiph; u8 tos; @@ -709,7 +712,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev int mtu; #ifdef HAVE_NETDEV_STATS - stats = &tunnel->dev->stats; + stats = &dev->stats; #else stats = &tunnel->stat; #endif @@ -860,7 +863,11 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom); if (!new_skb) { ip_rt_put(rt); +#ifdef HAVE_NETDEV_QUEUE_STATS + txq->tx_dropped++; +#else stats->tx_dropped++; +#endif dev_kfree_skb(skb); return NETDEV_TX_OK; }