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 31C314576E; Thu, 8 Aug 2024 20:21:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACCF44278D; Thu, 8 Aug 2024 20:21:45 +0200 (CEST) Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by mails.dpdk.org (Postfix) with ESMTP id 29BC64066F for ; Thu, 8 Aug 2024 20:21:44 +0200 (CEST) Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-e0bf9602db6so1258089276.1 for ; Thu, 08 Aug 2024 11:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723141303; x=1723746103; darn=dpdk.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RGOQlg3eaLjSoMh+ZyaPxu3libw44+K6M+1IaWnkvfg=; b=RGGdr7KMjuu5zA50p4IW9IGM4R+DVMw3IQRxC6lVk2MHXOjKdxFL0w9hZfGA1VRRae boXwH7cMPQh7XZryVUx+8xFaGh6J+xUAsPjmDttVowi4+pyNpvJNgQ4c8kjI804BlVK0 ouMoUGf9YtFEK//fcVjtQyG2PNKAXlKLQxpf1LnbGLTefRxeeILlA/kmQlxs7rMQZBAc 7YN0ZRVN0+jISFtmLrBlWmkb9p6mFoAScG0ofLHfDIZ3ekEmSXGUoCVidE1lb1hmxe3u sGTu8cpBmK0TYPNWs6FZ8D3Xkoa9IWQUyPwkFbrYEHCE87bVH3VRPa975AYhgQ0M/tjb swwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723141303; x=1723746103; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RGOQlg3eaLjSoMh+ZyaPxu3libw44+K6M+1IaWnkvfg=; b=dIHORY0DbfOzguJBsiKLFlSUPHt/bf5d0I8oh82wyIWjDI3wIoM64xD714zrq1uPNc 3XTKIq1C3nxOVJhjyxhka6DgvHp3uBu3cwiJd6+3YMcJ39qyxaFYJcVhCInQWPww3se3 37D0S9Q6Jfh3V7/j1MIyJr2W9HUy4WEBhA6PxBWtiZZadMy8nSIZjff6HWDRBTP2Tynz /iNlsVQqav88WocVkC8ElcRTqiLkctdjtFrdsGh4ocITRYSk6dI7uK53HB5XWxRYb8SM nUI27L123ViTtdZhVrGXmLT+pBXgfF7n0GKO5z7hDJhDGlNcXYbqMQJjgQY6nxolYPdp M8uQ== X-Gm-Message-State: AOJu0YxRli07lSz16FfV0HRpwSdrHR4O2YDLIst9cC3S2TBUKXDrdqjm 7X2HlR+7qD/+cd2u9oC6B/AhajAxwwjI5wLsDyS3I5XLIcV9uGGR X-Google-Smtp-Source: AGHT+IEjOkDT+ZpvDYBlDhUk8koIJbf2xXzuz+WN+NE9YPyx42eterQQ+hTvp51b+ecGuZjLbH0P2g== X-Received: by 2002:a05:6902:1505:b0:e03:227c:cf98 with SMTP id 3f1490d57ef6-e0e9dbf3e0cmr3531075276.37.1723141303177; Thu, 08 Aug 2024 11:21:43 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id 00721157ae682-691913b76casm16661187b3.131.2024.08.08.11.21.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Aug 2024 11:21:42 -0700 (PDT) From: Tathagat Priyadarshi To: rushilg@google.com, joshwash@google.com Cc: dev@dpdk.org, Tathagat Priyadarshi , Varun Lakkur Ambaji Rao Subject: [PATCH v2] net/gve: add support for TSO in DQO RDA Date: Thu, 8 Aug 2024 18:23:12 +0000 Message-Id: <1723141392-2437012-1-git-send-email-tathagat.dpdk@gmail.com> X-Mailer: git-send-email 1.8.3.1 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 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 = next; } +static inline void +gve_tx_fill_seg_desc_dqo(volatile union gve_tx_desc_dqo *desc, struct rte_mbuf *tx_pkt) +{ + uint32_t hlen = tx_pkt->l2_len + tx_pkt->l3_len + tx_pkt->l4_len; + desc->tso_ctx.cmd_dtype.dtype = GVE_TX_TSO_CTX_DESC_DTYPE_DQO; + desc->tso_ctx.cmd_dtype.tso = 1; + desc->tso_ctx.mss = (uint16_t)tx_pkt->tso_segsz; + desc->tso_ctx.tso_total_len = tx_pkt->pkt_len - hlen; + desc->tso_ctx.header_len = (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 = txq->sw_ring; @@ -109,15 +121,23 @@ gve_tx_clean_dqo(txq); } - if (txq->nb_free < tx_pkt->nb_segs) - break; - ol_flags = tx_pkt->ol_flags; nb_used = tx_pkt->nb_segs; first_sw_id = sw_id; + tso = !!(ol_flags & RTE_MBUF_F_TX_TCP_SEG); csum = !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO); + nb_used += tso; + if (txq->nb_free < nb_used) + break; + + if (tso) { + txd = &txr[tx_id]; + gve_tx_fill_seg_desc_dqo(txd, tx_pkt); + tx_id = (tx_id + 1) & mask; + } + do { if (sw_ring[sw_id] != NULL) PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring"); -- 1.8.3.1