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 3B428456A1; Wed, 24 Jul 2024 15:34:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2574340E3E; Wed, 24 Jul 2024 15:34:16 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id A4FD340B97 for ; Wed, 24 Jul 2024 15:34:14 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-7515437ff16so821253a12.2 for ; Wed, 24 Jul 2024 06:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721828053; x=1722432853; 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=j2QEax2BpkLrkPIzARJiZVm61/TKkdxAJo7VAXtjquw=; b=F3X3wfSqmP48ilfW4ueWRHfeOz4opr8TvycAvoMYCH0EZa04Le5zII2EIGc1zI+XLy FmOF2WHalRdbur+M1F/k9emS9CnujlQcs+DDNbY+up7EeGWvNDTeNiZUM0LwcTHn5puJ Pdxi+Q4OwdYVzSZDtj6IF31kr4MDyjI6xYoYn7lHIxTryk5QkGMK4R+gFRNtkZRGXInH 9mLM3uSYHP7gXCVxkprT++SDBH73QhMokC7dkcbu1gZf8VSe1+MUl2iXhVaVxpHAsHK/ nH6TuXWJJMMHs3Ai/DlBWGcZSPbU2ItAWUZpJPMZ3VZCDH+3YGmtFkywtalqML9WrAXv s5zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721828053; x=1722432853; 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=j2QEax2BpkLrkPIzARJiZVm61/TKkdxAJo7VAXtjquw=; b=d68XUfbYNAMj2hkybfPtXrTkYLmmWiE056aVG7/rx5NyLYXi4m39uLOsx25UyWUrU1 hV7V3vqsFdZzjGfHMGfgBl73DkOI03HAUY7R1565ECTRstJcIjLoTW9XvG7Mp5a/oIiN U9aNMFb9YQJcHkxhce62gA/o1K5k3i3GKLTZiZg0RwtbgKNoDUbteSlM3r4TlQv87ET4 YPYJyyGsjAkvo/Nub5EXF/EWF4llni+GyA/vSJU81N1hh5W0z6v1BGaKDXFRLYGTUzOv TmdiUQRJgJ3Cq1ebm9TDsT3wb1z8yfLBZPl2O6vFDhvCfso3M0jMuf9rrU5TaLO5KL35 eu/Q== X-Gm-Message-State: AOJu0YxGAohlHpDbCnGf4WAkY/Gc+wSdGwRbwfIitu2AmU1pf/6vDhiM ToQBXzwKnQy2x70ht2l2uPfvG6joGU8sesMddGDmspBkOgBbinZKmYTo1uBm X-Google-Smtp-Source: AGHT+IHGC/L5jinIFjoUS04Fs7V1Newj0fdOqIOZoULUCxfaBWuSdrP8053QH9rvL/eZZaIA7OmeTA== X-Received: by 2002:a05:6a20:1594:b0:1c0:f323:1b9d with SMTP id adf61e73a8af0-1c422880322mr16585869637.20.1721828053460; Wed, 24 Jul 2024 06:34:13 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cdb747ad27sm1589477a91.42.2024.07.24.06.34.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2024 06:34:13 -0700 (PDT) From: Tathagat Priyadarshi To: dev@dpdk.org Cc: Tathagat Priyadarshi Subject: [PATCH] net/gve: Fix TX/RX queue setup and stop Date: Wed, 24 Jul 2024 13:35:29 +0000 Message-Id: <1721828129-2393364-1-git-send-email-tathagat.dpdk@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1721800736-2392953-1-git-send-email-tathagat.dpdk@gmail.com> References: <1721800736-2392953-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 Acked-by: Joshua Washington --- 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