From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ophir Munk Subject: Re: [PATCH v1] gso: fix marking TCP checksum flag in TCP segments Date: Sun, 22 Apr 2018 14:47:57 +0000 Message-ID: References: <1524406859-29585-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , Olga Shern , Pascal Mazon , "stable@dpdk.org" To: "dev@dpdk.org" , Jiayu Hu , "Yigit, Ferruh" Return-path: In-Reply-To: <1524406859-29585-1-git-send-email-ophirmu@mellanox.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Ferruh, Thomas, Please note that this patch should be merged before the net/tap TSO patches= : https://dpdk.org/dev/patchwork/patch/38666/ https://dpdk.org/dev/patchwork/patch/38667/ Regards, Ophir > -----Original Message----- > From: Ophir Munk > Sent: Sunday, April 22, 2018 5:21 PM > To: dev@dpdk.org; Jiayu Hu > Cc: Thomas Monjalon ; Olga Shern > ; Pascal Mazon ; Ophir > Munk ; stable@dpdk.org > Subject: [PATCH v1] gso: fix marking TCP checksum flag in TCP segments >=20 > Large TCP packets which are marked with PKT_TX_TCP_SEG flag are > segmented and the flag is cleared in the resulting segments, however, the > segments checksum is not updated. It is therefore required to set the > PKT_TX_TCP_CKSUM flag in each TCP segment in order to mark for the > sending driver the need to update the TCP checksum before transmitting th= e > segment. >=20 > Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ophir Munk > --- > lib/librte_gso/rte_gso.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c index > a44e3d4..e9ce9ce 100644 > --- a/lib/librte_gso/rte_gso.c > +++ b/lib/librte_gso/rte_gso.c > @@ -50,12 +50,14 @@ rte_gso_segment(struct rte_mbuf *pkt, > ((IS_IPV4_GRE_TCP4(pkt->ol_flags) && > (gso_ctx->gso_types & > DEV_TX_OFFLOAD_GRE_TNL_TSO)))) { > pkt->ol_flags &=3D (~PKT_TX_TCP_SEG); > + pkt->ol_flags |=3D PKT_TX_TCP_CKSUM; > ret =3D gso_tunnel_tcp4_segment(pkt, gso_size, ipid_delta, > direct_pool, indirect_pool, > pkts_out, nb_pkts_out); > } else if (IS_IPV4_TCP(pkt->ol_flags) && > (gso_ctx->gso_types & > DEV_TX_OFFLOAD_TCP_TSO)) { > pkt->ol_flags &=3D (~PKT_TX_TCP_SEG); > + pkt->ol_flags |=3D PKT_TX_TCP_CKSUM; > ret =3D gso_tcp4_segment(pkt, gso_size, ipid_delta, > direct_pool, indirect_pool, > pkts_out, nb_pkts_out); > -- > 2.7.4