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 9552245651; Fri, 19 Jul 2024 06:38:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9F76402BE; Fri, 19 Jul 2024 06:38:04 +0200 (CEST) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id 95811402BE for ; Fri, 19 Jul 2024 06:35:44 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-78512d44a17so1041890a12.3 for ; Thu, 18 Jul 2024 21:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721363743; x=1721968543; 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=HKP2+D8bD5/gBdbl049jpbPVT0tLpOZ9GpS8/ry1hP9+xsZUdoGKVqhYb556jsaeps iF5NkbfMPFqi3wJuIA320bhbnyFIavV9aAdmOSMYclaaU86CUHa8lN+yEfVpr0KBt54g hLr4vXCaTLc00YHJlD5Hr5eDjTvo7vp1Y0ntNot8zCHJ1IxWjyfCP2qa5VqvigSQGKDu kbdeHmTXjROmRAf1UL05Ndv5bEx3b0nrxpcmcatXKcSzq0Q1kuLC8bmedfdau4mUzOKm azPWIcZLoAjUuZEvMhYGzFMuSeajiGFgIM6Fiju5kLXjrzVZiHmk7dditcDlY8HPc5HS uVGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721363743; x=1721968543; 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=s20ih+LLtPF0B+PIgu8WjIPxssobEYpXG1D+mumkN7nqAwrUaOTmgx6U9s3wLJI8hH lAYlmdX+dbsY9+x49gWJ7naOQg+qCJiq6NgZmW+7u0zBBtlxzCD5UUMwhvV/kdnruaeP WsuTzmEo2TVl7pe09dpVHw1m9KGDdI5jq70UHmmTb+znFYd0a0yWUqjIApK+aNOWDZZt 2gxqvvuAhD6F57ngCKAC3V5xPBm3kVtsODk/0GyEC/PhOtgLGrXr9F5NqNRYc4ih5O0T mYdIvXbMnOKBwWWdWCwiAaS7vEYbNm4Yg3xOriAAhu20VUtCZdNbkS4M38vOC4dSzdfc ktkg== X-Gm-Message-State: AOJu0YypxXq1c7zZDzkPN3TaqQrSqdcoKjy+vHXoMMiYX1B1u9kRTZzF cvY4+6BgBFYgqA0iJY+r5Q9XeFAJnwpNyhGKn/wncx9mn3lqNi56BhRj8i4iTw4= X-Google-Smtp-Source: AGHT+IGLiC/O65oZw4rLej5lXp55Qfa2G7Yu76UZl6FU2ROw5uxnOEP07ouSFmqfrTao+/UT24JNBw== X-Received: by 2002:a05:6a21:7899:b0:1c3:b1b3:75cf with SMTP id adf61e73a8af0-1c3fdcd431emr9185621637.14.1721363743079; Thu, 18 Jul 2024 21:35:43 -0700 (PDT) Received: from tp-fat-se.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd64d1a529sm4286055ad.211.2024.07.18.21.35.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2024 21:35:42 -0700 (PDT) From: priyadarshitathagat To: dev@dpdk.org Cc: priyadarshitathagat Subject: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY Date: Fri, 19 Jul 2024 04:36:54 +0000 Message-Id: <1721363814-2387892-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