* Internal function which updates the TCP header of a packet, following * segmentation. This is required to update the header's 'sent' sequence * number, and also to clear 'PSH' and 'FIN' flags for non-tail segments. * * @param pkt * The packet containing the TCP header. * @param l4_offset * The offset of the TCP header from the start of the packet. * @param sent_seq * The sent sequenc
| 72 | * Indicates whether or not this is a tail segment. |
| 73 | */ |
| 74 | static inline void |
| 75 | update_tcp_header(struct rte_mbuf *pkt, uint16_t l4_offset, uint32_t sent_seq, |
| 76 | uint8_t non_tail) |
| 77 | { |
| 78 | struct rte_tcp_hdr *tcp_hdr; |
| 79 | |
| 80 | tcp_hdr = (struct rte_tcp_hdr *)(rte_pktmbuf_mtod(pkt, char *) + |
| 81 | l4_offset); |
| 82 | tcp_hdr->sent_seq = rte_cpu_to_be_32(sent_seq); |
| 83 | if (likely(non_tail)) |
| 84 | tcp_hdr->tcp_flags &= (~(TCP_HDR_PSH_MASK | |
| 85 | TCP_HDR_FIN_MASK)); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Internal function which updates the IPv4 header of a packet, following |
no outgoing calls
no test coverage detected