Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81840/?format=api
https://patches.dpdk.org/api/patches/81840/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201022220542.84166-4-ajit.khaparde@broadcom.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20201022220542.84166-4-ajit.khaparde@broadcom.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201022220542.84166-4-ajit.khaparde@broadcom.com", "date": "2020-10-22T22:05:35", "name": "[v3,03/11] net/bnxt: add table scope to PF Mapping", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "91d9f13082439885d1eb70f8f8b675d6f45e8f80", "submitter": { "id": 501, "url": "https://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "delegate": { "id": 1766, "url": "https://patches.dpdk.org/api/users/1766/?format=api", "username": "ajitkhaparde", "first_name": "Ajit", "last_name": "Khaparde", "email": "ajit.khaparde@broadcom.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201022220542.84166-4-ajit.khaparde@broadcom.com/mbox/", "series": [ { "id": 13232, "url": "https://patches.dpdk.org/api/series/13232/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13232", "date": "2020-10-22T22:05:35", "name": null, "version": 3, "mbox": "https://patches.dpdk.org/series/13232/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/81840/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/81840/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 301F0A04DD;\n\tFri, 23 Oct 2020 00:08:59 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 61AFFA8ED;\n\tFri, 23 Oct 2020 00:06:33 +0200 (CEST)", "from mail-pf1-f193.google.com (mail-pf1-f193.google.com\n [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id B7EF09AFC\n for <dev@dpdk.org>; Fri, 23 Oct 2020 00:06:26 +0200 (CEST)", "by mail-pf1-f193.google.com with SMTP id x13so2118566pfa.9\n for <dev@dpdk.org>; Thu, 22 Oct 2020 15:06:26 -0700 (PDT)", "from localhost.localdomain ([192.19.228.250])\n by smtp.gmail.com with ESMTPSA id q14sm3214059pjp.43.2020.10.22.15.06.24\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Thu, 22 Oct 2020 15:06:24 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version; bh=2PPi6V8/q50hU2sPgQwxfozpQNl3c4uvsRJZKrZKOUk=;\n b=HQNmiqYHlhBold0dNkdCE4WQvXSUJ12Ob7zn4yT/OBbwwDWe3f4Cqpl0JcrWGDSZGj\n eZiakwhhGdwD/cN9pZes0vwOLe+bR3HPXANpGyGt+B8Lx6AenX+op7JDaOqTV02G5aAl\n /DytiKJ+dVHhAtQL8jlUbi6xmiSdFq0Et8ECA=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version;\n bh=2PPi6V8/q50hU2sPgQwxfozpQNl3c4uvsRJZKrZKOUk=;\n b=Gd/j9X+R9zb5fvetdNzOcPc4rROeowgBnRlM0xKFeX9bvGpvszI9+DY1pzkaPMkYCz\n J3kSfSTukhyyMaoYIYpKXMHvQGok3ECGjbOqW/FdW25ge/fKuO8ubqfBy7r5rxDQN5IS\n dEg8Ttk3DIWHpJEBjdrenvFaQucxsWUSoOBMeJMG3O5Z4N0hxYTPqx+YKSmO68qzKhZz\n rMqz58VqOpz4R1b3GO/2+0y89KA9u5ExwGAz/YFnhaGK8T0MS057nMhjrG5HLyzQlw52\n gcTM3rlrcX9CKzpPDvVGA9bRlguPKEaDfrlQwb1laMz3Bp36bniUngO5xi5rbF4LNolS\n dlhA==", "X-Gm-Message-State": "AOAM5311PkPjsVpzM1jxB0XQJyVb6r+fI4Sd70nxMrTkikgNWzQyrb/I\n +TCyFEadlXm52UbgzZpWAh71pgTd9shvi/g3VD4aG+YZDu7qJJjody6IpBSHWm1ibIXZ1r4eMDa\n B/OfVolvVnAA1+SL6SfZHT5NA3w3qfAXqxgTgM/dcicRnMQVyzwf2ugJKBp5tTkFnEQ==", "X-Google-Smtp-Source": "\n ABdhPJxiqlUxll0VYs7MXJzSxAXa+sszmM0OK4vfN9AqpTK6v9gagzAe/dIO+VC3JxCy108ODov+3g==", "X-Received": "by 2002:a17:90a:ab8b:: with SMTP id\n n11mr4380622pjq.162.1603404385539;\n Thu, 22 Oct 2020 15:06:25 -0700 (PDT)", "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "To": "dev@dpdk.org", "Cc": "Farah Smith <farah.smith@broadcom.com>,\n Randy Schacher <stuart.schacher@broadcom.com>", "Date": "Thu, 22 Oct 2020 15:05:35 -0700", "Message-Id": "<20201022220542.84166-4-ajit.khaparde@broadcom.com>", "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)", "In-Reply-To": "<20201020215538.59242-1-ajit.khaparde@broadcom.com>", "References": "<20201020215538.59242-1-ajit.khaparde@broadcom.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "Content-Transfer-Encoding": "8bit", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15", "Subject": "[dpdk-dev] [PATCH v3 03/11] net/bnxt: add table scope to PF Mapping", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Farah Smith <farah.smith@broadcom.com>\n\nAdd table scope to PF Mapping for SR and Wh+ devices.\nLegacy devices require PF set of base addresses for EEM operation.\nA table scope id is a logical construct and is mapped to the PF\nassociated with the communications channel used.\nIn the case of a VF, the parent PF is used.\n\nSigned-off-by: Farah Smith <farah.smith@broadcom.com>\nReviewed-by: Randy Schacher <stuart.schacher@broadcom.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/tf_core/tf_device.h | 10 +++++++---\n drivers/net/bnxt/tf_core/tf_device_p4.c | 10 +++++-----\n drivers/net/bnxt/tf_core/tf_em_common.c | 6 ++++--\n drivers/net/bnxt/tf_core/tf_em_host.c | 8 ++++++++\n drivers/net/bnxt/tf_core/tf_tbl.h | 3 +++\n drivers/net/bnxt/tf_core/tfp.c | 19 +++++++++++++++++++\n drivers/net/bnxt/tf_core/tfp.h | 16 ++++++++++++++++\n 7 files changed, 62 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/bnxt/tf_core/tf_device.h b/drivers/net/bnxt/tf_core/tf_device.h\nindex cf7c36e0ea..b5fc695ece 100644\n--- a/drivers/net/bnxt/tf_core/tf_device.h\n+++ b/drivers/net/bnxt/tf_core/tf_device.h\n@@ -579,8 +579,11 @@ struct tf_dev_ops {\n \t * [in] tfp\n \t * Pointer to TF handle\n \t *\n-\t * [in] parms\n-\t * Pointer to table scope map parameters\n+\t * [in] pf\n+\t * PF associated with the table scope\n+\t *\n+\t * [in] parif_bitmask\n+\t * Bitmask of PARIFs to enable\n \t *\n \t * [in/out] pointer to the parif_2_pf data to be updated\n \t *\n@@ -593,7 +596,8 @@ struct tf_dev_ops {\n \t * -EINVAL - Error\n \t */\n \tint (*tf_dev_map_parif)(struct tf *tfp,\n-\t\t\t\tstruct tf_map_tbl_scope_parms *parms,\n+\t\t\t\tuint16_t parif_bitmask,\n+\t\t\t\tuint16_t pf,\n \t\t\t\tuint8_t *data,\n \t\t\t\tuint8_t *mask,\n \t\t\t\tuint16_t sz_in_bytes);\ndiff --git a/drivers/net/bnxt/tf_core/tf_device_p4.c b/drivers/net/bnxt/tf_core/tf_device_p4.c\nindex 07c8d02faa..b35e65a8de 100644\n--- a/drivers/net/bnxt/tf_core/tf_device_p4.c\n+++ b/drivers/net/bnxt/tf_core/tf_device_p4.c\n@@ -103,7 +103,8 @@ tf_dev_p4_get_tcam_slice_info(struct tf *tfp __rte_unused,\n \n static int\n tf_dev_p4_map_parif(struct tf *tfp __rte_unused,\n-\t\t struct tf_map_tbl_scope_parms *parms,\n+\t\t uint16_t parif_bitmask,\n+\t\t uint16_t pf,\n \t\t uint8_t *data,\n \t\t uint8_t *mask,\n \t\t uint16_t sz_in_bytes)\n@@ -112,21 +113,20 @@ tf_dev_p4_map_parif(struct tf *tfp __rte_unused,\n \tuint32_t parif_pf_mask[2] = { 0 };\n \tuint32_t parif;\n \tuint32_t shift;\n-\tuint32_t scope_id = (uint32_t)(parms->tbl_scope_id);\n \n \tif (sz_in_bytes != sizeof(uint64_t))\n \t\treturn -ENOTSUP;\n \n \tfor (parif = 0; parif < TF_DEV_P4_PARIF_MAX; parif++) {\n-\t\tif (parms->parif_bitmask & (1UL << parif)) {\n+\t\tif (parif_bitmask & (1UL << parif)) {\n \t\t\tif (parif < 8) {\n \t\t\t\tshift = 4 * parif;\n \t\t\t\tparif_pf_mask[0] |= TF_DEV_P4_PF_MASK << shift;\n-\t\t\t\tparif_pf[0] |= scope_id << shift;\n+\t\t\t\tparif_pf[0] |= pf << shift;\n \t\t\t} else {\n \t\t\t\tshift = 4 * (parif - 8);\n \t\t\t\tparif_pf_mask[1] |= TF_DEV_P4_PF_MASK << shift;\n-\t\t\t\tparif_pf[1] |= scope_id << shift;\n+\t\t\t\tparif_pf[1] |= pf << shift;\n \t\t\t}\n \t\t}\n \t}\ndiff --git a/drivers/net/bnxt/tf_core/tf_em_common.c b/drivers/net/bnxt/tf_core/tf_em_common.c\nindex d4e8469edf..ad92cbdc75 100644\n--- a/drivers/net/bnxt/tf_core/tf_em_common.c\n+++ b/drivers/net/bnxt/tf_core/tf_em_common.c\n@@ -1104,8 +1104,10 @@ int tf_em_ext_map_tbl_scope(struct tf *tfp,\n \t}\n \tmask = aparms.mem_va;\n \n-\trc = dev->ops->tf_dev_map_parif(tfp, parms, (uint8_t *)data,\n-\t\t\t\t\t(uint8_t *)mask, sz_in_bytes);\n+\trc = dev->ops->tf_dev_map_parif(tfp, parms->parif_bitmask,\n+\t\t\t\t\ttbl_scope_cb->pf,\n+\t\t\t\t\t(uint8_t *)data, (uint8_t *)mask,\n+\t\t\t\t\tsz_in_bytes);\n \n \tif (rc) {\n \t\tTFP_DRV_LOG(ERR,\ndiff --git a/drivers/net/bnxt/tf_core/tf_em_host.c b/drivers/net/bnxt/tf_core/tf_em_host.c\nindex b5db94f3ef..a106bdffde 100644\n--- a/drivers/net/bnxt/tf_core/tf_em_host.c\n+++ b/drivers/net/bnxt/tf_core/tf_em_host.c\n@@ -392,6 +392,14 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms)\n \ttbl_scope_cb->index = parms->tbl_scope_id;\n \ttbl_scope_cb->tbl_scope_id = parms->tbl_scope_id;\n \n+\trc = tfp_get_pf(tfp, &tbl_scope_cb->pf);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t \"EEM: PF query error rc:%s\\n\",\n+\t\t\t strerror(-rc));\n+\t\tgoto cleanup;\n+\t}\n+\n \tfor (dir = 0; dir < TF_DIR_MAX; dir++) {\n \t\trc = tf_msg_em_qcaps(tfp,\n \t\t\t\t dir,\ndiff --git a/drivers/net/bnxt/tf_core/tf_tbl.h b/drivers/net/bnxt/tf_core/tf_tbl.h\nindex 2a5d24c940..230338c81b 100644\n--- a/drivers/net/bnxt/tf_core/tf_tbl.h\n+++ b/drivers/net/bnxt/tf_core/tf_tbl.h\n@@ -38,6 +38,9 @@ struct tf_em_caps {\n */\n struct tf_tbl_scope_cb {\n \tuint32_t tbl_scope_id;\n+ /** The pf or parent pf of the vf used for table scope creation\n+\t*/\n+\tuint16_t pf;\n \tint index;\n \tstruct hcapi_cfa_em_ctx_mem_info em_ctx_info[TF_DIR_MAX];\n \tstruct tf_em_caps em_caps[TF_DIR_MAX];\ndiff --git a/drivers/net/bnxt/tf_core/tfp.c b/drivers/net/bnxt/tf_core/tfp.c\nindex 426a182a90..0f6d63cc00 100644\n--- a/drivers/net/bnxt/tf_core/tfp.c\n+++ b/drivers/net/bnxt/tf_core/tfp.c\n@@ -178,3 +178,22 @@ tfp_get_fid(struct tf *tfp, uint16_t *fw_fid)\n \n \treturn 0;\n }\n+\n+int\n+tfp_get_pf(struct tf *tfp, uint16_t *pf)\n+{\n+\tstruct bnxt *bp = NULL;\n+\n+\tif (tfp == NULL || pf == NULL)\n+\t\treturn -EINVAL;\n+\n+\tbp = container_of(tfp, struct bnxt, tfp);\n+\tif (BNXT_VF(bp) && bp->parent) {\n+\t\t*pf = bp->parent->fid - 1;\n+\t\treturn 0;\n+\t} else if (BNXT_PF(bp)) {\n+\t\t*pf = bp->fw_fid - 1;\n+\t\treturn 0;\n+\t}\n+\treturn -EINVAL;\n+}\ndiff --git a/drivers/net/bnxt/tf_core/tfp.h b/drivers/net/bnxt/tf_core/tfp.h\nindex 421a7d9f78..551b9c569f 100644\n--- a/drivers/net/bnxt/tf_core/tfp.h\n+++ b/drivers/net/bnxt/tf_core/tfp.h\n@@ -268,4 +268,20 @@ int tfp_get_fid(struct tf *tfp, uint16_t *fw_fid);\n */\n int tfp_get_fid(struct tf *tfp, uint16_t *fw_fid);\n \n+/**\n+ * Get the PF associated with the fw communications channel.\n+ *\n+ * [in] session\n+ * Pointer to session handle\n+ *\n+ * [out] pf\n+ * Pointer to the pf id\n+ *\n+ * Returns:\n+ * 0 - Success\n+ * -EINVAL - Failure\n+ *\n+ */\n+int tfp_get_pf(struct tf *tfp, uint16_t *pf);\n+\n #endif /* _TFP_H_ */\n", "prefixes": [ "v3", "03/11" ] }{ "id": 81840, "url": "