Hi Ophir, > -----Original Message----- > From: Ophir Munk [mailto:ophi...@mellanox.com] > Sent: Tuesday, April 24, 2018 9:53 PM > To: Hu, Jiayu <jiayu...@intel.com>; Ananyev, Konstantin > <konstantin.anan...@intel.com>; dev@dpdk.org > Cc: Thomas Monjalon <tho...@monjalon.net>; Olga Shern > <ol...@mellanox.com>; Pascal Mazon <pascal.ma...@6wind.com>; > sta...@dpdk.org > Subject: RE: [PATCH v1] gso: fix marking TCP checksum flag in TCP > segments > > Hi Jiayu, > > > -----Original Message----- > > From: Hu, Jiayu [mailto:jiayu...@intel.com] > > Sent: Tuesday, April 24, 2018 3:56 PM > > To: Ananyev, Konstantin <konstantin.anan...@intel.com>; Ophir Munk > > <ophi...@mellanox.com>; dev@dpdk.org > > Cc: Thomas Monjalon <tho...@monjalon.net>; Olga Shern > > <ol...@mellanox.com>; Pascal Mazon <pascal.ma...@6wind.com>; > > sta...@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 > > > > ...