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 6D29745651; Fri, 19 Jul 2024 06:54:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BA46402BE; Fri, 19 Jul 2024 06:54:17 +0200 (CEST) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) by mails.dpdk.org (Postfix) with ESMTP id D967D40267 for ; Fri, 19 Jul 2024 06:50:51 +0200 (CEST) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-25d6dd59170so807365fac.0 for ; Thu, 18 Jul 2024 21:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721364651; x=1721969451; 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=jD9KDwHVHNIhiCoD/6OCUjNC/4zS1rwR0WaCtMUsx8Y=; b=NiK/Ny8dxziiatCx+Wyp6d4GJemSdgMh6Njrp58tdqrJjv+Teke6MaKdm7wRHaU9kc +zi6LaQ0Ir/rRNxecTL9hCEWQkQWS0ApcU7Rzwt41UT4EYTdppjmjsGneZcDkNfr4GI/ W4mpWaP0+mCoOwKiAD/oQFveK+ebV5ExqQBx/g4Mb6mTEpDg9B6asOTNPTBCXPeov5gs 1PV8QJ+ejWWQb2oAF2oqgRD/b0khtLVjhqfP9fTFUfzyjx6ZQQlnGC3OQ9FmqgxgFqyc V/l7M9P+LB/rVm3vrzRns/kxA3E5Uh7GsfH5uuFSsbNdP8WQYjeMyp189VFNAYIeJ124 z9Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721364651; x=1721969451; 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=jD9KDwHVHNIhiCoD/6OCUjNC/4zS1rwR0WaCtMUsx8Y=; b=QqInth3cg1aF+/53KgRh8G5x60gTB5fot0+w1TOFUIRSHqjv1s91BnmYdC5TLCy5YN NZ8ZofqVPF7Y8q5ZRWMieEFZhU7oVHxbXE8F31wy0kCGa7B3+ClR7ZI1t3vq2xjAJren /LT4Z3wLvU6XyeexrTC8uD80d3bYx1m8ugj4gDHszQy/WpSwi9FNYVMFHNSNqBh/05NG 4t4+HQQbD+K8sRcvMTXE2rS3XlfK5y/2Xogap8ujrpJ45neauLuYKpQI5UdNVVU30FSJ g0iAItWdQ2PxNPtIwwOGj0+n+NrWaR5jXy/AU8z4OieNvP+D0X38SfDPHa82yFqw2R+D fisw== X-Gm-Message-State: AOJu0Yz2owquWC3ynQ8uT38dnADiQ3ya+LnBeSwr2gSeHAWQq6uQ9LGe OyYngWMOJISumKelT8a3dcYEYfxF7qtIanKLDf5qWSkWMtn7ISbEp71JlPraCUM= X-Google-Smtp-Source: AGHT+IH27bqFTyYd4O1tfnLzJhSaMICR6BI1WhMzWJhYCi/kszdhbo31DrvAkOdv0JHm1tq9IJzquA== X-Received: by 2002:a05:6871:4386:b0:261:575:5384 with SMTP id 586e51a60fabf-2610575b026mr1764973fac.16.1721364650643; Thu, 18 Jul 2024 21:50:50 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70cff552667sm369264b3a.107.2024.07.18.21.50.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2024 21:50:50 -0700 (PDT) From: priyadarshitathagat To: dev@dpdk.org Cc: priyadarshitathagat Subject: [PATCH v2] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY Date: Fri, 19 Jul 2024 04:52:02 +0000 Message-Id: <1721364722-2387983-1-git-send-email-tathagat.dpdk@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: 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 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 Acked-by: Joshua Washington --- 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