| 225 | } |
| 226 | |
| 227 | static void |
| 228 | ionic_tx_tcp_pseudo_csum(struct rte_mbuf *txm) |
| 229 | { |
| 230 | struct ether_hdr *eth_hdr = rte_pktmbuf_mtod(txm, struct ether_hdr *); |
| 231 | char *l3_hdr = ((char *)eth_hdr) + txm->l2_len; |
| 232 | struct rte_tcp_hdr *tcp_hdr = (struct rte_tcp_hdr *) |
| 233 | (l3_hdr + txm->l3_len); |
| 234 | |
| 235 | if (txm->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { |
| 236 | struct rte_ipv4_hdr *ipv4_hdr = (struct rte_ipv4_hdr *)l3_hdr; |
| 237 | ipv4_hdr->hdr_checksum = 0; |
| 238 | tcp_hdr->cksum = 0; |
| 239 | tcp_hdr->cksum = rte_ipv4_udptcp_cksum(ipv4_hdr, tcp_hdr); |
| 240 | } else { |
| 241 | struct rte_ipv6_hdr *ipv6_hdr = (struct rte_ipv6_hdr *)l3_hdr; |
| 242 | tcp_hdr->cksum = 0; |
| 243 | tcp_hdr->cksum = rte_ipv6_udptcp_cksum(ipv6_hdr, tcp_hdr); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | static void |
| 248 | ionic_tx_tcp_inner_pseudo_csum(struct rte_mbuf *txm) |
no test coverage detected