kcm 109 net/kcm/kcmproc.c static void kcm_format_sock(struct kcm_sock *kcm, struct seq_file *seq, kcm 114 net/kcm/kcmproc.c kcm->index, kcm 115 net/kcm/kcmproc.c kcm->stats.rx_msgs, kcm 116 net/kcm/kcmproc.c kcm->stats.rx_bytes, kcm 117 net/kcm/kcmproc.c kcm->stats.tx_msgs, kcm 118 net/kcm/kcmproc.c kcm->stats.tx_bytes, kcm 119 net/kcm/kcmproc.c kcm->sk.sk_receive_queue.qlen, kcm 120 net/kcm/kcmproc.c sk_rmem_alloc_get(&kcm->sk), kcm 121 net/kcm/kcmproc.c kcm->sk.sk_write_queue.qlen, kcm 124 net/kcm/kcmproc.c if (kcm->tx_psock) kcm 125 net/kcm/kcmproc.c seq_printf(seq, "Psck-%u ", kcm->tx_psock->index); kcm 127 net/kcm/kcmproc.c if (kcm->tx_wait) kcm 130 net/kcm/kcmproc.c if (kcm->tx_wait_more) kcm 133 net/kcm/kcmproc.c if (kcm->rx_wait) kcm 189 net/kcm/kcmproc.c struct kcm_sock *kcm; kcm 208 net/kcm/kcmproc.c list_for_each_entry(kcm, &mux->kcm_socks, kcm_sock_list) { kcm 209 net/kcm/kcmproc.c kcm_format_sock(kcm, seq, i, &len); kcm 121 net/kcm/kcmsock.c static void kcm_rcv_ready(struct kcm_sock *kcm) kcm 123 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 127 net/kcm/kcmsock.c if (unlikely(kcm->rx_wait || kcm->rx_psock || kcm->rx_disabled)) kcm 131 net/kcm/kcmsock.c if (kcm_queue_rcv_skb(&kcm->sk, skb)) { kcm 134 net/kcm/kcmsock.c WARN_ON(!sk_rmem_alloc_get(&kcm->sk)); kcm 143 net/kcm/kcmsock.c if (kcm_queue_rcv_skb(&kcm->sk, psock->ready_rx_msg)) { kcm 145 net/kcm/kcmsock.c WARN_ON(!sk_rmem_alloc_get(&kcm->sk)); kcm 162 net/kcm/kcmsock.c list_add_tail(&kcm->wait_rx_list, kcm 163 net/kcm/kcmsock.c &kcm->mux->kcm_rx_waiters); kcm 164 net/kcm/kcmsock.c kcm->rx_wait = true; kcm 170 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sk); kcm 171 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 180 net/kcm/kcmsock.c if (!kcm->rx_wait && !kcm->rx_psock && kcm 183 net/kcm/kcmsock.c kcm_rcv_ready(kcm); kcm 221 net/kcm/kcmsock.c struct kcm_sock *kcm; kcm 233 net/kcm/kcmsock.c kcm = list_first_entry(&mux->kcm_rx_waiters, kcm 236 net/kcm/kcmsock.c if (kcm_queue_rcv_skb(&kcm->sk, skb)) { kcm 238 net/kcm/kcmsock.c list_del(&kcm->wait_rx_list); kcm 239 net/kcm/kcmsock.c kcm->rx_wait = false; kcm 254 net/kcm/kcmsock.c struct kcm_sock *kcm; kcm 279 net/kcm/kcmsock.c kcm = list_first_entry(&mux->kcm_rx_waiters, kcm 281 net/kcm/kcmsock.c list_del(&kcm->wait_rx_list); kcm 282 net/kcm/kcmsock.c kcm->rx_wait = false; kcm 284 net/kcm/kcmsock.c psock->rx_kcm = kcm; kcm 285 net/kcm/kcmsock.c kcm->rx_psock = psock; kcm 289 net/kcm/kcmsock.c return kcm; kcm 292 net/kcm/kcmsock.c static void kcm_done(struct kcm_sock *kcm); kcm 303 net/kcm/kcmsock.c struct kcm_sock *kcm = psock->rx_kcm; kcm 306 net/kcm/kcmsock.c if (!kcm) kcm 312 net/kcm/kcmsock.c kcm->rx_psock = NULL; kcm 319 net/kcm/kcmsock.c if (unlikely(kcm->done)) { kcm 325 net/kcm/kcmsock.c INIT_WORK(&kcm->done_work, kcm_done_work); kcm 326 net/kcm/kcmsock.c schedule_work(&kcm->done_work); kcm 330 net/kcm/kcmsock.c if (unlikely(kcm->rx_disabled)) { kcm 331 net/kcm/kcmsock.c requeue_rx_msgs(mux, &kcm->sk.sk_receive_queue); kcm 332 net/kcm/kcmsock.c } else if (rcv_ready || unlikely(!sk_rmem_alloc_get(&kcm->sk))) { kcm 336 net/kcm/kcmsock.c kcm_rcv_ready(kcm); kcm 359 net/kcm/kcmsock.c struct kcm_sock *kcm; kcm 362 net/kcm/kcmsock.c kcm = reserve_rx_kcm(psock, skb); kcm 363 net/kcm/kcmsock.c if (!kcm) { kcm 370 net/kcm/kcmsock.c if (kcm_queue_rcv_skb(&kcm->sk, skb)) { kcm 412 net/kcm/kcmsock.c struct kcm_sock *kcm; kcm 424 net/kcm/kcmsock.c kcm = psock->tx_kcm; kcm 425 net/kcm/kcmsock.c if (kcm && !unlikely(kcm->tx_stopped)) kcm 426 net/kcm/kcmsock.c queue_work(kcm_wq, &kcm->tx_work); kcm 433 net/kcm/kcmsock.c static void unreserve_psock(struct kcm_sock *kcm); kcm 436 net/kcm/kcmsock.c static struct kcm_psock *reserve_psock(struct kcm_sock *kcm) kcm 438 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 441 net/kcm/kcmsock.c psock = kcm->tx_psock; kcm 446 net/kcm/kcmsock.c WARN_ON(kcm->tx_wait); kcm 448 net/kcm/kcmsock.c unreserve_psock(kcm); kcm 450 net/kcm/kcmsock.c return kcm->tx_psock; kcm 458 net/kcm/kcmsock.c psock = kcm->tx_psock; kcm 460 net/kcm/kcmsock.c WARN_ON(kcm->tx_wait); kcm 462 net/kcm/kcmsock.c return kcm->tx_psock; kcm 470 net/kcm/kcmsock.c if (kcm->tx_wait) { kcm 471 net/kcm/kcmsock.c list_del(&kcm->wait_psock_list); kcm 472 net/kcm/kcmsock.c kcm->tx_wait = false; kcm 474 net/kcm/kcmsock.c kcm->tx_psock = psock; kcm 475 net/kcm/kcmsock.c psock->tx_kcm = kcm; kcm 477 net/kcm/kcmsock.c } else if (!kcm->tx_wait) { kcm 478 net/kcm/kcmsock.c list_add_tail(&kcm->wait_psock_list, kcm 480 net/kcm/kcmsock.c kcm->tx_wait = true; kcm 492 net/kcm/kcmsock.c struct kcm_sock *kcm; kcm 498 net/kcm/kcmsock.c kcm = list_first_entry(&mux->kcm_tx_waiters, kcm 501 net/kcm/kcmsock.c list_del(&kcm->wait_psock_list); kcm 502 net/kcm/kcmsock.c kcm->tx_wait = false; kcm 503 net/kcm/kcmsock.c psock->tx_kcm = kcm; kcm 510 net/kcm/kcmsock.c kcm->tx_psock = psock; kcm 512 net/kcm/kcmsock.c queue_work(kcm_wq, &kcm->tx_work); kcm 517 net/kcm/kcmsock.c static void unreserve_psock(struct kcm_sock *kcm) kcm 520 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 524 net/kcm/kcmsock.c psock = kcm->tx_psock; kcm 535 net/kcm/kcmsock.c WARN_ON(kcm->tx_wait); kcm 537 net/kcm/kcmsock.c kcm->tx_psock = NULL; kcm 563 net/kcm/kcmsock.c static void kcm_report_tx_retry(struct kcm_sock *kcm) kcm 565 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 575 net/kcm/kcmsock.c static int kcm_write_msgs(struct kcm_sock *kcm) kcm 577 net/kcm/kcmsock.c struct sock *sk = &kcm->sk; kcm 585 net/kcm/kcmsock.c kcm->tx_wait_more = false; kcm 586 net/kcm/kcmsock.c psock = kcm->tx_psock; kcm 591 net/kcm/kcmsock.c unreserve_psock(kcm); kcm 592 net/kcm/kcmsock.c kcm_report_tx_retry(kcm); kcm 620 net/kcm/kcmsock.c psock = reserve_psock(kcm); kcm 673 net/kcm/kcmsock.c unreserve_psock(kcm); kcm 676 net/kcm/kcmsock.c kcm_report_tx_retry(kcm); kcm 712 net/kcm/kcmsock.c unreserve_psock(kcm); kcm 723 net/kcm/kcmsock.c struct kcm_sock *kcm = container_of(w, struct kcm_sock, tx_work); kcm 724 net/kcm/kcmsock.c struct sock *sk = &kcm->sk; kcm 732 net/kcm/kcmsock.c err = kcm_write_msgs(kcm); kcm 736 net/kcm/kcmsock.c report_csk_error(&kcm->sk, -err); kcm 751 net/kcm/kcmsock.c static void kcm_push(struct kcm_sock *kcm) kcm 753 net/kcm/kcmsock.c if (kcm->tx_wait_more) kcm 754 net/kcm/kcmsock.c kcm_write_msgs(kcm); kcm 762 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sk); kcm 783 net/kcm/kcmsock.c if (kcm->seq_skb) { kcm 785 net/kcm/kcmsock.c head = kcm->seq_skb; kcm 800 net/kcm/kcmsock.c kcm_push(kcm); kcm 818 net/kcm/kcmsock.c kcm_push(kcm); kcm 827 net/kcm/kcmsock.c kcm_push(kcm); kcm 859 net/kcm/kcmsock.c kcm->seq_skb = NULL; kcm 860 net/kcm/kcmsock.c KCM_STATS_INCR(kcm->stats.tx_msgs); kcm 863 net/kcm/kcmsock.c kcm->tx_wait_more = true; kcm 864 net/kcm/kcmsock.c } else if (kcm->tx_wait_more || not_busy) { kcm 865 net/kcm/kcmsock.c err = kcm_write_msgs(kcm); kcm 873 net/kcm/kcmsock.c report_csk_error(&kcm->sk, -err); kcm 878 net/kcm/kcmsock.c kcm->seq_skb = head; kcm 882 net/kcm/kcmsock.c KCM_STATS_ADD(kcm->stats.tx_bytes, size); kcm 888 net/kcm/kcmsock.c kcm_push(kcm); kcm 903 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sk); kcm 919 net/kcm/kcmsock.c if (kcm->seq_skb) { kcm 921 net/kcm/kcmsock.c head = kcm->seq_skb; kcm 928 net/kcm/kcmsock.c kcm_push(kcm); kcm 939 net/kcm/kcmsock.c kcm_push(kcm); kcm 1017 net/kcm/kcmsock.c kcm_push(kcm); kcm 1029 net/kcm/kcmsock.c kcm->seq_skb = NULL; kcm 1030 net/kcm/kcmsock.c KCM_STATS_INCR(kcm->stats.tx_msgs); kcm 1034 net/kcm/kcmsock.c kcm->tx_wait_more = true; kcm 1035 net/kcm/kcmsock.c } else if (kcm->tx_wait_more || not_busy) { kcm 1036 net/kcm/kcmsock.c err = kcm_write_msgs(kcm); kcm 1044 net/kcm/kcmsock.c report_csk_error(&kcm->sk, -err); kcm 1051 net/kcm/kcmsock.c kcm->seq_skb = head; kcm 1056 net/kcm/kcmsock.c KCM_STATS_ADD(kcm->stats.tx_bytes, copied); kcm 1062 net/kcm/kcmsock.c kcm_push(kcm); kcm 1071 net/kcm/kcmsock.c if (head != kcm->seq_skb) kcm 1119 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sk); kcm 1147 net/kcm/kcmsock.c KCM_STATS_ADD(kcm->stats.rx_bytes, copied); kcm 1160 net/kcm/kcmsock.c KCM_STATS_INCR(kcm->stats.rx_msgs); kcm 1177 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sk); kcm 1207 net/kcm/kcmsock.c KCM_STATS_ADD(kcm->stats.rx_bytes, copied); kcm 1229 net/kcm/kcmsock.c static void kcm_recv_disable(struct kcm_sock *kcm) kcm 1231 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 1233 net/kcm/kcmsock.c if (kcm->rx_disabled) kcm 1238 net/kcm/kcmsock.c kcm->rx_disabled = 1; kcm 1241 net/kcm/kcmsock.c if (!kcm->rx_psock) { kcm 1242 net/kcm/kcmsock.c if (kcm->rx_wait) { kcm 1243 net/kcm/kcmsock.c list_del(&kcm->wait_rx_list); kcm 1244 net/kcm/kcmsock.c kcm->rx_wait = false; kcm 1247 net/kcm/kcmsock.c requeue_rx_msgs(mux, &kcm->sk.sk_receive_queue); kcm 1254 net/kcm/kcmsock.c static void kcm_recv_enable(struct kcm_sock *kcm) kcm 1256 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 1258 net/kcm/kcmsock.c if (!kcm->rx_disabled) kcm 1263 net/kcm/kcmsock.c kcm->rx_disabled = 0; kcm 1264 net/kcm/kcmsock.c kcm_rcv_ready(kcm); kcm 1272 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sock->sk); kcm 1289 net/kcm/kcmsock.c lock_sock(&kcm->sk); kcm 1291 net/kcm/kcmsock.c kcm_recv_disable(kcm); kcm 1293 net/kcm/kcmsock.c kcm_recv_enable(kcm); kcm 1294 net/kcm/kcmsock.c release_sock(&kcm->sk); kcm 1306 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sock->sk); kcm 1321 net/kcm/kcmsock.c val = kcm->rx_disabled; kcm 1334 net/kcm/kcmsock.c static void init_kcm_sock(struct kcm_sock *kcm, struct kcm_mux *mux) kcm 1344 net/kcm/kcmsock.c kcm->sk.sk_state = TCP_ESTABLISHED; kcm 1347 net/kcm/kcmsock.c kcm->mux = mux; kcm 1358 net/kcm/kcmsock.c list_add(&kcm->kcm_sock_list, head); kcm 1359 net/kcm/kcmsock.c kcm->index = index; kcm 1364 net/kcm/kcmsock.c INIT_WORK(&kcm->tx_work, kcm_tx_work); kcm 1367 net/kcm/kcmsock.c kcm_rcv_ready(kcm); kcm 1374 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sock->sk); kcm 1375 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 1603 net/kcm/kcmsock.c struct kcm_sock *kcm = kcm_sk(sock->sk); kcm 1604 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 1780 net/kcm/kcmsock.c static void kcm_done(struct kcm_sock *kcm) kcm 1782 net/kcm/kcmsock.c struct kcm_mux *mux = kcm->mux; kcm 1783 net/kcm/kcmsock.c struct sock *sk = &kcm->sk; kcm 1787 net/kcm/kcmsock.c if (kcm->rx_psock) { kcm 1789 net/kcm/kcmsock.c WARN_ON(kcm->done); kcm 1790 net/kcm/kcmsock.c kcm->rx_disabled = 1; kcm 1791 net/kcm/kcmsock.c kcm->done = 1; kcm 1796 net/kcm/kcmsock.c if (kcm->rx_wait) { kcm 1797 net/kcm/kcmsock.c list_del(&kcm->wait_rx_list); kcm 1798 net/kcm/kcmsock.c kcm->rx_wait = false; kcm 1811 net/kcm/kcmsock.c list_del(&kcm->kcm_sock_list); kcm 1822 net/kcm/kcmsock.c WARN_ON(kcm->rx_wait); kcm 1824 net/kcm/kcmsock.c sock_put(&kcm->sk); kcm 1833 net/kcm/kcmsock.c struct kcm_sock *kcm; kcm 1840 net/kcm/kcmsock.c kcm = kcm_sk(sk); kcm 1841 net/kcm/kcmsock.c mux = kcm->mux; kcm 1844 net/kcm/kcmsock.c kfree_skb(kcm->seq_skb); kcm 1857 net/kcm/kcmsock.c kcm->tx_stopped = 1; kcm 1862 net/kcm/kcmsock.c if (kcm->tx_wait) { kcm 1866 net/kcm/kcmsock.c list_del(&kcm->wait_psock_list); kcm 1867 net/kcm/kcmsock.c kcm->tx_wait = false; kcm 1874 net/kcm/kcmsock.c cancel_work_sync(&kcm->tx_work); kcm 1877 net/kcm/kcmsock.c psock = kcm->tx_psock; kcm 1884 net/kcm/kcmsock.c unreserve_psock(kcm); kcm 1888 net/kcm/kcmsock.c WARN_ON(kcm->tx_wait); kcm 1889 net/kcm/kcmsock.c WARN_ON(kcm->tx_psock); kcm 1893 net/kcm/kcmsock.c kcm_done(kcm);