Skip to content

Commit 63d0cc0

Browse files
authored
Merge pull request #852 from zcjie1/dev
set the IP-type flag for tx_csum_l4 offload
2 parents 8c60949 + 3dbcad7 commit 63d0cc0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/ff_dpdk_if.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,12 @@ ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m,
19441944
iph = (struct rte_ipv4_hdr *)(data + RTE_ETHER_HDR_LEN);
19451945
iph_len = (iph->version_ihl & 0x0f) << 2;
19461946

1947+
if (iph->version == 4) {
1948+
head->ol_flags |= RTE_MBUF_F_TX_IPV4;
1949+
} else {
1950+
head->ol_flags |= RTE_MBUF_F_TX_IPV6;
1951+
}
1952+
19471953
if (offload.tcp_csum) {
19481954
head->ol_flags |= RTE_MBUF_F_TX_TCP_CKSUM;
19491955
head->l2_len = RTE_ETHER_HDR_LEN;

0 commit comments

Comments
 (0)