mirror of https://github.com/F-Stack/f-stack.git
set the IP-type flag for tx_csum_l4 offload
This commit is contained in:
parent
8c6094901e
commit
3dbcad7caf
|
@ -1944,6 +1944,12 @@ ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m,
|
||||||
iph = (struct rte_ipv4_hdr *)(data + RTE_ETHER_HDR_LEN);
|
iph = (struct rte_ipv4_hdr *)(data + RTE_ETHER_HDR_LEN);
|
||||||
iph_len = (iph->version_ihl & 0x0f) << 2;
|
iph_len = (iph->version_ihl & 0x0f) << 2;
|
||||||
|
|
||||||
|
if (iph->version == 4) {
|
||||||
|
head->ol_flags |= RTE_MBUF_F_TX_IPV4;
|
||||||
|
} else {
|
||||||
|
head->ol_flags |= RTE_MBUF_F_TX_IPV6;
|
||||||
|
}
|
||||||
|
|
||||||
if (offload.tcp_csum) {
|
if (offload.tcp_csum) {
|
||||||
head->ol_flags |= RTE_MBUF_F_TX_TCP_CKSUM;
|
head->ol_flags |= RTE_MBUF_F_TX_TCP_CKSUM;
|
||||||
head->l2_len = RTE_ETHER_HDR_LEN;
|
head->l2_len = RTE_ETHER_HDR_LEN;
|
||||||
|
|
Loading…
Reference in New Issue