Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-24 Thread Pravin Shelar
On Thu, Dec 24, 2015 at 1:14 AM, Nicolas Dichtel wrote: > Le 24/12/2015 00:52, Pravin B Shelar a écrit : > [snip] >> >> @@ -83,22 +84,12 @@ int ip6_tnl_get_iflink(const struct net_device *dev); >> static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb, >>

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-24 Thread Nicolas Dichtel
Le 24/12/2015 13:46, Thadeu Lima de Souza Cascardo a écrit : On Thu, Dec 24, 2015 at 10:21:27AM +0100, Nicolas Dichtel wrote: Le 24/12/2015 00:52, Pravin B Shelar a écrit : [snip] diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index 6af78c6..d63a911 100644 --- a/net/tipc/udp_media.c +

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-24 Thread Thadeu Lima de Souza Cascardo
On Thu, Dec 24, 2015 at 10:21:27AM +0100, Nicolas Dichtel wrote: > Le 24/12/2015 00:52, Pravin B Shelar a écrit : > [snip] > >diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c > >index 6af78c6..d63a911 100644 > >--- a/net/tipc/udp_media.c > >+++ b/net/tipc/udp_media.c > >@@ -182,15 +182,9 @@

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-24 Thread Nicolas Dichtel
Le 24/12/2015 00:52, Pravin B Shelar a écrit : [snip] diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index 6af78c6..d63a911 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -182,15 +182,9 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-24 Thread Nicolas Dichtel
Le 24/12/2015 00:52, Pravin B Shelar a écrit : [snip] @@ -83,22 +84,12 @@ int ip6_tnl_get_iflink(const struct net_device *dev); static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-24 Thread Nicolas Dichtel
Le 24/12/2015 05:37, Pravin Shelar a écrit : On Wed, Dec 23, 2015 at 6:57 PM, David Miller wrote: From: Pravin B Shelar Date: Wed, 23 Dec 2015 15:52:03 -0800 } else { - err_stats->tx_dropped++; + struct net_device_stats *err_stats = &dev->stats; + +

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-23 Thread Pravin Shelar
On Wed, Dec 23, 2015 at 6:57 PM, David Miller wrote: > From: Pravin B Shelar > Date: Wed, 23 Dec 2015 15:52:03 -0800 > >> } else { >> - err_stats->tx_dropped++; >> + struct net_device_stats *err_stats = &dev->stats; >> + >> + if (err < 0) { >> +

Re: [PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-23 Thread David Miller
From: Pravin B Shelar Date: Wed, 23 Dec 2015 15:52:03 -0800 > } else { > - err_stats->tx_dropped++; > + struct net_device_stats *err_stats = &dev->stats; > + > + if (err < 0) { > + err_stats->tx_errors++; > + err_st

[PATCH net-next v2] ip_tunnel: Move stats update to iptunnel_xmit()

2015-12-23 Thread Pravin B Shelar
By moving stats update into iptunnel_xmit(), we can simplify iptunnel_xmit() usage. With this change there is no need to call another function (iptunnel_xmit_stats()) to update stats in tunnel xmit code path. Signed-off-by: Pravin B Shelar --- v1-v2: - keep iptunnel_xmit_stats() stats update same