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 E556245BF5 for ; Sun, 27 Oct 2024 18:12:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C27294067E; Sun, 27 Oct 2024 18:12:01 +0100 (CET) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id 9770940665 for ; Sun, 27 Oct 2024 18:11:54 +0100 (CET) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-7e6d04f74faso2240335a12.1 for ; Sun, 27 Oct 2024 10:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1730049114; x=1730653914; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BPGvf5ko8775V3b2gW0/JNb9npSKlWRX6QYFmBiWQsM=; b=LLCc2whokxzYtQjnK+glSp6ng4joYjcCwLBbLKdoQArLnJNVGCjTkKgqWjauTVeI2b f3zCesdX9PQF7mj1fLv8GETaJp9ziACeov4fekIr2ekw8z5xwFXxo6SyKBI40YEfOjh5 dEr3+POOS3IsS1/m7emmK5CkNDEmy90rGmoIc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730049114; x=1730653914; h=content-transfer-encoding:mime-version: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=BPGvf5ko8775V3b2gW0/JNb9npSKlWRX6QYFmBiWQsM=; b=w5yfg/SeCsdSq0dSxRzLDOeXPqTKlbc28jQ6jgbHxQZ1cd9Zqycj8tY9Mn2uXUxz8S WShx65muDfb8Jglj9MkjQLiPxq4CM+KrZp5S+bx67C771q6x/gDbovtNGv0SeDjqxz+P k3alHurRHpl91FMGtcTRax0GFbYi0TmcfR7Aln8JLKx9VY9z8KgqnVkfeh0FqyBWahwE oV9FHWQhw+6qXpz0Ad+22yvFBcxiz4dN5w7pazaCJpLloZY28auWGombD/trNEP3y6hx VwuUGzuKeT6XcVACkfK7UFejmnb4mZznELFkOfP38gJOmuhuoAyxrx6ZMrVhAziCNL8b J7SQ== X-Gm-Message-State: AOJu0YzWmUap7lzF5jpdXqGIDE+y5y/mWNn7mQW93nzk3zO0yiK7vEQT ALeEfOE5VHDLOGw+6c4HBr1RODO+8RJYPE43BcNlw1csM7JVVYXuRgFwSydBdA== X-Google-Smtp-Source: AGHT+IHmE0g6/Y4P0hkhwzelmAtpvb8yy9cYTXd2rUyH/mU0e5bQ/bigGxyY0s+hH1USl4JIV6B2uA== X-Received: by 2002:a05:6a21:e92:b0:1d9:9865:fd3b with SMTP id adf61e73a8af0-1d9a748e66bmr7745738637.1.1730049113793; Sun, 27 Oct 2024 10:11:53 -0700 (PDT) Received: from localhost.localdomain ([136.52.21.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057a21ccesm4269158b3a.167.2024.10.27.10.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 10:11:52 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org, Vasuthevan Maheswaran Subject: [PATCH v2 08/13] net/bnxt: fix LRO offload capability Date: Sun, 27 Oct 2024 10:11:23 -0700 Message-Id: <20241027171128.50221-9-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20241027171128.50221-1-ajit.khaparde@broadcom.com> References: <20241027171128.50221-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Fix LRO offload capability for P7 devices. Export the capability to the application only if compressed Rx CQE mode is not enabled. LRO aka TPA is not supported when compressed CQE mode is set. Fixes: 3b56c3ffc182 ("net/bnxt: refactor code to support P7 devices") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Vasuthevan Maheswaran --- drivers/net/bnxt/bnxt_rxq.c | 7 ++++++- drivers/net/bnxt/bnxt_rxr.c | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 1c25c57ca6..249fe7f6e5 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -30,10 +30,12 @@ uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp) RTE_ETH_RX_OFFLOAD_KEEP_CRC | RTE_ETH_RX_OFFLOAD_VLAN_FILTER | RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | - RTE_ETH_RX_OFFLOAD_TCP_LRO | RTE_ETH_RX_OFFLOAD_SCATTER | RTE_ETH_RX_OFFLOAD_RSS_HASH; + if ((BNXT_CHIP_P7(bp) && !bnxt_compressed_rx_cqe_mode_enabled(bp)) || + BNXT_CHIP_P5(bp)) + rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TCP_LRO; if (bp->flags & BNXT_FLAG_PTP_SUPPORTED) rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP; if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP) @@ -244,6 +246,9 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq) } } + if (bnxt_compressed_rx_cqe_mode_enabled(rxq->bp)) + return; + /* Free up mbufs in TPA */ tpa_info = rxq->rx_ring->tpa_info; if (tpa_info) { diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 0f3fd5326e..dc0bf6032b 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -1671,6 +1671,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) } PMD_DRV_LOG_LINE(DEBUG, "AGG Done!"); + if (bnxt_compressed_rx_cqe_mode_enabled(rxq->bp)) + return 0; + if (rxr->tpa_info) { unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp); -- 2.39.5 (Apple Git-154)