On Thu, Apr 01, 2021 at 11:52:40AM +0200, David Marchand wrote: > Tx offload flags are of the application responsibility. > Leave the mbuf alone and check for TSO where needed. > > Signed-off-by: David Marchand <david.march...@redhat.com> > ---
The patch looks good, but maybe a better approach would be to change the documentation to require the TCP_CKSUM flag when TCP_SEG is used, otherwise this flag adjusting needs to be replicated every time TCP_SEG is used. The above could break existing applications, so perhaps doing something like below would be better and backwards compatible? Then we can remove those places tweaking the flags completely. diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h index c17dc95c5..6a0c2cdd9 100644 --- a/lib/librte_mbuf/rte_mbuf_core.h +++ b/lib/librte_mbuf/rte_mbuf_core.h @@ -298,7 +298,7 @@ extern "C" { * - if it's IPv4, set the PKT_TX_IP_CKSUM flag * - fill the mbuf offload information: l2_len, l3_len, l4_len, tso_segsz */ -#define PKT_TX_TCP_SEG (1ULL << 50) +#define PKT_TX_TCP_SEG (1ULL << 50) | PKT_TX_TCP_CKSUM /** TX IEEE1588 packet to timestamp. */ #define PKT_TX_IEEE1588_TMST (1ULL << 51) Thanks, fbl