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: <87y4q79bzi.fsf@tassilo.jf.intel.com>
Date:	Tue, 16 Dec 2014 19:44:17 -0800
From:	Andi Kleen <andi@...stfloor.org>
To:	rapier <rapier@....edu>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/3] Implementation of RFC 4898 Extended TCP Statistics (Web10G)

rapier <rapier@....edu> writes:
> +
> +void tcp_estats_update_rtt(struct sock *sk, unsigned long rtt_sample)
> +{
> +	struct tcp_estats *stats = tcp_sk(sk)->tcp_stats;
> +	struct tcp_estats_path_table *path_table = stats->tables.path_table;
> +	unsigned long rtt_sample_msec = rtt_sample/1000;
> +	u32 rto;
> +
> +	if (path_table == NULL)
> +		return;
> +
> +	path_table->SampleRTT = rtt_sample_msec;
> +
> +	if (rtt_sample_msec > path_table->MaxRTT)
> +		path_table->MaxRTT = rtt_sample_msec;
> +	if (rtt_sample_msec < path_table->MinRTT)
> +		path_table->MinRTT = rtt_sample_msec;
> +
> +	path_table->CountRTT++;
> +	path_table->SumRTT += rtt_sample_msec;
> +
> +	rto = jiffies_to_msecs(inet_csk(sk)->icsk_rto);
> +	if (rto > path_table->MaxRTO)
> +		path_table->MaxRTO = rto;
> +	if (rto < path_table->MinRTO)
> +		path_table->MinRTO = rto;

Looking through your hooks it seem that many basically do simple
value profiling in a very open coded way.

Perhaps you could simplify things a lot by just having a couple of trace
points for these values (e.g. trace_change_rtt). Then have a library
of different data profiling types.

Then you could register a new value oriented trace point type with
different backend for whatever you currently need from the value: like
min/max/avg/ or full histogram or even reservoir sampling or EWMA.

I guess such a generic infrastructure would be useful elsewhere too.

One challenge would be how to associate such value profiles with
sockets, but I'm sure this could be done in some nice generic
way too.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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