From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A4ED45718 for ; Fri, 2 Aug 2024 07:10:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7334140431; Fri, 2 Aug 2024 07:10:18 +0200 (CEST) Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by mails.dpdk.org (Postfix) with ESMTP id 23CDC40272; Fri, 2 Aug 2024 07:10:17 +0200 (CEST) Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5cdf7edddc5so3362952eaf.0; Thu, 01 Aug 2024 22:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722575416; x=1723180216; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I+2eMDPj863fZMHhj1oZift+73LUtNBAarwfKWUq1O8=; b=JExM98PvnTv8Uou8+pJ4mzxxEbIzCwISlHzqmyeXwIBGvbHEL8pwK6XYSyOrbwjUJI fu0NXKzltV88+G+zWRlioQxXN+DPQXiEDe7WqBzb5M1ybmrd6nCJQxyl32qImga7q8cX UiMOewJqscP0jQ/ESH6o2Z3vC478D2LIdWNMl9Hi+vPTkwb6KoyHdH8ICdBiTRsZiUTD CFhmvAgdCYvXJtVbL+S6r3Jjea/ch8aH0nlwsZVaeOI/VhsciHlP3TmUzc0brMhcZLm5 KN4O35/4Pkig3gnkwqHaTnaHEAhbc0VwLi9tzCcI/ETK0Q1Pdx+xze8KwUf/1y7JlO9T 3Jeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722575416; x=1723180216; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I+2eMDPj863fZMHhj1oZift+73LUtNBAarwfKWUq1O8=; b=II+vI26Z29wFGbnrIth68PbF1cNhP8udFxu74kl/eN82fd0KVBOyd/lbM7EiRBGyBa R8bMhvXk9k/ywbe+8siVwyY0ZJg0MLwEm8r+tYJgGwUUY7NHb0EY16a0Oxw55VZuwGAk lYCtBPd3/yy3xXyBWikpAL8jm19zgQiGyVKO1aWuZlstJRZso2qkNhgTGVRF7EthTD7U OPhqvfF3Hwqjj0KVGUCakmaoprz/smojk1eLhEsKkhUmSqYurvPKUTLfUkz3Ucagvtn8 tT5haJvTKOyIwiiEKgD8G3DOHPLUpi4vE586YQ12LKx9x9/g/c7BQV8kuf7a698a886a yEZA== X-Forwarded-Encrypted: i=1; AJvYcCVxZAg3jt8RYwyg4y1TRQvO37HMNald5+vQH9QN/6Z3FlDxtO+mGNJzhuWNRFqoY2EsWJiaeiCtCmIV4zQ= X-Gm-Message-State: AOJu0YztPDtCQKL6EDAyhIN4Sm/4nI+uYPJhyj7uW8aIcc5goGudAtMJ HGU0d3dZQ33e7jTk2kX5f1TaOlEvMIuk1KaiOsSfzouXi/VEq6m+KVwlb4zIcjasuiVGLx7iX9Q ncrJ7A4+9JwMQvPklo7EBQ7/yCCc= X-Google-Smtp-Source: AGHT+IHGb4dV9ZuOsHFDxukVydSYWFGLs+iNoQKRrxGFrUWHeziAWZQU+HIj05gbjaQmg6yG7Odr2oBuuId/xXtUTTM= X-Received: by 2002:a05:6359:4c85:b0:1a6:4ef2:86c7 with SMTP id e5c5f4694b2df-1af3ba4b7cdmr281438455d.14.1722575416185; Thu, 01 Aug 2024 22:10:16 -0700 (PDT) MIME-Version: 1.0 References: <1722443901-2400194-1-git-send-email-tathagat.dpdk@gmail.com> <1722575288-2408630-1-git-send-email-tathagat.dpdk@gmail.com> In-Reply-To: <1722575288-2408630-1-git-send-email-tathagat.dpdk@gmail.com> From: Tathagat Priyadarshi Date: Fri, 2 Aug 2024 10:40:05 +0530 Message-ID: Subject: Re: [PATCH v5] net/gve : Update EOP & csum bit in txd rte_mbuf chain To: stephen@networkplumber.org, dev@dpdk.org Cc: stable@dpdk.org, Varun Lakkur Ambaji Rao , Joshua Washington Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Updated the if-else block with an optimised inverse operator. Thanks for your suggestion Stephen. On Fri, Aug 2, 2024 at 10:36=E2=80=AFAM Tathagat Priyadarshi wrote: > > The EOP and csum bit was not set for all the packets in mbuf chain > causing packet transmission stalls for packets split across > mbuf in chain. > > Fixes: 4022f99 ("net/gve: support basic Tx data path for DQO") > Cc: stable@dpdk.org > > Signed-off-by: Tathagat Priyadarshi > Signed-off-by: Varun Lakkur Ambaji Rao > > Acked-by: Joshua Washington > --- > drivers/net/gve/gve_tx_dqo.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c > index a65e6aa..bbaf46d 100644 > --- a/drivers/net/gve/gve_tx_dqo.c > +++ b/drivers/net/gve/gve_tx_dqo.c > @@ -89,6 +89,7 @@ > uint16_t sw_id; > uint64_t bytes; > uint16_t first_sw_id; > + uint8_t csum; > > sw_ring =3D txq->sw_ring; > txr =3D txq->tx_ring; > @@ -114,6 +115,9 @@ > ol_flags =3D tx_pkt->ol_flags; > nb_used =3D tx_pkt->nb_segs; > first_sw_id =3D sw_id; > + > + csum =3D !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO); > + > do { > if (sw_ring[sw_id] !=3D NULL) > PMD_DRV_LOG(DEBUG, "Overwriting an entry = in sw_ring"); > @@ -126,6 +130,8 @@ > txd->pkt.dtype =3D GVE_TX_PKT_DESC_DTYPE_DQO; > txd->pkt.compl_tag =3D rte_cpu_to_le_16(first_sw_= id); > txd->pkt.buf_size =3D RTE_MIN(tx_pkt->data_len, G= VE_TX_MAX_BUF_SIZE_DQO); > + txd->pkt.end_of_packet =3D 0; > + txd->pkt.checksum_offload_enable =3D csum; > > /* size of desc_ring and sw_ring could be differe= nt */ > tx_id =3D (tx_id + 1) & mask; > @@ -138,9 +144,6 @@ > /* fill the last descriptor with End of Packet (EOP) bit = */ > txd->pkt.end_of_packet =3D 1; > > - if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO) > - txd->pkt.checksum_offload_enable =3D 1; > - > txq->nb_free -=3D nb_used; > txq->nb_used +=3D nb_used; > } > -- > 1.8.3.1 >