--- zzzz-none-000/linux-4.4.271/net/ipv6/sit.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/net/ipv6/sit.c 2023-01-11 09:25:44.000000000 +0000 @@ -87,6 +87,21 @@ struct net_device *fb_tunnel_dev; }; +void ipip6_update_offload_stats(struct net_device *dev, void *ptr) +{ + struct pcpu_sw_netstats *tstats = per_cpu_ptr(dev->tstats, 0); + const struct pcpu_sw_netstats *offload_stats = + (struct pcpu_sw_netstats *)ptr; + + u64_stats_update_begin(&tstats->syncp); + tstats->tx_packets += offload_stats->tx_packets; + tstats->tx_bytes += offload_stats->tx_bytes; + tstats->rx_packets += offload_stats->rx_packets; + tstats->rx_bytes += offload_stats->rx_bytes; + u64_stats_update_end(&tstats->syncp); +} +EXPORT_SYMBOL(ipip6_update_offload_stats); + /* * Must be invoked with rcu_read_lock */ @@ -713,6 +728,8 @@ tstats->rx_bytes += skb->len; u64_stats_update_end(&tstats->syncp); + /* Reset the skb_iif to Tunnels interface index */ + skb->skb_iif = tunnel->dev->ifindex; netif_rx(skb); return 0; @@ -989,6 +1006,8 @@ skb_set_inner_ipproto(skb, IPPROTO_IPV6); + /* Reset the skb_iif to Tunnels interface index */ + skb->skb_iif = tunnel->dev->ifindex; err = iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, tos, ttl, df, !net_eq(tunnel->net, dev_net(dev)));