lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALnjE+qnj4mZrOiCN1TpaKdxhVrJLq7Z25sDcMFqYWVa2od0pg@mail.gmail.com>
Date:	Wed, 23 Dec 2015 14:35:29 -0800
From:	Pravin Shelar <pshelar@...ira.com>
To:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] ip_tunnel: Move stats update to iptunnel_xmit()

On Wed, Dec 23, 2015 at 1:49 AM, Nicolas Dichtel
<nicolas.dichtel@...nd.com> wrote:
> Le 22/12/2015 01:34, Pravin B Shelar a écrit :
>>
>> 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 <pshelar@...ira.com>
>> ---
>
> [snip]
>>
>> +static inline void iptunnel_xmit_stats(struct net_device *dev, int err)
>>   {
>>         if (err > 0) {
>> -               struct pcpu_sw_netstats *tstats = get_cpu_ptr(stats);
>> +               struct pcpu_sw_netstats *tstats =
>> get_cpu_ptr(dev->tstats);
>>
>>                 u64_stats_update_begin(&tstats->syncp);
>>                 tstats->tx_bytes += err;
>>                 tstats->tx_packets++;
>>                 u64_stats_update_end(&tstats->syncp);
>>                 put_cpu_ptr(tstats);
>> -       } else if (err < 0) {
>> +       } else {
>> +               struct net_device_stats *err_stats = &dev->stats;
>> +
>>                 err_stats->tx_errors++;
>>                 err_stats->tx_aborted_errors++;
>> -       } else {
>> -               err_stats->tx_dropped++;
>>         }
>>   }
>
> Why do you remove the case 'err == 0'?
> At least, it needs an explanation in the commit log.

I wanted to unify all ip_out() error stats under single count, But now
I think it is better to separate that change into another patch. I
will send updated patch without this change.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ