/* * internal.h - printk internal definitions * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #include typedef __printf(1, 0) int (*printk_func_t)(const char *fmt, va_list args); int __printf(1, 0) vprintk_default(const char *fmt, va_list args); #ifdef CONFIG_PRINTK_NMI extern raw_spinlock_t logbuf_lock; /* * printk() could not take logbuf_lock in NMI context. Instead, * it temporary stores the strings into a per-CPU buffer. * The alternative implementation is chosen transparently * via per-CPU variable. */ DECLARE_PER_CPU(printk_func_t, printk_func); static inline __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return this_cpu_read(printk_func)(fmt, args); } extern atomic_t nmi_message_lost; static inline int get_nmi_message_lost(void) { return atomic_xchg(&nmi_message_lost, 0); } #else /* CONFIG_PRINTK_NMI */ static inline __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return vprintk_default(fmt, args); } static inline int get_nmi_message_lost(void) { return 0; } #endif /* CONFIG_PRINTK_NMI */ t/log/include'>logtreecommitdiff
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2017-01-27 16:24:38 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-29 19:17:23 -0500
commit7e98102f489775d8c000884fca8a0d995ea688a9 (patch)
tree40a40dc7f485407ab82f3851f8a50ba8337525c6 /include
parentf33f4ac3d3a6e29f1c5a9d8cd1058d298f4685f4 (diff)
tcp: record pkts sent and retransmistted
Add two stats in SCM_TIMESTAMPING_OPT_STATS: TCP_NLA_DATA_SEGS_OUT: total data packets sent including retransmission TCP_NLA_TOTAL_RETRANS: total data packets retransmitted The names are picked to be consistent with corresponding fields in TCP_INFO. This allows applications that are using the timestamping API to measure latency stats to also retrive retransmission rate of application write. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')