Skip to content

Commit

Permalink
netdev-dpdk: Clear inner packet marks if no inner offloads requested.
Browse files Browse the repository at this point in the history
In some cases only outer offloads may be requested for a tunneled
packet.  In this case there is no need to mark the type of an
inner packet.  Clean these flags up to avoid potential confusion
of DPDK drivers.

Fixes: 084c808 ("userspace: Support VXLAN and GENEVE TSO.")
Acked-by: Mike Pattrick <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Mar 16, 2024
1 parent 7df30c8 commit f880976
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2607,6 +2607,15 @@ netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, struct rte_mbuf *mbuf)
(char *) dp_packet_eth(pkt);
mbuf->outer_l3_len = (char *) dp_packet_l4(pkt) -
(char *) dp_packet_l3(pkt);

/* If neither inner checksums nor TSO is requested, inner marks
* should not be set. */
if (!(mbuf->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM |
RTE_MBUF_F_TX_L4_MASK |
RTE_MBUF_F_TX_TCP_SEG))) {
mbuf->ol_flags &= ~(RTE_MBUF_F_TX_IPV4 |
RTE_MBUF_F_TX_IPV6);
}
} else {
mbuf->l2_len = (char *) dp_packet_l3(pkt) -
(char *) dp_packet_eth(pkt);
Expand Down

0 comments on commit f880976

Please sign in to comment.