app/test: fix TCP header initialization
PATCH 1/1 app/test: fix TCP header initialization
Initialize TCP data offset field with TCP header length, this field is used to derive L4 header length and by hardware to validate a TCP header.
Fixes 41f72ec94074 ("test: add packet burst generator functions")
Signed-off-by Lance Richardson <[email protected]>
--- app/test/packet_burst_generator.c | 1 + 1 file changed, 1 insertion(+)
app/test/packet_burst_generator.c +1 -0
@@ -117,6 +117,7 @@ initialize_tcp_header(struct rte_tcp_hdr *tcp_hdr, uint16_t src_port,memset (tcp_hdr,0 ,sizeof (struct rte_tcp_hdr )); tcp_hdr->src_port =rte_cpu_to_be_16 (src_port); tcp_hdr->dst_port =rte_cpu_to_be_16 (dst_port); + tcp_hdr->data_off = (sizeof (struct rte_tcp_hdr ) <<2 ) &0xF0 ;return pkt_len; }
Signature · 1 line
2.25.1
Quoted 8 lines · Lance Richardson
Initialize TCP data offset field with TCP header length, this field is used to derive L4 header length and by hardware to validate a TCP header.
Fixes 41f72ec94074 ("test: add packet burst generator functions")Signed-off-by Lance Richardson <[email protected]>
Reviewed-by Ferruh Yigit <[email protected]>
Ferruh Yigit
AppliedQuoted 11 lines · Ferruh Yigit
Quoted 8 lines · Lance Richardson
Initialize TCP data offset field with TCP header length, this field is used to derive L4 header length and by hardware to validate a TCP header.
Fixes 41f72ec94074 ("test: add packet burst generator functions")Signed-off-by Lance Richardson <[email protected]>Reviewed-by Ferruh Yigit <[email protected]>
Applied to dpdk-next-net/main, thanks.