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 0290D457A7; Tue, 27 Aug 2024 05:11:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DADF402DD; Tue, 27 Aug 2024 05:11:41 +0200 (CEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id 0FFFA4027F for ; Tue, 27 Aug 2024 05:11:40 +0200 (CEST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-53345604960so5406282e87.3 for ; Mon, 26 Aug 2024 20:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724728299; x=1725333099; 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=e5FV4PSR9KtYOUy2FAILKjDl0y1OM87cPpb56o8pGO8=; b=y29LcgcxMXhdX+Zyu/rR2FfX+HQHvGXrXpLN6QmpK23pr067rhtVm2e0eJYfkb3uZH VxxyqNd9XCXwMKkwwsNK5CyIMC4bR5D9aaCPAolbJ5Egn4Wj4mUOr/21UFp+t8aoBP9e esOQ5ZiB9BB9ffElg8mcBvTfjyr/OHtNofy1UXxQX1LjKjx5iuG+/5chFrPTKDh7Sf4m yK1krftIDuF4aYmS0uUtZB9zRDXwxTRn0/Nr4aQPAhvv6ZLKCNFqa/A8ChvNb8PCY6Ja kt888CJ+3zca6FWLis3n3Y1u0zHBAejXWbpW8oNkGd8cTWYRLLD7QrHF8g/nqYqWl8K7 P/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724728299; x=1725333099; 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=e5FV4PSR9KtYOUy2FAILKjDl0y1OM87cPpb56o8pGO8=; b=ktKWW0WiEdBmQbPqyIVIyDuUDoQUlJOD1UHXFBoRtH1PucHyHimvyh48y2eBdhLKnn uhm8PGMQVtHHzSscXwNpDpCOz0UJ/+aKmMOhw4ebirSXh5LZX8ozcLa+sB14V111QB6K P6KfvZSiDLSCAAibMJ+D6xvjaAj2PisRZkjGHL0SLpjHyLdTC0KV1d313LPJwqf5NbEt dyH1IGoOMFsa9Q8JNIXzFYGHdyXGERGv19Dx7jUF29uqzIW3rQ+pCdNdbfl+b6U0c2EA g8s2isJc3T8F06JFLC5HwrPUY7mqLG1am5bUw8bapE2aUAnbuYjixYq9fnOCckgzX3EW h7dw== X-Gm-Message-State: AOJu0YyXGX/WLgf2H83uOSHMAGetkPC0tYaKTbxVqtOc3gNxIxFpQOcL entkOq1OPLQkgWMm+9Tj5NKrW/7skw1q8crLx+au17a7DcXdvHEuPRKTMDq1pmSu7DUAas/UlfJ cG25HsPAe8/RPMzZQEqBH31N4ELs85Y7KEtQk X-Google-Smtp-Source: AGHT+IFZwWTdUwagYZnwV9px5vYOSvhSZrd1F2691kV/9ZLaYlJPokVSmuw72QB3z3JWewzVxsEay1RG3oxI7o/hJIQ= X-Received: by 2002:a05:6512:ba7:b0:52b:c0b1:ab9e with SMTP id 2adb3069b0e04-5343875589fmr7716708e87.5.1724728298458; Mon, 26 Aug 2024 20:11:38 -0700 (PDT) MIME-Version: 1.0 References: <1722507548-2401507-1-git-send-email-tathagat.dpdk@gmail.com> <1723229462-2439640-1-git-send-email-tathagat.dpdk@gmail.com> In-Reply-To: <1723229462-2439640-1-git-send-email-tathagat.dpdk@gmail.com> From: Rushil Gupta Date: Mon, 26 Aug 2024 20:11:27 -0700 Message-ID: Subject: Re: [PATCH v3] net/gve: add support for TSO in DQO RDA To: Tathagat Priyadarshi Cc: dev@dpdk.org, Varun Lakkur Ambaji Rao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Rushil Gupta Thanks! On Fri, Aug 9, 2024 at 11:49=E2=80=AFAM Tathagat Priyadarshi wrote: > > The patch intends on adding support for TSO in DQO RDA format. > > Signed-off-by: Tathagat Priyadarshi > Signed-off-by: Varun Lakkur Ambaji Rao > --- > drivers/net/gve/gve_tx_dqo.c | 26 +++++++++++++++++++++++--- > 1 file changed, 23 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c > index b9d6d01..731c287 100644 > --- a/drivers/net/gve/gve_tx_dqo.c > +++ b/drivers/net/gve/gve_tx_dqo.c > @@ -72,6 +72,17 @@ > txq->complq_tail =3D next; > } > I see that we are not populating the flex metadata here like the linux driver. These metadata fields allow guest vm to send metadata to fxp. However; that can be a separate change. > +static inline void > +gve_tx_fill_seg_desc_dqo(volatile union gve_tx_desc_dqo *desc, struct rt= e_mbuf *tx_pkt) > +{ > + uint32_t hlen =3D tx_pkt->l2_len + tx_pkt->l3_len + tx_pkt->l4_le= n; > + desc->tso_ctx.cmd_dtype.dtype =3D GVE_TX_TSO_CTX_DESC_DTYPE_DQO; > + desc->tso_ctx.cmd_dtype.tso =3D 1; > + desc->tso_ctx.mss =3D (uint16_t)tx_pkt->tso_segsz; > + desc->tso_ctx.tso_total_len =3D tx_pkt->pkt_len - hlen; > + desc->tso_ctx.header_len =3D (uint8_t)hlen; > +} > + > uint16_t > gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_= pkts) > { > @@ -89,6 +100,7 @@ > uint16_t sw_id; > uint64_t bytes; > uint16_t first_sw_id; > + uint8_t tso; > uint8_t csum; > > sw_ring =3D txq->sw_ring; > @@ -109,15 +121,23 @@ > gve_tx_clean_dqo(txq); > } > > - if (txq->nb_free < tx_pkt->nb_segs) > - break; > - > ol_flags =3D tx_pkt->ol_flags; > nb_used =3D tx_pkt->nb_segs; > first_sw_id =3D sw_id; > > + tso =3D !!(ol_flags & RTE_MBUF_F_TX_TCP_SEG); > csum =3D !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO); > > + nb_used +=3D tso; > + if (txq->nb_free < nb_used) > + break; > + > + if (tso) { > + txd =3D &txr[tx_id]; > + gve_tx_fill_seg_desc_dqo(txd, tx_pkt); > + tx_id =3D (tx_id + 1) & mask; > + } > + > do { > if (sw_ring[sw_id] !=3D NULL) > PMD_DRV_LOG(DEBUG, "Overwriting an entry = in sw_ring"); > -- > 1.8.3.1 >