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 B085A45BCB for ; Fri, 25 Oct 2024 19:58:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3B3340A7D; Fri, 25 Oct 2024 19:58:02 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 723E0409FA for ; Fri, 25 Oct 2024 19:57:55 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20cbca51687so20393815ad.1 for ; Fri, 25 Oct 2024 10:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1729879074; x=1730483874; 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=M8xquaYs40axuypYhS87EIdRnxHTfVU3d7kTum8Y+7STo0W6iv4OncSiYDbsMPqVNu eKvrsjfJf/v9+XMtNDCK9aAehs/+KRnS7BGG2llUKqTNcPdwFRlFrDOzVSWennw1DN8Z HzsDzHtAEpTDTunVYn25ycOTKWHEFgj3m/JP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729879074; x=1730483874; 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=MZl6erAx1yNTg3wZ/RPqCviAiBfm9xhhKcQdsRtxspRgCMtHn1h/wGa3R8Sgatb1fj Ig9VLsCpr7pT/cKQf2Y0+UBQhYqaHJBCtFECgHMhE4b2v+9eWL7KBWFT7HspHwpyKIKD sypb5aYW4W8WUBoIM/+JMonAn5hYvjG7s50rF8xVanTnAe/dw6dp+j9wNNmmkC+JA+zr QlBzSNq3SlysBNsVlOkhqTbcqD7qQSyE2275p9JWA78vn9721KElwkKyUNcCMRqdU/7Z rO+ptPezbVYjoZLui/a2l0MHSNBPkQP/H6U/NqPzq4cac1qiTtN++RMnimOQXNa+zhaj AIWw== X-Gm-Message-State: AOJu0YwkKce87GymzAobknPhtr+XzGYZbla7Ts+ylF0jpPrTjMONsXZR D/U8RE5408ywr+jVlx9Zeu5ZuZXwx15T861erAEWfuTLKPxAU7bXl4xr36h/vg== X-Google-Smtp-Source: AGHT+IFFqKvB7bHqaQbp3BLvztaIWMEje9kMv8N/jvHk7XFwpXgcSoDRVPiac3jhvhRN5wn6O8tDVA== X-Received: by 2002:a17:903:988:b0:20c:9d79:cf82 with SMTP id d9443c01a7336-20fab2da28cmr147241165ad.58.1729879074504; Fri, 25 Oct 2024 10:57:54 -0700 (PDT) Received: from C02GC2QQMD6T.wifi.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-210bc02ebd8sm11924335ad.210.2024.10.25.10.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 10:57:53 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org, Vasuthevan Maheswaran Subject: [PATCH 08/13] net/bnxt: fix LRO offload capability Date: Fri, 25 Oct 2024 10:57:33 -0700 Message-Id: <20241025175738.99564-9-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20241025175738.99564-1-ajit.khaparde@broadcom.com> References: <20241025175738.99564-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)