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 7AD604563E; Thu, 18 Jul 2024 07:34:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0463C4279F; Thu, 18 Jul 2024 07:34:29 +0200 (CEST) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by mails.dpdk.org (Postfix) with ESMTP id 198FF40289 for ; Thu, 18 Jul 2024 07:34:18 +0200 (CEST) Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-6b624f4180bso2641636d6.3 for ; Wed, 17 Jul 2024 22:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721280857; x=1721885657; darn=dpdk.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=nfWsZdK4sAA2t/7yViNK2oUpNVB2Ro2juiQ3T/ftyAc=; b=WL40RSVkOgATvl2S6Ds4Vjv7HkBGqP2QTcT7WcjNdMXORTIOmySZLaNf4VqWnV+EyQ adbwWpBubVH6MNXqSST8kDF9N8mA5xUvozHYE/lz10dWuLsLvTcW98IPumNkqbJ63t99 TcpvN0+pJL41QMeITmaVl49XT4h0BZk376wwNC/rV2AyDvo9lK4JlMRrmeC3TPdaRMIS uO3pCjYGvRz4uAm8JQnXt48gYjlRzmcOUSgxGhjWK48WMuAX0fyB2cbCu90lcfwoFfMg DNnRvIgojsO/ZLMFApTIQpZG5buGGF+g6a1aArZ5NEEk+Q0516iI/tTNVXjckheeUZVg erTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721280857; x=1721885657; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nfWsZdK4sAA2t/7yViNK2oUpNVB2Ro2juiQ3T/ftyAc=; b=gnCXpf/vY5mI1+5aGfdZNCTeSpklIhYp5Gs2ndbfP1JHr3PW80MTvqnZ9NdhMyJmRn SGyusxPBqpWj5aL4pf4efu7bNdCf5bdUAFIBDVCsP0xK+kyYrwjMi3hxX2gqsRFK8Cve VuYbtH992ZnKFp03cdaw+rXudvsvhB+C4BdzKU4b0jW0RCiBRVxJ0H//T4/4wjdXxyod f7iv/Dwh1CobBua+XWow3Zvaic2w17hY8v3fg51P+zEN3L+t+aecsYIpKCCsmaUr21NN HpWxbG9/EDSlxLgfbIjUDHK2XGTe+JUHG3XrXH4coe1aL5fQADW/fxG3NNao8GsXxnIq spSA== X-Gm-Message-State: AOJu0Yz7w31Qebo3XWZMbFgbvrt7D+62hl/M+YPsR8fpJGOsRmOE/7Ev zfFMwH1c4OLD70dr7Tuy1cVX7VLh0/d23Gn60T/dKMYSbKSD0XanaAV7OSatY7UJg+58AhmL6o/ 6PlhKEI6+OUvrhy8tGUdQYYaqK5k= X-Google-Smtp-Source: AGHT+IHt2cQRq2lOPNqwOA/nC13oEmMLHFqo3nf7mCieJo+ofoElTsjBu6YPSHUzkgHONTgYauFeoEjEjKx8lVSt5wU= X-Received: by 2002:a05:6214:19e6:b0:6b5:e5bc:15c with SMTP id 6a1803df08f44-6b79c6068d4mr22575526d6.30.1721280857431; Wed, 17 Jul 2024 22:34:17 -0700 (PDT) MIME-Version: 1.0 From: Tathagat Priyadarshi Date: Thu, 18 Jul 2024 11:04:06 +0530 Message-ID: Subject: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY To: jeroendb@google.com, rushilg@google.com, joshwash@google.com Cc: dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000010e62f061d7eeebb" 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 --00000000000010e62f061d7eeebb Content-Type: text/plain; charset="UTF-8" >From 9fa6f7d425d66a00c3f63c7a3033eb06fd6b1852 Mon Sep 17 00:00:00 2001 From: priyadarshitathagat Date: Wed, 17 Jul 2024 18:53:47 +0000 Subject: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY The RSS support for GVE allows multiple CPU cores to handle the rx/tx queues as pollers. This requires initializing the eth_dev_ops and updating the RX/TX functions for these pollers. Signed-off-by: Tathagat Priyadarshi Acked-by: Rushil Gupta --- drivers/net/gve/gve_ethdev.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c index ca92277..2d8ef6f 100644 --- a/drivers/net/gve/gve_ethdev.c +++ b/drivers/net/gve/gve_ethdev.c @@ -1173,8 +1173,18 @@ struct gve_queue_page_list * rte_be32_t *db_bar; int err; - if (rte_eal_process_type() != RTE_PROC_PRIMARY) + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { + if (gve_is_gqi(priv)) { + gve_set_rx_function(eth_dev); + gve_set_tx_function(eth_dev); + eth_dev->dev_ops = &gve_eth_dev_ops; + } else { + gve_set_rx_function_dqo(eth_dev); + gve_set_tx_function_dqo(eth_dev); + eth_dev->dev_ops = &gve_eth_dev_ops_dqo; + } return 0; + } pci_dev = RTE_DEV_TO_PCI(eth_dev->device); -- 1.8.3.1 https://github.com/DPDK/dpdk/pull/86 --00000000000010e62f061d7eeebb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
From 9fa6f7d425d66a00c3f63c7a3033eb06fd6b1852 Mon Sep 17 0= 0:00:00 2001
From: priyadarshitathagat <tathagat.dpdk@gmail.com>
Date: Wed, 17 Jul 2024 18:= 53:47 +0000
Subject: [PATCH] net/gve: Update Rx/Tx functions for RTE_PRO= C_SECONDARY

The RSS support for GVE allows multiple CPU cores to
= handle the rx/tx queues as pollers. This requires initializing
the eth_d= ev_ops and updating the RX/TX functions for these pollers.

Signed-of= f-by: Tathagat Priyadarshi <t= athagat.dpdk@gmail.com>
Acked-by: Rushil Gupta <rushilg@google.com>
---
=C2=A0drivers/= net/gve/gve_ethdev.c | 12 +++++++++++-
=C2=A01 file changed, 11 insertio= ns(+), 1 deletion(-)

diff --git a/drivers/net/gve/gve_ethdev.c b/dri= vers/net/gve/gve_ethdev.c
index ca92277..2d8ef6f 100644
--- a/drivers= /net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -1173,8 += 1173,18 @@ struct gve_queue_page_list *
=C2=A0 rte_be32_t *db_bar;
= =C2=A0 int err;

- if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY)<= br>+ if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) {
+ if (gve_is_g= qi(priv)) {
+ gve_set_rx_function(eth_dev);
+ gve_set_tx_function= (eth_dev);
+ eth_dev->dev_ops =3D &gve_eth_dev_ops;
+ } els= e {
+ gve_set_rx_function_dqo(eth_dev);
+ gve_set_tx_function_dqo= (eth_dev);
+ eth_dev->dev_ops =3D &gve_eth_dev_ops_dqo;
+ }=
=C2=A0 return 0;
+ }

=C2=A0 pci_dev =3D RTE_DEV_TO_PCI(eth_d= ev->device);

--
1.8.3.1


https://github.com/DPDK/dpdk/pull/86
--00000000000010e62f061d7eeebb--