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 09951A0C40 for ; Fri, 30 Jul 2021 07:36:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC5DB410F6; Fri, 30 Jul 2021 07:36:21 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id D68C9410F5 for ; Fri, 30 Jul 2021 07:36:20 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d1so9777374pll.1 for ; Thu, 29 Jul 2021 22:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=cqLzyvK+NoGoS0CEfZzzBeVAv0mc8sG8YJOrl+hmK+E=; b=Gg/EIeYac+4nHous8u8BmjaNhGoaR1P/BccJeVyJlahsbNl2B0r//fSEn1EEj+ah7S 9WY+m9X5+4vBd+wo41S03ZID4gO3NDmxCrwbfO/D2pJ6MXH3jz+jAqafFCaLsnWKzrwD TW5GMwQDtLl/T2LOt0HdiQEbiEy1Hz09mxg90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=cqLzyvK+NoGoS0CEfZzzBeVAv0mc8sG8YJOrl+hmK+E=; b=uJTwlSu6dYbOGfBHUlc7CsvJ61CX4JIduGcEcN69BrY2ZlAmfKzXIcLGOOXw5ANHLs cTeN1siEeL2FrZAPnPRW5Gy9hho43GCgpDtAZkEcNvHPs+H0p14n3spJHlLT57XCjL4n kKy43USNiWzo8bH2kOT6QOjn/qU91y802rZrLbhNawxAk4k2OscV94gds1FC+JIhVTOV /2LLd1vuBDi/YCBhSMnyaiyHLCHJKzyO3FvGw23ZlHK4ONayg0YkrzAw3E8s4tPLH/pj xBCSytJnvTxKCpOQgwFY8T+oxWXK1HD3G5AnSPWD5ErHBjwpYv86wlBINYQaqpzhpU3t f3MA== X-Gm-Message-State: AOAM531z+LEtF4GiSB6xaW1XYv7NE3e0lbD7vyLA0NwcxzUgllDJpsnX ilcJAypjO1fXtK1bjD4JZ0VD3woFMckvmA== X-Google-Smtp-Source: ABdhPJxeRN4RaWmfooJNFKR/DPsVhyfCFQNChbSUI+ra1bQjPUeiMqQY1Oq9As19ahAP6wiLmXAepQ== X-Received: by 2002:a17:90a:ab0f:: with SMTP id m15mr1239371pjq.154.1627623380040; Thu, 29 Jul 2021 22:36:20 -0700 (PDT) Received: from localhost.localdomain (ip68-5-71-166.oc.oc.cox.net. [68.5.71.166]) by smtp.gmail.com with ESMTPSA id r13sm806258pgi.78.2021.07.29.22.36.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jul 2021 22:36:19 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: Jay Ding , stable@dpdk.org, Randy Schacher Date: Thu, 29 Jul 2021 22:36:11 -0700 Message-Id: <20210730053612.3374-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20210730053612.3374-1-ajit.khaparde@broadcom.com> References: <20210730053612.3374-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000006914ba05c8509973" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-stable] [PATCH 1/2] net/bnxt: fix resource qcap list handling 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 Sender: "stable" --0000000000006914ba05c8509973 Content-Transfer-Encoding: 8bit From: Jay Ding The size of resource qcap list could be different when FW and application are not match. Application should be able to handle it when the FW is older and the size of qcap is smaller. This patch is needed for backward compatibility on older firmware versions. Fixes: 873661aa641a1 ("net/bnxt: support shared session") Cc: stable@dpdk.org Signed-off-by: Jay Ding Reviewed-by: Randy Schacher Acked-by: Ajit Khaparde --- drivers/net/bnxt/tf_core/tf_msg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c index 6717710dbd..e07d9168be 100644 --- a/drivers/net/bnxt/tf_core/tf_msg.c +++ b/drivers/net/bnxt/tf_core/tf_msg.c @@ -440,18 +440,18 @@ tf_msg_session_resc_qcaps(struct tf *tfp, * Should always get expected number of entries */ if (tfp_le_to_cpu_32(resp.size) != size) { - TFP_DRV_LOG(ERR, - "%s: QCAPS message size error, rc:%s\n", + TFP_DRV_LOG(WARNING, + "%s: QCAPS message size error, rc:%s, request %d vs response %d\n", tf_dir_2_str(dir), - strerror(EINVAL)); - rc = -EINVAL; - goto cleanup; + strerror(EINVAL), + size, + resp.size); } /* Post process the response */ data = (struct tf_rm_resc_req_entry *)qcaps_buf.va_addr; - for (i = 0; i < size; i++) { + for (i = 0; i < resp.size; i++) { query[i].type = tfp_le_to_cpu_32(data[i].type); query[i].min = tfp_le_to_cpu_16(data[i].min); query[i].max = tfp_le_to_cpu_16(data[i].max); -- 2.21.1 (Apple Git-122.3) --0000000000006914ba05c8509973--