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 C0FF545694; Wed, 24 Jul 2024 08:09:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97A8340A77; Wed, 24 Jul 2024 08:09:38 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id BCF39402C0 for ; Wed, 24 Jul 2024 07:57:41 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-7a1843b4cdbso1093505a12.2 for ; Tue, 23 Jul 2024 22:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721800661; x=1722405461; darn=dpdk.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fw0qrQ0eWxlVJkGzJIda/SS7NehOy77rMTgqGWSIzks=; b=abWzdtjzx49Dvgi7CmRTwTg3BhfidDLplBWhVS89hPS9ut8+wZ/eTAgdmSENBNT1Gf V/LIpYw4CG7BmQ5sO2E9WNpWl76WzgdQztGCNJjmP/ihZW0Tqsl+Mn3MpfYNBgLlBkIK l0CjLSy6bEvnRYUpUkfLbbaGxaAqKQOHl2RyDl7qL4iba5dLRlrLcovE3iEMquvhuYiq 2frx1OcBEMldc/VU58R4OuPOpJ8OWMTBKg4slJTVRqmis0NfOYek/r2xQnm0ITh4HQJb D6hKFYSDvN+MVIRl54CpzKmg7eY8BqOwP+HvigBlfPgEScUslORqyOq5jFI/wEgsycux OUEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721800661; x=1722405461; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fw0qrQ0eWxlVJkGzJIda/SS7NehOy77rMTgqGWSIzks=; b=mtoJcEn2BCZwlhN0IClMhwGnI80G7TZ8O6nwd0CQe/BZR49xTEHUxZK92CRcf40cL6 NLTwGxqlMwmb48kWI1sTn8Nvvd5NFN8s0UHDhcZt7m2ftIdQwPeYh7Aapbf8I90jwFi/ XbdyglyZk+YDgX39sEoqeF6TpUk0e2tspKtWFKaolL26MuVUqku/IawfcAxma+70RmH5 nJl4qI0gNwk3uoUbJOdEZMEwNt5YHUMzQnW+Y7IckBiL3AQcFJ+O//9pmpz6ArjbGw/J fMtpW+S+ZEFRYt9l5wE+kkg4uaBtx50HwxCsvPvEupo17mpwnyi/rHo+9b3Ee3hQR+gH fFSg== X-Gm-Message-State: AOJu0YyTdY0KkxXohyvESdRbFGGgq/8QWWNNnLLV1J8i6tIq51tY6OXh OPF3MiqCg/Rqq0OkWPxGnSAr5EMMZ25+vn3/2ND4BY1CkJqby4uU X-Google-Smtp-Source: AGHT+IEnNPUPy1pzX7GqSaMg3SpbpK33BFlDSv41+C13q+0RmAakGsDYmGeQEgUo0q/NSBpXqwXhfg== X-Received: by 2002:a17:90b:128f:b0:2cd:619:6824 with SMTP id 98e67ed59e1d1-2cdb51f0ce3mr1054306a91.40.1721800660622; Tue, 23 Jul 2024 22:57:40 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cdb73a38f0sm695273a91.10.2024.07.23.22.57.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jul 2024 22:57:40 -0700 (PDT) From: Tathagat Priyadarshi To: rushilg@google.com, joshwash@google.com Cc: dev@dpdk.org, Tathagat Priyadarshi Subject: [PATCH] net/gve: Fix TX/RX queue setup and stop for DQO Date: Wed, 24 Jul 2024 05:58:56 +0000 Message-Id: <1721800736-2392953-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 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 | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c index ca92277..2c558ed 100644 --- a/drivers/net/gve/gve_ethdev.c +++ b/drivers/net/gve/gve_ethdev.c @@ -289,7 +289,11 @@ struct gve_queue_page_list * return ret; } for (i = 0; i < num_queues; i++) - if (gve_tx_queue_start(dev, i) != 0) { + 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; } @@ -315,9 +319,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 +372,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