Lines Matching full:txb
287 struct rxrpc_txbuf *txb; in rxgk_alloc_txbuf() local
325 txb = rxrpc_alloc_data_txbuf(call, alloc, 16, gfp); in rxgk_alloc_txbuf()
326 if (!txb) in rxgk_alloc_txbuf()
329 txb->crypto_header = offset; in rxgk_alloc_txbuf()
330 txb->sec_header = shdr; in rxgk_alloc_txbuf()
331 txb->offset += offset + shdr; in rxgk_alloc_txbuf()
332 txb->space = part; in rxgk_alloc_txbuf()
336 memset(txb->data + alloc - gap, 0, gap); in rxgk_alloc_txbuf()
337 return txb; in rxgk_alloc_txbuf()
345 struct rxrpc_txbuf *txb) in rxgk_secure_packet_integrity() argument
361 hdr->seq = htonl(txb->seq); in rxgk_secure_packet_integrity()
363 hdr->data_len = htonl(txb->len); in rxgk_secure_packet_integrity()
368 sg_set_buf(&sg[0], txb->data, txb->alloc_size); in rxgk_secure_packet_integrity()
371 sg, 1, txb->alloc_size, in rxgk_secure_packet_integrity()
372 txb->crypto_header, txb->sec_header + txb->len); in rxgk_secure_packet_integrity()
374 txb->pkt_len = ret; in rxgk_secure_packet_integrity()
375 if (txb->alloc_size == RXRPC_JUMBO_DATALEN) in rxgk_secure_packet_integrity()
376 txb->jumboable = true; in rxgk_secure_packet_integrity()
391 struct rxrpc_txbuf *txb) in rxgk_secure_packet_encrypted() argument
397 _enter("%x", txb->len); in rxgk_secure_packet_encrypted()
400 hdr = txb->data + txb->crypto_header; in rxgk_secure_packet_encrypted()
404 hdr->seq = htonl(txb->seq); in rxgk_secure_packet_encrypted()
406 hdr->data_len = htonl(txb->len); in rxgk_secure_packet_encrypted()
409 sg_set_buf(&sg[0], txb->data, txb->alloc_size); in rxgk_secure_packet_encrypted()
412 sg, 1, txb->alloc_size, in rxgk_secure_packet_encrypted()
413 txb->crypto_header, txb->sec_header + txb->len, in rxgk_secure_packet_encrypted()
416 txb->pkt_len = ret; in rxgk_secure_packet_encrypted()
417 if (txb->alloc_size == RXRPC_JUMBO_DATALEN) in rxgk_secure_packet_encrypted()
418 txb->jumboable = true; in rxgk_secure_packet_encrypted()
430 static int rxgk_secure_packet(struct rxrpc_call *call, struct rxrpc_txbuf *txb) in rxgk_secure_packet() argument
436 call->debug_id, key_serial(call->conn->key), txb->seq, txb->len); in rxgk_secure_packet()
449 txb->cksum = htons(gk->key_number); in rxgk_secure_packet()
454 txb->pkt_len = txb->len; in rxgk_secure_packet()
457 return rxgk_secure_packet_integrity(call, gk, txb); in rxgk_secure_packet()
459 return rxgk_secure_packet_encrypted(call, gk, txb); in rxgk_secure_packet()