diff options
author | Tom Herbert <tom@quantonium.net> | 2017-07-28 19:22:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-01 18:26:19 -0400 |
commit | bbb03029a899679d73e62d7e6ae80348cc5d0054 (patch) | |
tree | 33ac457d4f2fe6464309310015674afb6d553724 /net/kcm/kcmproc.c | |
parent | 20bf50de3028cb15fa81e1d1e63ab6e0c85257fc (diff) |
strparser: Generalize strparser
Generalize strparser from more than just being used in conjunction
with read_sock. strparser will also be used in the send path with
zero proxy. The primary change is to create strp_process function
that performs the critical processing on skbs. The documentation
is also updated to reflect the new uses.
Signed-off-by: Tom Herbert <tom@quantonium.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/kcm/kcmproc.c')
-rw-r--r-- | net/kcm/kcmproc.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c index c343ac60bf50..c748e8a6a72c 100644 --- a/net/kcm/kcmproc.c +++ b/net/kcm/kcmproc.c | |||
@@ -155,8 +155,8 @@ static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq, | |||
155 | seq_printf(seq, | 155 | seq_printf(seq, |
156 | " psock-%-5u %-10llu %-16llu %-10llu %-16llu %-8d %-8d %-8d %-8d ", | 156 | " psock-%-5u %-10llu %-16llu %-10llu %-16llu %-8d %-8d %-8d %-8d ", |
157 | psock->index, | 157 | psock->index, |
158 | psock->strp.stats.rx_msgs, | 158 | psock->strp.stats.msgs, |
159 | psock->strp.stats.rx_bytes, | 159 | psock->strp.stats.bytes, |
160 | psock->stats.tx_msgs, | 160 | psock->stats.tx_msgs, |
161 | psock->stats.tx_bytes, | 161 | psock->stats.tx_bytes, |
162 | psock->sk->sk_receive_queue.qlen, | 162 | psock->sk->sk_receive_queue.qlen, |
@@ -170,22 +170,22 @@ static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq, | |||
170 | if (psock->tx_stopped) | 170 | if (psock->tx_stopped) |
171 | seq_puts(seq, "TxStop "); | 171 | seq_puts(seq, "TxStop "); |
172 | 172 | ||
173 | if (psock->strp.rx_stopped) | 173 | if (psock->strp.stopped) |
174 | seq_puts(seq, "RxStop "); | 174 | seq_puts(seq, "RxStop "); |
175 | 175 | ||
176 | if (psock->tx_kcm) | 176 | if (psock->tx_kcm) |
177 | seq_printf(seq, "Rsvd-%d ", psock->tx_kcm->index); | 177 | seq_printf(seq, "Rsvd-%d ", psock->tx_kcm->index); |
178 | 178 | ||
179 | if (!psock->strp.rx_paused && !psock->ready_rx_msg) { | 179 | if (!psock->strp.paused && !psock->ready_rx_msg) { |
180 | if (psock->sk->sk_receive_queue.qlen) { | 180 | if (psock->sk->sk_receive_queue.qlen) { |
181 | if (psock->strp.rx_need_bytes) | 181 | if (psock->strp.need_bytes) |
182 | seq_printf(seq, "RxWait=%u ", | 182 | seq_printf(seq, "RxWait=%u ", |
183 | psock->strp.rx_need_bytes); | 183 | psock->strp.need_bytes); |
184 | else | 184 | else |
185 | seq_printf(seq, "RxWait "); | 185 | seq_printf(seq, "RxWait "); |
186 | } | 186 | } |
187 | } else { | 187 | } else { |
188 | if (psock->strp.rx_paused) | 188 | if (psock->strp.paused) |
189 | seq_puts(seq, "RxPause "); | 189 | seq_puts(seq, "RxPause "); |
190 | 190 | ||
191 | if (psock->ready_rx_msg) | 191 | if (psock->ready_rx_msg) |
@@ -371,20 +371,20 @@ static int kcm_stats_seq_show(struct seq_file *seq, void *v) | |||
371 | seq_printf(seq, | 371 | seq_printf(seq, |
372 | "%-8s %-10llu %-16llu %-10llu %-16llu %-10llu %-10llu %-10u %-10u %-10u %-10u %-10u %-10u %-10u %-10u %-10u\n", | 372 | "%-8s %-10llu %-16llu %-10llu %-16llu %-10llu %-10llu %-10u %-10u %-10u %-10u %-10u %-10u %-10u %-10u %-10u\n", |
373 | "", | 373 | "", |
374 | strp_stats.rx_msgs, | 374 | strp_stats.msgs, |
375 | strp_stats.rx_bytes, | 375 | strp_stats.bytes, |
376 | psock_stats.tx_msgs, | 376 | psock_stats.tx_msgs, |
377 | psock_stats.tx_bytes, | 377 | psock_stats.tx_bytes, |
378 | psock_stats.reserved, | 378 | psock_stats.reserved, |
379 | psock_stats.unreserved, | 379 | psock_stats.unreserved, |
380 | strp_stats.rx_aborts, | 380 | strp_stats.aborts, |
381 | strp_stats.rx_interrupted, | 381 | strp_stats.interrupted, |
382 | strp_stats.rx_unrecov_intr, | 382 | strp_stats.unrecov_intr, |
383 | strp_stats.rx_mem_fail, | 383 | strp_stats.mem_fail, |
384 | strp_stats.rx_need_more_hdr, | 384 | strp_stats.need_more_hdr, |
385 | strp_stats.rx_bad_hdr_len, | 385 | strp_stats.bad_hdr_len, |
386 | strp_stats.rx_msg_too_big, | 386 | strp_stats.msg_too_big, |
387 | strp_stats.rx_msg_timeouts, | 387 | strp_stats.msg_timeouts, |
388 | psock_stats.tx_aborts); | 388 | psock_stats.tx_aborts); |
389 | 389 | ||
390 | return 0; | 390 | return 0; |