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 98250456BC; Fri, 26 Jul 2024 12:42:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5700432D2; Fri, 26 Jul 2024 12:42:54 +0200 (CEST) Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by mails.dpdk.org (Postfix) with ESMTP id 43EF54064F for ; Fri, 26 Jul 2024 12:37:20 +0200 (CEST) Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6b06e63d288so2746496d6.0 for ; Fri, 26 Jul 2024 03:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721990239; x=1722595039; darn=dpdk.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=AGHzTIkjJGWJAaD5K7DGLYov5w17Zar1TrBV6FFLOwI=; b=PDCankaOiKfzLdO35S/Raan9lI0yf0Uv8Q1mu1I0KTb21Yp16VqjybjiLFfASPyX8M 0EUXxMgzTvVsuDHUbJAGSZ3vpK4DimM7mV9/cf2Mn2Div0Y4kAp34YbNFHn2gprOJ6Uy aUgeD5/O7Q3sE6CrPBr0W/8m9BUTgCT5AzVIds5ahqwELeH7ePbI3+Awnqn8jxl7YgWk l+bqZ4OLQbZjVerEVHQTr7t2AYFPri140YwjRqXcNgvhNd8w9RRrMV+7BTYr8TkT0ODS 0dC/sADgngDYqmkqGNtZW56ltLXWabRPPUB2zcSRrFv6QW5yumLt6PPEmQiI87tdvQTu brHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721990239; x=1722595039; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AGHzTIkjJGWJAaD5K7DGLYov5w17Zar1TrBV6FFLOwI=; b=P8d+9Z8P9emsiV/SQdtJFz2CIZ5M6sp5o5laz1Axa3AAbG1f/QxyQobEjegjlIWnVg xxMeYlyFNoScms2Rw1swfPVrWnm1d8i+ZY3i/ejrnJLnMqX8fjHYcI6Aktm7uO/U0RIi ddNaJavS7fzAW+tKKbr0ITpABH1tRf5+s3bjAAHvChtYt5Rm9BRhtSg5mQX29H3X3M34 GhCEgd/8zBLQ5/3/vgkCp+nTyQYA0kiRPGt5qzusfoR0mWdrKSVSavpOVVvzOeiu1e71 inGO2nu3gwDP+KNSkkAT7iVBjIj4HhcXxOymtVAzMHhPTJRc5r+wLcAd03CTJ8TupeM1 2yQw== X-Gm-Message-State: AOJu0Yw19tFwIl//6udS3DVwa1bYl5DCulycYRC2AMwGA3YatTWZYg9P L23kng0qnr+82wFUmkVMPyJX/YHmKUg4axuPNgPZkrmlVe+7Zw+MmrEhsqfd/FUjueIZJ0NX6Gm mYTr8zXOgWk7cBgc7e55p4DZ/QxWS5UaDOmQ= X-Google-Smtp-Source: AGHT+IG74aGN2FxPxxHa0ilzL/dAvLjFZFSFH0zXE2UUwCtARX3NbsVdl2flJ4wu2GBkX6uVHgBJ5DpwSGj4G7bPLg8= X-Received: by 2002:a05:6214:dc3:b0:6b7:b286:e826 with SMTP id 6a1803df08f44-6bb3cabeb17mr77152656d6.38.1721990239320; Fri, 26 Jul 2024 03:37:19 -0700 (PDT) MIME-Version: 1.0 References: <1721828129-2393364-1-git-send-email-tathagat.dpdk@gmail.com> <1721914264-2394611-1-git-send-email-tathagat.dpdk@gmail.com> In-Reply-To: <1721914264-2394611-1-git-send-email-tathagat.dpdk@gmail.com> From: Tathagat Priyadarshi Date: Fri, 26 Jul 2024 16:07:08 +0530 Message-ID: Subject: Re: [PATCH v2] net/gve: Fix TX/RX queue setup and stop To: dev@dpdk.org, Ferruh Yigit Content-Type: multipart/alternative; boundary="000000000000858227061e2418ec" 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 --000000000000858227061e2418ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi @Ferruh Yigit I have updated v2 https://patches.dpdk.org/project/dpdk/patch/1721914264-2394611-1-git-send-e= mail-tathagat.dpdk@gmail.com/ and sent it in reply to the previous message id ( https://patches.dpdk.org/project/dpdk/patch/1721828129-2393364-1-git-send-e= mail-tathagat.dpdk@gmail.com/) , let me know if this is fine. On Thu, Jul 25, 2024 at 6:59=E2=80=AFPM Tathagat Priyadarshi < tathagat.dpdk@gmail.com> wrote: > 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 =3D 0; i < num_queues; i++) > - if (gve_tx_queue_start(dev, i) !=3D 0) { > + for (i =3D 0; i < num_queues; i++) { > + if (gve_is_gqi(priv)) > + ret =3D gve_tx_queue_start(dev, i); > + else > + ret =3D gve_tx_queue_start_dqo(dev, i); > + if (ret !=3D 0) { > PMD_DRV_LOG(ERR, "Fail to start Tx queue %d", i); > goto err_tx; > } > + } > > num_queues =3D dev->data->nb_rx_queues; > priv->rxqs =3D (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 =3D dev->data->dev_private; > dev->data->dev_link.link_status =3D 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 =3D 0; > > -- > 1.8.3.1 > > --000000000000858227061e2418ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, = Jul 25, 2024 at 6:59=E2=80=AFPM Tathagat Priyadarshi <tathagat.dpdk@gmail.com> wrote:
The PR aims to update the T= X/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 <tathagat.dpdk@gmail.com>
---
=C2=A0drivers/net/gve/gve_ethdev.c | 29 +++++++++++++++++++++++------
=C2=A01 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 *
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMD_DRV_LOG(ERR, &q= uot;Failed to create %u tx queues.", num_queues);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ret;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
-=C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < num_queues; i++)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (gve_tx_queue_st= art(dev, i) !=3D 0) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < num_queues; i++) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (gve_is_gqi(priv= ))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ret =3D gve_tx_queue_start(dev, i);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ret =3D gve_tx_queue_start_dqo(dev, i);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret !=3D 0) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 PMD_DRV_LOG(ERR, "Fail to start Tx queue %d", i);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 goto err_tx;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}

=C2=A0 =C2=A0 =C2=A0 =C2=A0 num_queues =3D dev->data->nb_rx_queues; =C2=A0 =C2=A0 =C2=A0 =C2=A0 priv->rxqs =3D (struct gve_rx_queue **)dev-&= gt;data->rx_queues;
@@ -315,9 +320,15 @@ struct gve_queue_page_list *
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;

=C2=A0err_rx:
-=C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_rx_queues(dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (gve_is_gqi(priv))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_rx_queues(= dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0else
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_rx_queues_= dqo(dev);
=C2=A0err_tx:
-=C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_tx_queues(dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (gve_is_gqi(priv))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_tx_queues(= dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0else
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_tx_queues_= dqo(dev);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return ret;
=C2=A0}

@@ -362,10 +373,16 @@ struct gve_queue_page_list *
=C2=A0static int
=C2=A0gve_dev_stop(struct rte_eth_dev *dev)
=C2=A0{
+=C2=A0 =C2=A0 =C2=A0 =C2=A0struct gve_priv *priv =3D dev->data->dev_= private;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev->data->dev_link.link_status =3D RTE_E= TH_LINK_DOWN;

-=C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_tx_queues(dev);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_rx_queues(dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (gve_is_gqi(priv)) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_tx_queues(= dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_rx_queues(= dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_tx_queues_= dqo(dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve_stop_rx_queues_= dqo(dev);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}

=C2=A0 =C2=A0 =C2=A0 =C2=A0 dev->data->dev_started =3D 0;

--
1.8.3.1

--000000000000858227061e2418ec--