Lines Matching +full:compute +full:-

1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
13 * rxe_crc32() - Compute cumulative crc32 for a contiguous segment
27 * rxe_icrc_hdr() - Compute the partial ICRC for the network and transport
44 (skb->protocol == htons(ETH_P_IP) ? in rxe_icrc_hdr()
58 if (skb->protocol == htons(ETH_P_IP)) { /* IPv4 */ in rxe_icrc_hdr()
63 ip4h->ttl = 0xff; in rxe_icrc_hdr()
64 ip4h->check = CSUM_MANGLED_0; in rxe_icrc_hdr()
65 ip4h->tos = 0xff; in rxe_icrc_hdr()
71 memset(ip6h->flow_lbl, 0xff, sizeof(ip6h->flow_lbl)); in rxe_icrc_hdr()
72 ip6h->priority = 0xf; in rxe_icrc_hdr()
73 ip6h->hop_limit = 0xff; in rxe_icrc_hdr()
75 udph->check = CSUM_MANGLED_0; in rxe_icrc_hdr()
79 memcpy(&pshdr[bth_offset], pkt->hdr, RXE_BTH_BYTES); in rxe_icrc_hdr()
83 bth->qpn |= cpu_to_be32(~BTH_QPN_MASK); in rxe_icrc_hdr()
86 crc = rxe_crc32(pkt->rxe, crc, pshdr, length); in rxe_icrc_hdr()
88 /* And finish to compute the CRC on the remainder of the headers. */ in rxe_icrc_hdr()
89 crc = rxe_crc32(pkt->rxe, crc, pkt->hdr + RXE_BTH_BYTES, in rxe_icrc_hdr()
90 rxe_opcode[pkt->opcode].length - RXE_BTH_BYTES); in rxe_icrc_hdr()
95 * rxe_icrc_check() - Compute ICRC for a packet and compare to the ICRC
108 icrcp = (__be32 *)(pkt->hdr + pkt->paylen - RXE_ICRC_SIZE); in rxe_icrc_check()
112 icrc = rxe_crc32(pkt->rxe, icrc, (u8 *)payload_addr(pkt), in rxe_icrc_check()
117 return -EINVAL; in rxe_icrc_check()
123 * rxe_icrc_generate() - compute ICRC for a packet.
132 icrcp = (__be32 *)(pkt->hdr + pkt->paylen - RXE_ICRC_SIZE); in rxe_icrc_generate()
134 icrc = rxe_crc32(pkt->rxe, icrc, (u8 *)payload_addr(pkt), in rxe_icrc_generate()