Home
last modified time | relevance | path

Searched refs:csk (Results 1 – 20 of 20) sorted by relevance

/linux/drivers/scsi/cxgbi/cxgb4i/
H A Dcxgb4i.c208 static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, in send_act_open_req() argument
211 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in send_act_open_req()
212 int wscale = cxgbi_sock_compute_wscale(csk->mss_idx); in send_act_open_req()
215 unsigned int qid_atid = ((unsigned int)csk->atid) | in send_act_open_req()
216 (((unsigned int)csk->rss_qid) << 14); in send_act_open_req()
220 MSS_IDX_V(csk->mss_idx) | in send_act_open_req()
221 L2T_IDX_V(((struct l2t_entry *)csk->l2t)->idx) | in send_act_open_req()
222 TX_CHAN_V(csk->tx_chan) | in send_act_open_req()
223 SMAC_SEL_V(csk->smac_idx) | in send_act_open_req()
225 RCV_BUFSIZ_V(csk->rcv_win >> 10); in send_act_open_req()
[all …]
/linux/drivers/scsi/cxgbi/cxgb3i/
H A Dcxgb3i.c157 static int push_tx_frames(struct cxgbi_sock *csk, int req_completion);
159 static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, in send_act_open_req() argument
162 unsigned int wscale = cxgbi_sock_compute_wscale(csk->rcv_win); in send_act_open_req()
168 OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, csk->atid)); in send_act_open_req()
169 req->local_port = csk->saddr.sin_port; in send_act_open_req()
170 req->peer_port = csk->daddr.sin_port; in send_act_open_req()
171 req->local_ip = csk->saddr.sin_addr.s_addr; in send_act_open_req()
172 req->peer_ip = csk->daddr.sin_addr.s_addr; in send_act_open_req()
175 V_WND_SCALE(wscale) | V_MSS_IDX(csk->mss_idx) | in send_act_open_req()
178 V_RCV_BUFSIZ(csk->rcv_win >> 10)); in send_act_open_req()
[all …]
/linux/drivers/target/iscsi/cxgbit/
H A Dcxgbit_cm.c469 struct cxgbit_sock *csk) in cxgbit_set_conn_info() argument
472 conn->login_sockaddr = csk->com.remote_addr; in cxgbit_set_conn_info()
473 conn->local_sockaddr = csk->com.local_addr; in cxgbit_set_conn_info()
479 struct cxgbit_sock *csk; in cxgbit_accept_np() local
504 csk = list_first_entry(&cnp->np_accept_list, in cxgbit_accept_np()
508 list_del_init(&csk->accept_node); in cxgbit_accept_np()
510 conn->context = csk; in cxgbit_accept_np()
511 csk->conn = conn; in cxgbit_accept_np()
513 cxgbit_set_conn_info(np, conn, csk); in cxgbit_accept_np()
598 static void __cxgbit_free_conn(struct cxgbit_sock *csk);
[all …]
H A Dcxgbit_target.c27 __cxgbit_alloc_skb(struct cxgbit_sock *csk, u32 len, bool iso) in __cxgbit_alloc_skb() argument
46 submode |= (csk->submode & CXGBIT_SUBMODE_DCRC); in __cxgbit_alloc_skb()
60 submode |= (csk->submode & CXGBIT_SUBMODE_HCRC); in __cxgbit_alloc_skb()
67 static struct sk_buff *cxgbit_alloc_skb(struct cxgbit_sock *csk, u32 len) in cxgbit_alloc_skb() argument
69 return __cxgbit_alloc_skb(csk, len, false); in cxgbit_alloc_skb()
159 cxgbit_tx_data_wr(struct cxgbit_sock *csk, struct sk_buff *skb, u32 dlen, in cxgbit_tx_data_wr() argument
163 const struct cxgb4_lld_info *lldi = &csk->com.cdev->lldi; in cxgbit_tx_data_wr()
186 req->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(csk->tid) | in cxgbit_tx_data_wr()
201 void cxgbit_push_tx_frames(struct cxgbit_sock *csk) in cxgbit_push_tx_frames() argument
205 while (csk->wr_cred && ((skb = skb_peek(&csk->txq)) != NULL)) { in cxgbit_push_tx_frames()
[all …]
H A Dcxgbit_main.c98 struct cxgbit_sock *csk; in cxgbit_close_conn() local
103 list_for_each_entry(csk, &cdev->cskq.list, list) { in cxgbit_close_conn()
108 spin_lock_bh(&csk->rxq.lock); in cxgbit_close_conn()
109 __skb_queue_tail(&csk->rxq, skb); in cxgbit_close_conn()
110 if (skb_queue_len(&csk->rxq) == 1) in cxgbit_close_conn()
112 spin_unlock_bh(&csk->rxq.lock); in cxgbit_close_conn()
115 wake_up(&csk->waitq); in cxgbit_close_conn()
173 cxgbit_process_ddpvld(struct cxgbit_sock *csk, struct cxgbit_lro_pdu_cb *pdu_cb, in cxgbit_process_ddpvld() argument
178 pr_info("tid 0x%x, status 0x%x, hcrc bad.\n", csk->tid, ddpvld); in cxgbit_process_ddpvld()
183 pr_info("tid 0x%x, status 0x%x, dcrc bad.\n", csk->tid, ddpvld); in cxgbit_process_ddpvld()
[all …]
H A Dcxgbit.h258 static inline void cxgbit_get_csk(struct cxgbit_sock *csk) in cxgbit_get_csk() argument
260 kref_get(&csk->kref); in cxgbit_get_csk()
263 static inline void cxgbit_put_csk(struct cxgbit_sock *csk) in cxgbit_put_csk() argument
265 kref_put(&csk->kref, _cxgbit_free_csk); in cxgbit_put_csk()
278 static inline void cxgbit_sock_reset_wr_list(struct cxgbit_sock *csk) in cxgbit_sock_reset_wr_list() argument
280 csk->wr_pending_tail = NULL; in cxgbit_sock_reset_wr_list()
281 csk->wr_pending_head = NULL; in cxgbit_sock_reset_wr_list()
284 static inline struct sk_buff *cxgbit_sock_peek_wr(const struct cxgbit_sock *csk) in cxgbit_sock_peek_wr() argument
286 return csk->wr_pending_head; in cxgbit_sock_peek_wr()
290 cxgbit_sock_enqueue_wr(struct cxgbit_sock *csk, struct sk_buff *skb) in cxgbit_sock_enqueue_wr() argument
[all …]
H A Dcxgbit_ddp.c98 cxgbit_ppod_write_idata(struct cxgbi_ppm *ppm, struct cxgbit_sock *csk, in cxgbit_ppod_write_idata() argument
103 struct cxgbit_device *cdev = csk->com.cdev; in cxgbit_ppod_write_idata()
110 skb = cxgbit_ppod_init_idata(cdev, ppm, idx, npods, csk->tid); in cxgbit_ppod_write_idata()
121 __skb_queue_tail(&csk->ppodq, skb); in cxgbit_ppod_write_idata()
127 cxgbit_ddp_set_map(struct cxgbi_ppm *ppm, struct cxgbit_sock *csk, in cxgbit_ddp_set_map() argument
143 ret = cxgbit_ppod_write_idata(ppm, csk, ttinfo, pidx, cnt, in cxgbit_ddp_set_map()
171 cxgbit_ddp_reserve(struct cxgbit_sock *csk, struct cxgbi_task_tag_info *ttinfo, in cxgbit_ddp_reserve() argument
174 struct cxgbit_device *cdev = csk->com.cdev; in cxgbit_ddp_reserve()
212 cxgbi_ppm_make_ppod_hdr(ppm, ttinfo->tag, csk->tid, sgl->offset, in cxgbit_ddp_reserve()
215 ret = cxgbit_ddp_set_map(ppm, csk, ttinfo); in cxgbit_ddp_reserve()
[all …]
H A Dcxgbit_lro.h22 struct cxgbit_sock *csk; member
/linux/drivers/scsi/cxgbi/
H A Dlibcxgbi.c98 struct cxgbi_sock *csk; in cxgbi_device_portmap_cleanup() local
103 csk = pmap->port_csk[i]; in cxgbi_device_portmap_cleanup()
107 csk, cdev); in cxgbi_device_portmap_cleanup()
108 spin_lock_bh(&csk->lock); in cxgbi_device_portmap_cleanup()
109 cxgbi_sock_set_flag(csk, CTPF_OFFLOAD_DOWN); in cxgbi_device_portmap_cleanup()
110 cxgbi_sock_closed(csk); in cxgbi_device_portmap_cleanup()
111 spin_unlock_bh(&csk->lock); in cxgbi_device_portmap_cleanup()
112 cxgbi_sock_put(csk); in cxgbi_device_portmap_cleanup()
424 struct cxgbi_sock *csk = pmap->port_csk[i]; in find_sock_on_port() local
426 if (csk) { in find_sock_on_port()
[all …]
H A Dlibcxgbi.h83 #define cxgbi_is_iso_config(csk) ((csk)->cdev->skb_iso_txhdr) argument
84 #define cxgbi_is_iso_disabled(csk) ((csk)->disable_iso) argument
273 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk, in cxgbi_sock_set_flag() argument
276 __set_bit(flag, &csk->flags); in cxgbi_sock_set_flag()
279 csk, csk->state, csk->flags, flag); in cxgbi_sock_set_flag()
282 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk, in cxgbi_sock_clear_flag() argument
285 __clear_bit(flag, &csk->flags); in cxgbi_sock_clear_flag()
288 csk, csk->state, csk->flags, flag); in cxgbi_sock_clear_flag()
291 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk, in cxgbi_sock_flag() argument
294 if (csk == NULL) in cxgbi_sock_flag()
[all …]
/linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/
H A Dchtls_cm.c60 struct chtls_sock *csk = kzalloc(sizeof(*csk), GFP_ATOMIC); in chtls_sock_create() local
62 if (!csk) in chtls_sock_create()
65 csk->txdata_skb_cache = alloc_skb(TXDATA_SKB_LEN, GFP_ATOMIC); in chtls_sock_create()
66 if (!csk->txdata_skb_cache) { in chtls_sock_create()
67 kfree(csk); in chtls_sock_create()
71 kref_init(&csk->kref); in chtls_sock_create()
72 csk->cdev = cdev; in chtls_sock_create()
73 skb_queue_head_init(&csk->txq); in chtls_sock_create()
74 csk->wr_skb_head = NULL; in chtls_sock_create()
75 csk->wr_skb_tail = NULL; in chtls_sock_create()
[all …]
H A Dchtls_io.c25 static bool is_tls_tx(struct chtls_sock *csk) in is_tls_tx() argument
27 return csk->tlshws.txkey >= 0; in is_tls_tx()
30 static bool is_tls_rx(struct chtls_sock *csk) in is_tls_rx() argument
32 return csk->tlshws.rxkey >= 0; in is_tls_rx()
45 struct chtls_sock *csk = rcu_dereference_sk_user_data(sk); in nos_ivs() local
47 return DIV_ROUND_UP(size, csk->tlshws.mfs); in nos_ivs()
93 struct chtls_sock *csk = rcu_dereference_sk_user_data(sk); in create_flowc_wr_skb() local
101 skb_set_queue_mapping(skb, (csk->txq_idx << 1) | CPL_PRIORITY_DATA); in create_flowc_wr_skb()
109 struct chtls_sock *csk = rcu_dereference_sk_user_data(sk); in send_flowc_wr() local
127 ret = cxgb4_immdata_send(csk->egress_dev, in send_flowc_wr()
[all …]
H A Dchtls_cm.h186 static inline void chtls_reset_wr_list(struct chtls_sock *csk) in chtls_reset_wr_list() argument
188 csk->wr_skb_head = NULL; in chtls_reset_wr_list()
189 csk->wr_skb_tail = NULL; in chtls_reset_wr_list()
192 static inline void enqueue_wr(struct chtls_sock *csk, struct sk_buff *skb) in enqueue_wr() argument
198 if (!csk->wr_skb_head) in enqueue_wr()
199 csk->wr_skb_head = skb; in enqueue_wr()
201 WR_SKB_CB(csk->wr_skb_tail)->next_wr = skb; in enqueue_wr()
202 csk->wr_skb_tail = skb; in enqueue_wr()
207 struct chtls_sock *csk = rcu_dereference_sk_user_data(sk); in dequeue_wr() local
210 skb = csk->wr_skb_head; in dequeue_wr()
[all …]
H A Dchtls_main.c495 struct chtls_sock *csk; in do_chtls_setsockopt() local
500 csk = rcu_dereference_sk_user_data(sk); in do_chtls_setsockopt()
519 crypto_info = (struct tls_crypto_info *)&csk->tlshws.crypto_info; in do_chtls_setsockopt()
565 rc = chtls_setkey(csk, keylen, optname, cipher_type); in do_chtls_setsockopt()
/linux/tools/testing/selftests/net/
H A Dsctp_hello.c33 int csk, ret, len; in do_client() local
42 csk = socket(ss.ss_family, SOCK_STREAM, IPPROTO_SCTP); in do_client()
43 if (csk < 0) { in do_client()
50 ret = bind(csk, (struct sockaddr *)&ss, len); in do_client()
58 ret = connect(csk, (struct sockaddr *)&ss, len); in do_client()
64 ret = send(csk, buf, strlen(buf) + 1, 0); in do_client()
69 close(csk); in do_client()
77 int lsk, csk, ret, len; in main() local
122 csk = accept(lsk, (struct sockaddr *)NULL, (socklen_t *)NULL); in main()
123 if (csk < 0) { in main()
[all …]
/linux/drivers/net/ethernet/broadcom/
H A Dcnic.c153 static inline void csk_hold(struct cnic_sock *csk) in csk_hold() argument
155 atomic_inc(&csk->ref_count); in csk_hold()
158 static inline void csk_put(struct cnic_sock *csk) in csk_put() argument
160 atomic_dec(&csk->ref_count); in csk_put()
286 static int cnic_in_use(struct cnic_sock *csk) in cnic_in_use() argument
288 return test_bit(SK_F_INUSE, &csk->flags); in cnic_in_use()
320 struct cnic_sock *csk) in cnic_send_nlmsg() argument
333 if (csk) { in cnic_send_nlmsg()
339 path_req.handle = (u64) csk->l5_cid; in cnic_send_nlmsg()
340 if (test_bit(SK_F_IPV6, &csk->flags)) { in cnic_send_nlmsg()
[all …]
/linux/net/kcm/
H A Dkcmsock.c49 static void report_csk_error(struct sock *csk, int err) in report_csk_error() argument
51 csk->sk_err = EPIPE; in report_csk_error()
52 sk_error_report(csk); in report_csk_error()
58 struct sock *csk = psock->sk; in kcm_abort_tx_psock() local
90 report_csk_error(csk, err); in kcm_abort_tx_psock()
1222 struct sock *csk; in kcm_attach() local
1233 csk = csock->sk; in kcm_attach()
1234 if (!csk) in kcm_attach()
1237 lock_sock(csk); in kcm_attach()
1240 if ((csk->sk_family != AF_INET && csk->sk_family != AF_INET6) || in kcm_attach()
[all …]
/linux/drivers/isdn/mISDN/
H A Dsocket.c469 struct sock *csk; in data_sock_bind() local
493 sk_for_each(csk, &data_sockets.head) { in data_sock_bind()
494 if (sk == csk) in data_sock_bind()
496 if (_pms(csk)->dev != _pms(sk)->dev) in data_sock_bind()
498 if (csk->sk_protocol >= ISDN_P_B_START) in data_sock_bind()
500 if (IS_ISDN_P_TE(csk->sk_protocol) in data_sock_bind()
/linux/drivers/scsi/bnx2i/
H A Dbnx2i_iscsi.c1582 struct cnic_sock *csk; in bnx2i_host_get_param() local
1587 csk = bnx2i_ep->cm_sk; in bnx2i_host_get_param()
1588 if (test_bit(SK_F_IPV6, &csk->flags)) in bnx2i_host_get_param()
1589 len = sprintf(buf, "%pI6\n", csk->src_ip); in bnx2i_host_get_param()
1591 len = sprintf(buf, "%pI4\n", csk->src_ip); in bnx2i_host_get_param()
/linux/include/net/
H A Dsock.h1742 static inline bool sock_allow_reclassification(const struct sock *csk) in sock_allow_reclassification() argument
1744 struct sock *sk = (struct sock *)csk; in sock_allow_reclassification()