[dpdk-dev] [PATCH v1] gso: fix marking TCP checksum flag in TCP segments

Hu, Jiayu jiayu.hu at intel.com
Wed Apr 25 03:51:08 CEST 2018


Hi Ophir,

> -----Original Message-----
> From: Ophir Munk [mailto:ophirmu at mellanox.com]
> Sent: Tuesday, April 24, 2018 9:53 PM
> To: Hu, Jiayu <jiayu.hu at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; dev at dpdk.org
> Cc: Thomas Monjalon <thomas at monjalon.net>; Olga Shern
> <olgas at mellanox.com>; Pascal Mazon <pascal.mazon at 6wind.com>;
> stable at dpdk.org
> Subject: RE: [PATCH v1] gso: fix marking TCP checksum flag in TCP
> segments
> 
> Hi Jiayu,
> 
> > -----Original Message-----
> > From: Hu, Jiayu [mailto:jiayu.hu at intel.com]
> > Sent: Tuesday, April 24, 2018 3:56 PM
> > To: Ananyev, Konstantin <konstantin.ananyev at intel.com>; Ophir Munk
> > <ophirmu at mellanox.com>; dev at dpdk.org
> > Cc: Thomas Monjalon <thomas at monjalon.net>; Olga Shern
> > <olgas at mellanox.com>; Pascal Mazon <pascal.mazon at 6wind.com>;
> > stable at dpdk.org
> > Subject: RE: [PATCH v1] gso: fix marking TCP checksum flag in TCP
> segments
> >
> > Hi Konstantin and Ophir,
> >
> ...
> > > Another possibility - might be make chages in librte_gso to allow user
> > > to specify what flags to set for the output packets (probably via
> > > rte_gso_ctx.flag)
> >
> > It would be a solution. We can add flags to rte_gso_ctx.flag and the GSO
> > library can do some extra work (like checksum) according to the flags.
> >
> 
> I think that calculating TCP checksums by GSO library should be optional (if
> at all).
> In my case I prefer TAP PMD to do the work which is TAP-specific.
> My original intention in this patch was only to mark PKT_TX_TCP_CKSUM
> flag.

One possible workaround is:
We can have many flags. Some flags are for real checksum calculation, but
some flags can be used to tell the GSO library to prepare HW TCP checksum
offloading. When preparing HW TCP checksum offloading, the GSO library can
only set TCP_CKSUM flag.

Since some the HW drivers have supported rte_eth_tx_prepare(), which
will calculate the pseudo IP header checksum, applications can call
rte_eth_tx_prepare() to do real checksum offloading preparation after calling
the GSO library.

Thanks,
Jiayu
> 
> > Thanks,
> > Jiayu
> > >
> > > Konstantin
> > >
> ...



More information about the dev mailing list