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 E1C1945694; Wed, 24 Jul 2024 09:13:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 704D240E3E; Wed, 24 Jul 2024 09:13:09 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id DB1DB40B97 for ; Wed, 24 Jul 2024 08:54:45 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-70ea2f25bfaso128565b3a.1 for ; Tue, 23 Jul 2024 23:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721804085; x=1722408885; 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=8obNHznqHZ5mmCB4Vdqi8jmP6gkUnk+iKjwA63e2Qrw=; b=Y9xJ8H0lU08/P9yg8lJowqB9pOK2IJlS83bQE6SiuQ1ghmW2iS+/qmBSo27SwYUd+0 Iq6pLHgLLa/ZA0CY+GggPcruo+ABLVM/clKFEHY8ZETUokIwGfW9uMauYax/pIycYFCE g3BvW+fa+NFNWw6mLrvNrSxF5aHn7Uorlgz/s9CO4G6MQNgao9E9wmKMI2Jri9+Bx6+K zTulXrOn8mOb1jShirDJN4uFlmh1GV9RDsx0BmfN4NVRBcVg4oeSJthgp9+7wZCWQLB3 e+szpC+lJBUmK9RYD/QfI9snT7DJRnPe/UrV5BBoJx/6w2hKuUwJ1BEF4mnn1TCpHuWi flIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721804085; x=1722408885; 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=8obNHznqHZ5mmCB4Vdqi8jmP6gkUnk+iKjwA63e2Qrw=; b=uSm6jcgfSuKwTBurefWyBOUlVAlrySma4xXyUwlETUgBhafVX63c9cyJL6oka0X60z b+GoFP+gf3v6IiYUXvTexgtgCN5MqBGo0lSSMuwblnS5NrJDCtEpLKk4ljxiMOUDsmTG MfHzdISs+4+UF0tP2DBuBZVWT2xcOlSCJiuTy3mV6XxO9LUT2yxr6mX1KDPUXdYuWg0o x7999OK49xQk8dr/mM7hiR+YOnTkfeMA6nja/5QV4m0iD36zouS9/T7D+Z35DpWrt7ER IvkLweVPW26L28WM7i+BgbWLGW/Z59ZIlJqOYZWTaehsTWptZM9r9MLWEVpHM38FJFe+ XVvQ== X-Gm-Message-State: AOJu0Yx4SXyOerArHi5g5fUTURNp3VEkKQzDkc2T9i1nJd4lD2OZKPSJ xxuVpDdm4QfcNgugIhjpu9+I65Ye/OOdql5z495iCa0poCGa9mObQKCYjfyd X-Google-Smtp-Source: AGHT+IFlJJBDCIHzPotG1h7GD+cYJaS6KFVDVQ3nTt/e18WjOm9dZgBuq4MXJR7HfcT0ST61k5RRKA== X-Received: by 2002:a05:6a20:4d90:b0:1be:aaaf:d0fd with SMTP id adf61e73a8af0-1c4229a657cmr9253228637.49.1721804084685; Tue, 23 Jul 2024 23:54:44 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70d2245f052sm4952834b3a.159.2024.07.23.23.54.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jul 2024 23:54:44 -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: Wed, 24 Jul 2024 06:56:00 +0000 Message-Id: <1721804160-2393075-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