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 32C6845A85 for ; Wed, 2 Oct 2024 01:45:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A2034029B; Wed, 2 Oct 2024 01:45:39 +0200 (CEST) Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by mails.dpdk.org (Postfix) with ESMTP id 9F2A940267 for ; Wed, 2 Oct 2024 01:45:36 +0200 (CEST) Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2073498f269so61378325ad.3 for ; Tue, 01 Oct 2024 16:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727826336; x=1728431136; darn=dpdk.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=RdO/YLcpcvntJyZ8r/3VPLZztRj5GX+LxGJ9x7ffXME=; b=VcSfj1tGAgG7K3FdC8QKaf/fdK/uQDyiFA+cf55ubJyIgoTI8TISIunfzjkIPa4La+ DzTv90qkzipmiNP2U1SOIOnYGfQy9QfWZyBiphbLIGjx5sJu4uikpEDYzc5hLkBFrgP1 0s1jl4tEpNXybWfTOelj5fG/1tjCNYfSPKJG7btr9RGgeqnf8zNnIcL3ykNnL2msTPoc 4iW5h1c41BLkVbSZZPLHDbXIad1DDwDCFTLdkIpgIDLMCt30hG/rMx5BKGRFNgSpuDzE cqDBYq6xoA8T0oiuE1/PPEcByX96kjO5OJhJqtSzcLPq140iNWJRa1RVxdgowkH+JXol FaPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727826336; x=1728431136; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RdO/YLcpcvntJyZ8r/3VPLZztRj5GX+LxGJ9x7ffXME=; b=rzu8OwPpQR5BldSXDZJCoYnYw8kWyn2qHczZyG1+XLl+dc8puZEmvmtA8TKXTjrqoG M2tCtf7zHwgLl0Qv3xsm9m9FJ/EwaANoTutXWpsGJKIi+Y9+0ywIVsF8bG9QgAEKsx3s 7NkR05aPR+BIr9yolM+G1E+1R8sHqpoNhjLg8USatwLB7JbR51KTXJdvx2rG9ypD2CVJ yngTAWQyS0tnJpsMT7rNlWC149X5fSsvCBG2Q/l/Y06TPyxAW0n7F+41e3EXGV2zEzaG zcVnTEeY6dlclj7obm0GW3PnOwtdctcm5qiXD9D8L04kkU2rX41VXPqF0cOpVOJLaOQ5 P5/A== X-Forwarded-Encrypted: i=1; AJvYcCVJjA646mhTNqbasWmRGrb81i9B3w42pUaMjtsxAz01COGZFguH41zbGkIjeYPB7uHVcrUz61I=@dpdk.org X-Gm-Message-State: AOJu0Yz4eOaHMWP54ETSZuhV5jBym6yINlt1RbIGjvf25Xdxu2hAPXFL HsfnXEy4M4UTeD3aXGFTmuoMxJ45Ba5mcmsCruByQhu97nTN8A1C3DWsA4Jp/kEOsXTCEVJGB8g x4+G0n8VWfQ== X-Google-Smtp-Source: AGHT+IGFcOustNgmYx1MXpr1e6Q7P6XtGcbhzBKzR6TzCdzyfgZkPnTkcte+YfTqzfZULr0oT47ucs8Nad2pyQ== X-Received: from joshwash.sea.corp.google.com ([2620:15c:11c:202:a282:7553:57e3:9bee]) (user=joshwash job=sendgmr) by 2002:a17:903:2306:b0:208:c453:ff33 with SMTP id d9443c01a7336-20bc5a35f60mr44725ad.6.1727826334696; Tue, 01 Oct 2024 16:45:34 -0700 (PDT) Date: Tue, 1 Oct 2024 16:45:33 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog Message-ID: <20241001234533.3308368-1-joshwash@google.com> Subject: [PATCH] net/gve: always attempt Rx refill on DQ From: Joshua Washington To: Thomas Monjalon , Jeroen de Borst , Rushil Gupta , Joshua Washington , Junfeng Guo Cc: dev@dpdk.org, stable@dpdk.org, Ferruh Yigit , Praveen Kaligineedi Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Before this patch, gve_rx_refill_dqo() is only called if the number of packets received in a cycle is non-zero. However, in a memory-constrained scenario, this doesn't behave well, as this could be a potential source of lockup, if there is no memory and all buffers have been received before memory is freed up for the driver to use. This patch moves the gve_rx_refill_dqo() call to occur regardless of whether packets have been received so that in the case that enough memory is freed, the driver can recover. Fixes: 45da16b5b181 ("net/gve: support basic Rx data path for DQO") Cc: stable@dpdk.org Signed-off-by: Joshua Washington Reviewed-by: Praveen Kaligineedi Reviewed-by: Rushil Gupta --- .mailmap | 1 + drivers/net/gve/gve_rx_dqo.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.mailmap b/.mailmap index d798a3f30f..d2f30cf8eb 100644 --- a/.mailmap +++ b/.mailmap @@ -1174,6 +1174,7 @@ Prashant Bhole Prashant Upadhyaya Prateek Agarwal Prathisna Padmasanan +Praveen Kaligineedi Praveen Shetty Pravin Pathak Prince Takkar diff --git a/drivers/net/gve/gve_rx_dqo.c b/drivers/net/gve/gve_rx_dqo.c index d8e9eee4a8..60702d4100 100644 --- a/drivers/net/gve/gve_rx_dqo.c +++ b/drivers/net/gve/gve_rx_dqo.c @@ -195,14 +195,12 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) if (nb_rx > 0) { rxq->rx_tail = rx_id; - if (rx_id_bufq != rxq->next_avail) - rxq->next_avail = rx_id_bufq; - - gve_rx_refill_dqo(rxq); + rxq->next_avail = rx_id_bufq; rxq->stats.packets += nb_rx; rxq->stats.bytes += bytes; } + gve_rx_refill_dqo(rxq); return nb_rx; } -- 2.46.1.824.gd892dcdcdd-goog