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 2CBB2456F9 for ; Wed, 31 Jul 2024 07:29:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0B4C40B90; Wed, 31 Jul 2024 07:29:43 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id D76A64065D; Wed, 31 Jul 2024 07:25:22 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1fd9e70b592so35666415ad.3; Tue, 30 Jul 2024 22:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722403522; x=1723008322; 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=u4U0DpXxmxRcbNB2L1CXHjJoqlCABB9Nti+WA1dF6Sk=; b=MPkRIw6rGkEFyrwZGeYbc0OGPNEvoUUHjj2uVrZhfcAzrWp6Lqj7uaRXLnUYbMlOzx 4AuirLJu+qDC85JKSw+nHc3iMtMXUFUyri5cEurMh0c9sldsi1we0qpdHK5ho5cZNLcz x4Tcwge8lDVQs8qDlE8b2fym8+zImoNSQzvd3jfB6SrjXK+NKElOHcnfTVFCiPkO5Ul9 ECx6gmiy5Ud0ESGg7crkK+QGTOV5QBqhkend7BoVMjwcbXZlXndarwug/e1Bt2EkUH+p T3kUPPRNdzFOgj1UWaMNykB2cIiHddh5HQjQ/xuKP7MrF+UFYovqz7fVFpRHI1MbumDu GNqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722403522; x=1723008322; 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=u4U0DpXxmxRcbNB2L1CXHjJoqlCABB9Nti+WA1dF6Sk=; b=ZYCBbzFiF76rHEaQ66zgF7y0LKzVVd4j+CIlftAFLykB7/Wdpse0JGduYj1wL9NnZY Yl81GWyvvYrHZ0vH9MTmIocNGSwOcgZito4k0wV/JMHfE8pdrJTDnvMKkj+lLd/wDNPU OJrUdwIXExYF8XMKFJy042sW4YDiaIdVUbnYN61B9ZFCPr5K1l34R2qRjNVQUahTaT9U LPDqRov7BBJU0amQk/e2sRlJEawf6zaaKC7FpHCK5LZIQDM269CGJzugJinlNMd6KrvA U/b7KU8tOoPJyxuJPuSznUacJIAwqHXCyz8dEtQlk87pWvQQIFPl/6QABKIOejjeXh8B J1kg== X-Forwarded-Encrypted: i=1; AJvYcCVNUR2NxnCdP90Rbr3WwcwJUlaOviixql9cbQzcNVZTgHNGTNdgExvNgh/LWh02J3aEple8Xhsv+QRfz9k7hWo= X-Gm-Message-State: AOJu0Yz/c467R/d0N4BwDnJkAOsN/q8FC+7wfZxnIGcLOgsXx/bTRBzx Lj3SuTAgDzh7JTvTlHHcGmrmI3AwFuYoedH6onNDM6QWuU3YBpOC0Xp0RXks X-Google-Smtp-Source: AGHT+IGKNKUs/uOgaee4UcXiNFb5JMpcoLAiEE6tdbSS4SycA5LAhprX3sxvfgTQw1FG0wR01LBDLA== X-Received: by 2002:a17:902:ec8b:b0:1fd:9c2d:2ef1 with SMTP id d9443c01a7336-1ff0485bb83mr133473355ad.53.1722403521820; Tue, 30 Jul 2024 22:25:21 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7c89933sm111198775ad.33.2024.07.30.22.25.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2024 22:25:21 -0700 (PDT) From: Tathagat Priyadarshi To: dev@dpdk.org Cc: Tathagat Priyadarshi , stable@dpdk.org Subject: [PATCH v2] net/gve: Fix TX/RX queue setup and stop Date: Wed, 31 Jul 2024 05:26:43 +0000 Message-Id: <1722403603-2399714-1-git-send-email-tathagat.dpdk@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1721914264-2394611-1-git-send-email-tathagat.dpdk@gmail.com> References: <1721914264-2394611-1-git-send-email-tathagat.dpdk@gmail.com> 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 The PR aims to update the TX/RQ queue setup/stop routines that are unique to DQO, so that they may be called for instances that use the DQO RDA format during dev start/stop Fixes: b044845 ("net/gve: support queue start/stop") Cc: stable@dpdk.org Signed-off-by: Tathagat Priyadarshi --- drivers/net/gve/gve_ethdev.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c index ca92277..a20092e 100644 --- a/drivers/net/gve/gve_ethdev.c +++ b/drivers/net/gve/gve_ethdev.c @@ -288,11 +288,16 @@ struct gve_queue_page_list * PMD_DRV_LOG(ERR, "Failed to create %u tx queues.", num_queues); return ret; } - for (i = 0; i < num_queues; i++) - if (gve_tx_queue_start(dev, i) != 0) { + for (i = 0; i < num_queues; i++) { + if (gve_is_gqi(priv)) + ret = gve_tx_queue_start(dev, i); + else + ret = gve_tx_queue_start_dqo(dev, i); + if (ret != 0) { PMD_DRV_LOG(ERR, "Fail to start Tx queue %d", i); goto err_tx; } + } num_queues = dev->data->nb_rx_queues; priv->rxqs = (struct gve_rx_queue **)dev->data->rx_queues; @@ -315,9 +320,15 @@ struct gve_queue_page_list * return 0; err_rx: - gve_stop_rx_queues(dev); + if (gve_is_gqi(priv)) + gve_stop_rx_queues(dev); + else + gve_stop_rx_queues_dqo(dev); err_tx: - gve_stop_tx_queues(dev); + if (gve_is_gqi(priv)) + gve_stop_tx_queues(dev); + else + gve_stop_tx_queues_dqo(dev); return ret; } @@ -362,10 +373,16 @@ struct gve_queue_page_list * static int gve_dev_stop(struct rte_eth_dev *dev) { + struct gve_priv *priv = dev->data->dev_private; dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN; - gve_stop_tx_queues(dev); - gve_stop_rx_queues(dev); + if (gve_is_gqi(priv)) { + gve_stop_tx_queues(dev); + gve_stop_rx_queues(dev); + } else { + gve_stop_tx_queues_dqo(dev); + gve_stop_rx_queues_dqo(dev); + } dev->data->dev_started = 0; -- 1.8.3.1