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 C5B6C456A7; Thu, 25 Jul 2024 15:30:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B55B04066F; Thu, 25 Jul 2024 15:30:30 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 71356402AB for ; Thu, 25 Jul 2024 15:29:55 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1fd66cddd4dso8579195ad.2 for ; Thu, 25 Jul 2024 06:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721914194; x=1722518994; 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=SLiAliIhtS8SVzytjx/qF9rwy10rWJ5SkxRyne94X3k=; b=WCOudMvOCklrI8JNcRtEaSFTXtQGutNXpCwNkEWHMGWMecRjH+RPYu0N1GpQv5AjsB 0vDeqEZWOe8WeeykZhEEuD/GtM3yTrc1oZ9yPNXylMK32qI2LQiAocPYxOpapL01Sc9W Az5NiFJcwEfhI+EDmuOuwUDTtZ51eVrshPYnEA+4CQF39qhMPHE2Y7xkspsii0hp+aDp y98amfQQ99RS7oXg4Hml0BDdf3AUkZaNU0ntzIfNebUMa2XTXMtDo7t9rnk4bGJXnENb 7ghCEMLYcOAKZ+GbdrFZ+AJUj16h30FITL7yUVRfU5w0XWBPfzuITvPnxTcgHjpf1LM6 F9kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721914194; x=1722518994; 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=SLiAliIhtS8SVzytjx/qF9rwy10rWJ5SkxRyne94X3k=; b=rHLJeSZv0ZyURD588cjTfp2x21xSIiOuBpyhfQ9Ag4/4oNq3WYo+sf4dsi58CrPEJQ Eteok/KxMpIV/XrfuWtzCa9zvfsNmYwv0f09hEvAE5oHHdNsZQLD0pTAij/K7h6Fek+h dMWRvO6wzV3HHkN3ajwIXvF3cY6jRYxp4/PqiFCYwAAcfEn0NBJNbWEGNxDAIhCTZZKc ZBxDClQz3wWdn/qmSSQLCB2bDyn7dr0N0bqlU/n/IkJB8gRHn0yby0eXReg2JuR09vGI PSa3QTPGl7kwtT4Aq5ZeNHrTWRbBoRsCos66OFMcwS8sqt+7t/uxF9/I/WZydrczlDRV wCuw== X-Gm-Message-State: AOJu0YxsBA92IpxT/wDDsdKcwDGuzfAhyb/1AWEi3s+ljQp8L/LvGJWO g5SmdcCN9NXkQj56T2IMEA6H/QiBM5Vp8NiCHaeNRIOavvLWrwE1VHtD9IBq X-Google-Smtp-Source: AGHT+IHTz7yL8D63oJ5oeA5GO3PkiaGhdmyvqT5eaSmWFs6zxNRG3Y8aJBkMDPvbfKEPet2QJ7nBew== X-Received: by 2002:a17:902:f60d:b0:1fd:89c1:49d6 with SMTP id d9443c01a7336-1fed3aed2cbmr32282965ad.44.1721914194343; Thu, 25 Jul 2024 06:29:54 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7c8d9a5sm14106415ad.10.2024.07.25.06.29.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2024 06:29:54 -0700 (PDT) From: Tathagat Priyadarshi To: dev@dpdk.org Cc: Tathagat Priyadarshi Subject: [PATCH v2] net/gve: Fix TX/RX queue setup and stop Date: Thu, 25 Jul 2024 13:31:04 +0000 Message-Id: <1721914264-2394611-1-git-send-email-tathagat.dpdk@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1721828129-2393364-1-git-send-email-tathagat.dpdk@gmail.com> References: <1721828129-2393364-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 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 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