From patchwork Fri Jul 30 05:36:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 96436 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2D64A0C40; Fri, 30 Jul 2021 07:36:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DAE8410FA; Fri, 30 Jul 2021 07:36:22 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 32147410F6 for ; Fri, 30 Jul 2021 07:36:21 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id e5so9738274pld.6 for ; Thu, 29 Jul 2021 22:36:21 -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=CS/kqVaeBzSBHNn05YEBUJrPkEO5tcVwA9V//2T5pl4=; b=R1RM8weAwzOcbWo274qrp402inoWvB3O8iE5JkkwCLxETl7qT9jpdOv1+HYu0IgrIJ AxN1yPZ9P7ePsiJgYI3PQiBj37kc42mv2yBPDxgdM1oHQc5SOsjzTcoIsgfNOzSNIxqb HcIa2PgogG8A7sCK9IDmc8qTkPFaEFJODO9so= 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=CS/kqVaeBzSBHNn05YEBUJrPkEO5tcVwA9V//2T5pl4=; b=k9gkEklrmpWoP1Oiui3UfU+FbleLNNSE1Tu050UBY+kfsr+CVUVOp++1ddZqsdwtAj NvCnsvhMheiTKqEkL0n7D4FQ3f7tTRm6mRfNBslR1esyWE9Cxa6Jg5apiMZaz38TkSg3 p0iPCceRO8nknskvP2WxMDXmUTXHkn4rXJZZJ+baq4b31R6e4XedK3+NpFn80B4A5CBl 5lYY8kBfmWnycleNWrWYYs+1ChArB6lCzF9z8UleXt4LzPqQM/kEEBiz26DNjVD0YLIh Nbf8HYdGVUNTQxo8InIUht3L1ZSK+YiWHrgF/9rpa2+SPWda0qw01p25MF+dDpotvRcX 4GCw== X-Gm-Message-State: AOAM532tRcWnsL5athCAiL+hzY2Yie1o+l2iQTzWPUMCXt48NSQGAdMo MF2VBBjNq5JhYpSEPCWZLoMZYR7FutkJ+ucc7KLc/Ob+jwn3/x8KOkhecnDP3AKlyRMkWuTO0y0 XmrLn4P6s/NsJRgrT8xVRpdHZPykjdpY4qQzoTce43LLnL5syzwRw4qfoQoGnKr8= 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 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH 1/2] net/bnxt: fix resource qcap list handling 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 Sender: "dev" 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);