From patchwork Thu Aug 1 17:27:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tathagat Priyadarshi X-Patchwork-Id: 142849 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E752245715; Thu, 1 Aug 2024 19:26:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C9E940A8B; Thu, 1 Aug 2024 19:26:33 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id A79A14064A; Thu, 1 Aug 2024 19:26:31 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-70ea2f25bfaso5297862b3a.1; Thu, 01 Aug 2024 10:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722533190; x=1723137990; darn=dpdk.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=mTEgxQdGROnbiePzu35UcfhR9Fy7Jd+CPG5ucxZ1PdQ=; b=ObBXqHACiWTWdS/Ndq1BVMkGVeHa9v2laWqrgJItkwO+e9DLYT9R7e2p6/5k0VjkU1 wtqgTCxVayrPK5b+kdRUu+vjtyp+J/jvNfcl5W31vkTwA56Ej0NIyuCgioskba3/dwkT oe6eLVjd+mYzr9w9/MDdNIe+ybqtQIhkQtZfz/i6T9eaV+/XF6YK9QQrCAF7iRm0fQdL FtfjmLQ02WiKMkQZ9I8KDe2Pb86WtAhA/aSJRV2ECWKbosoA5ylsPWSq+/ONMcKd6e3d iI4hTkdQ6cezE+V826iM/ACTCZGrggLB25Uiy1q7CAmobDcFeSSblZ3tvLn2LizvMjUx hZ+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722533190; x=1723137990; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mTEgxQdGROnbiePzu35UcfhR9Fy7Jd+CPG5ucxZ1PdQ=; b=A8I0XaZSem0O7EP/I54c86nagb4tHndwXgCgFN51E7d6JIOShL3NcOMEo2MdoYTUsN WJy2a4CwZwWMTcptI5ecPuYdIEdJj7gYJWu72QyeM1IDbrHxIuQijQKZfI58ZmEfsqBY DOVIEjro4O6CWetZmY70+CTYcF41FP3wsATBcNAd372FtcNIS7fhMMHC6I15GeHknyVC 1CS18ED6c+hMUe2QZnhc3CsNSx+6YAsLfWG8TN8pa1R3fpsk1lyH4+gOqbqBVqyu5GNo zESSW+LV11TNK+s3vES7yi8RoiTt4V0kgQzC82jZcdTZ34YhOII7KCx8fmEl+7q0uEJp 0RUw== X-Forwarded-Encrypted: i=1; AJvYcCX2gKkJGz4Y64QdFWmYLdcjKxw0MpAYwveCk0qtYPpD6YLr/qON+F0T3uuvidUS2unYjSJbMU2T/eKLetqLv5E= X-Gm-Message-State: AOJu0Yy5hpLf3najMrJoDG7JpEy9RaYtPtaxL1Tlrr+sDcCOpiQUFtvY DmtLqiVBAGlwZdhgTUMqAhCpelKqgG22t4l8TDRjn4ztwK6Sf5syXivcWghf X-Google-Smtp-Source: AGHT+IHY4/ce5+q9YZ2J7EA4IzqBGS0Sys8ok7tRlF+qXfW5AWvtS44t+Q6NlPUeq0xmf7PMb8/9Wg== X-Received: by 2002:a05:6a20:a106:b0:1c4:c3a1:efbc with SMTP id adf61e73a8af0-1c6995ead21mr1397423637.39.1722533190279; Thu, 01 Aug 2024 10:26:30 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ed15accsm77266b3a.181.2024.08.01.10.26.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2024 10:26:29 -0700 (PDT) From: Tathagat Priyadarshi To: dev@dpdk.org Cc: Tathagat Priyadarshi , stable@dpdk.org, Varun Lakkur Ambaji Rao Subject: [PATCH v3] net/gve : Update EOP & csum bit in txd rte_mbuf chain Date: Thu, 1 Aug 2024 17:27:53 +0000 Message-Id: <1722533273-2405457-1-git-send-email-tathagat.dpdk@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1722443901-2400194-1-git-send-email-tathagat.dpdk@gmail.com> References: <1722443901-2400194-1-git-send-email-tathagat.dpdk@gmail.com> 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 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 --- drivers/net/gve/gve_tx_dqo.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c index a65e6aa..91db037 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 = txq->sw_ring; txr = txq->tx_ring; @@ -114,6 +115,12 @@ ol_flags = tx_pkt->ol_flags; nb_used = tx_pkt->nb_segs; first_sw_id = sw_id; + + if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO) + csum = 1; + else + cusm = 0; + do { if (sw_ring[sw_id] != NULL) PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring"); @@ -126,6 +133,8 @@ txd->pkt.dtype = GVE_TX_PKT_DESC_DTYPE_DQO; txd->pkt.compl_tag = rte_cpu_to_le_16(first_sw_id); txd->pkt.buf_size = RTE_MIN(tx_pkt->data_len, GVE_TX_MAX_BUF_SIZE_DQO); + txd->pkt.end_of_packet = 0; + txd->pkt.checksum_offload_enable = csum; /* size of desc_ring and sw_ring could be different */ tx_id = (tx_id + 1) & mask; @@ -138,9 +147,6 @@ /* fill the last descriptor with End of Packet (EOP) bit */ txd->pkt.end_of_packet = 1; - if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO) - txd->pkt.checksum_offload_enable = 1; - txq->nb_free -= nb_used; txq->nb_used += nb_used; }