On Wed, Apr 18, 2018 at 08:02:35PM +0200, Thomas Monjalon wrote: > 18/04/2018 18:45, Ananyev, Konstantin: > > From: Thomas Monjalon > > > 18/04/2018 15:58, Xueming Li: > > > > The new flag PKT_TX_TUNNEL_IP is redundant with PKT_TX_OUTER_IP_CKSUM. > > > > The old flag PKT_TX_OUTER_IP_CKSUM can be deprecated and removed in > > > > later release. > > > > > > > > Signed-off-by: Xueming Li <xuemi...@mellanox.com> > > > > > > Except a small comment below, it looks OK. > > > > > > Acked-by: Thomas Monjalon <tho...@monjalon.net> > > > > > > Please send a deprecation notice for PKT_TX_OUTER_IP_CKSUM. > > > > I probably missed something, but why PKT_TX_OUTER_IP_CKSUM > > is supposed to be deprecated? > > Because PKT_TX_TUNNEL_* flags sepersede it. I think we need to discuss it. > > We use the offload flags PKT_TX_TUNNEL_* when we request some offloads > in the outer and the inner headers at the same time. > When setting a tunnel flag PKT_TX_TUNNEL_*, it can be expected that > the outer checksums will be offloaded, otherwise it is almost > impossible to request an offload in the inner header. > In the case of an UDP tunnel, any change in the inner packet will > require an UDP checksum update. > In the case of an IP tunnel, a change of the inner packet size > (like TSO) will require an IP checksum update. > > If we really require PKT_TX_OUTER_IP_CKSUM to be set in addition to > PKT_TX_TUNNEL_* flags, then we should add more PKT_TX_OUTER_*_CKSUM, > like PKT_TX_OUTER_UDP_CKSUM which is missing.
I agree, I think PKT_TX_TUNNEL_* implies PKT_TX_OUTER_IP_CKSUM. And I don't see use-case where we only need PKT_TX_OUTER_IP_CKSUM, because in that case we can use PKT_TX_IP_CKSUM. But this can be discussed in a second step, for now I think it's safer to keep it as is. Olivier