Show a patch.

GET /api/patches/74660/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 74660,
    "url": "https://patches.dpdk.org/api/patches/74660/",
    "web_url": "https://patches.dpdk.org/patch/74660/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200723111329.21855-21-somnath.kotur@broadcom.com>",
    "date": "2020-07-23T11:13:29",
    "name": "[20/20] net/bnxt: cleanup of VF-representor dev ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "aade5983c1be4509bf77f70065322ddcd599af7d",
    "submitter": {
        "id": 908,
        "url": "https://patches.dpdk.org/api/people/908/",
        "name": "Somnath Kotur",
        "email": "somnath.kotur@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "https://patches.dpdk.org/api/users/1766/",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74660/mbox/",
    "series": [
        {
            "id": 11252,
            "url": "https://patches.dpdk.org/api/series/11252/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11252",
            "date": "2020-07-23T11:13:09",
            "name": "bnxt patches",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11252/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74660/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74660/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "References": "<20200723111329.21855-1-somnath.kotur@broadcom.com>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 11F341BD9BA",
        "Subject": "[dpdk-dev] [PATCH 20/20] net/bnxt: cleanup of VF-representor dev ops",
        "Sender": "\"dev\" <dev-bounces@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 9C4EFA0521;\n\tThu, 23 Jul 2020 13:22:36 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1413D1C122;\n\tThu, 23 Jul 2020 13:20:15 +0200 (CEST)",
            "from relay.smtp.broadcom.com (relay.smtp.broadcom.com\n [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id B49A11C0B5\n for <dev@dpdk.org>; Thu, 23 Jul 2020 13:19:20 +0200 (CEST)",
            "from dhcp-10-123-153-55.dhcp.broadcom.net\n (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55])\n by relay.smtp.broadcom.com (Postfix) with ESMTP id 11F341BD9BA;\n Thu, 23 Jul 2020 04:19:19 -0700 (PDT)"
        ],
        "To": "dev@dpdk.org",
        "X-Mailer": "git-send-email 2.10.1.613.g2cc2e70",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1595503160;\n bh=UCm6Q9sSGvV/R5+ZqoJBNvXKbGaVTV6PBF7UzC6XH5g=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Ig541zK1WmuMKcxvzFpC3mhcW4LoleDXBvJy8edr01ibjzkieC7mAUjz8qAZ9V9KZ\n y+raFtGs/aASk+FsH6T/Ft/KZwjJIHA5aF2gLlJ4gSEkqPpop0RkJYctAUUl+BvcVF\n FwvC+h8AGmPkhh5dUdRva2IqwD4fTd/Yc0J9+vr8=",
        "Date": "Thu, 23 Jul 2020 16:43:29 +0530",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "From": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "In-Reply-To": "<20200723111329.21855-1-somnath.kotur@broadcom.com>",
        "Cc": "ferruh.yigit@intel.com",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<20200723111329.21855-21-somnath.kotur@broadcom.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "No need to access rx_cfa_code, cfa_code_map from the VF-Rep functions\nanymore.\n\nFixes: 322bd6e70272 (\"net/bnxt: add port representor infrastructure\")\n\nReviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\n---\n drivers/net/bnxt/bnxt.h      |  1 -\n drivers/net/bnxt/bnxt_reps.c | 75 +++++---------------------------------------\n 2 files changed, 7 insertions(+), 69 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex 41e7ae5..f4b2a3f 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -799,7 +799,6 @@ struct bnxt_vf_representor {\n \tuint16_t\t\tdflt_vnic_id;\n \tuint16_t\t\tsvif;\n \tuint16_t\t\tvfr_tx_cfa_action;\n-\tuint16_t\t\trx_cfa_code;\n \tuint32_t\t\trep2vf_flow_id;\n \tuint32_t\t\tvf2rep_flow_id;\n \t/* Private data store of associated PF/Trusted VF */\ndiff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c\nindex 2f775e0..6fa9a30 100644\n--- a/drivers/net/bnxt/bnxt_reps.c\n+++ b/drivers/net/bnxt/bnxt_reps.c\n@@ -230,6 +230,9 @@ int bnxt_vf_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl)\n \tint rc;\n \n \tparent_bp = rep->parent_dev->data->dev_private;\n+\tif (!parent_bp)\n+\t\treturn 0;\n+\n \trc = bnxt_link_update_op(parent_bp->eth_dev, wait_to_compl);\n \n \t/* Link state. Inherited from PF or trusted VF */\n@@ -324,7 +327,7 @@ static int bnxt_vfr_alloc(struct rte_eth_dev *vfr_ethdev)\n \t}\n \n \t/* Check if representor has been already allocated in FW */\n-\tif (vfr->vfr_tx_cfa_action && vfr->rx_cfa_code)\n+\tif (vfr->vfr_tx_cfa_action)\n \t\treturn 0;\n \n \t/*\n@@ -406,9 +409,11 @@ static int bnxt_vfr_free(struct bnxt_vf_representor *vfr)\n \t}\n \n \tparent_bp = vfr->parent_dev->data->dev_private;\n+\tif (!parent_bp)\n+\t\treturn 0;\n \n \t/* Check if representor has been already freed in FW */\n-\tif (!vfr->vfr_tx_cfa_action && !vfr->rx_cfa_code)\n+\tif (!vfr->vfr_tx_cfa_action)\n \t\treturn 0;\n \n \trc = bnxt_tf_vfr_free(vfr);\n@@ -419,11 +424,9 @@ static int bnxt_vfr_free(struct bnxt_vf_representor *vfr)\n \t\treturn rc;\n \t}\n \n-\tparent_bp->cfa_code_map[vfr->rx_cfa_code] = BNXT_VF_IDX_INVALID;\n \tPMD_DRV_LOG(DEBUG, \"freed representor %d in FW\\n\",\n \t\t    vfr->vf_id);\n \tvfr->vfr_tx_cfa_action = 0;\n-\tvfr->rx_cfa_code = 0;\n \n \trc = bnxt_hwrm_cfa_vfr_free(parent_bp, vfr->vf_id);\n \n@@ -456,7 +459,6 @@ int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,\n {\n \tstruct bnxt_vf_representor *rep_bp = eth_dev->data->dev_private;\n \tstruct bnxt *parent_bp;\n-\tuint16_t max_vnics, i, j, vpool, vrxq;\n \tunsigned int max_rx_rings;\n \tint rc = 0;\n \n@@ -476,7 +478,6 @@ int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,\n \tdev_info->max_tx_queues = max_rx_rings;\n \tdev_info->reta_size = bnxt_rss_hash_tbl_size(parent_bp);\n \tdev_info->hash_key_size = 40;\n-\tmax_vnics = parent_bp->max_vnics;\n \n \t/* MTU specifics */\n \tdev_info->min_mtu = RTE_ETHER_MIN_MTU;\n@@ -492,68 +493,6 @@ int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,\n \tdev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;\n \tdev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;\n \n-\t/* *INDENT-OFF* */\n-\tdev_info->default_rxconf = (struct rte_eth_rxconf) {\n-\t\t.rx_thresh = {\n-\t\t\t.pthresh = 8,\n-\t\t\t.hthresh = 8,\n-\t\t\t.wthresh = 0,\n-\t\t},\n-\t\t.rx_free_thresh = 32,\n-\t\t/* If no descriptors available, pkts are dropped by default */\n-\t\t.rx_drop_en = 1,\n-\t};\n-\n-\tdev_info->default_txconf = (struct rte_eth_txconf) {\n-\t\t.tx_thresh = {\n-\t\t\t.pthresh = 32,\n-\t\t\t.hthresh = 0,\n-\t\t\t.wthresh = 0,\n-\t\t},\n-\t\t.tx_free_thresh = 32,\n-\t\t.tx_rs_thresh = 32,\n-\t};\n-\teth_dev->data->dev_conf.intr_conf.lsc = 1;\n-\n-\teth_dev->data->dev_conf.intr_conf.rxq = 1;\n-\tdev_info->rx_desc_lim.nb_min = BNXT_MIN_RING_DESC;\n-\tdev_info->rx_desc_lim.nb_max = BNXT_MAX_RX_RING_DESC;\n-\tdev_info->tx_desc_lim.nb_min = BNXT_MIN_RING_DESC;\n-\tdev_info->tx_desc_lim.nb_max = BNXT_MAX_TX_RING_DESC;\n-\n-\t/* *INDENT-ON* */\n-\n-\t/*\n-\t * TODO: default_rxconf, default_txconf, rx_desc_lim, and tx_desc_lim\n-\t *       need further investigation.\n-\t */\n-\n-\t/* VMDq resources */\n-\tvpool = 64; /* ETH_64_POOLS */\n-\tvrxq = 128; /* ETH_VMDQ_DCB_NUM_QUEUES */\n-\tfor (i = 0; i < 4; vpool >>= 1, i++) {\n-\t\tif (max_vnics > vpool) {\n-\t\t\tfor (j = 0; j < 5; vrxq >>= 1, j++) {\n-\t\t\t\tif (dev_info->max_rx_queues > vrxq) {\n-\t\t\t\t\tif (vpool > vrxq)\n-\t\t\t\t\t\tvpool = vrxq;\n-\t\t\t\t\tgoto found;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t\t/* Not enough resources to support VMDq */\n-\t\t\tbreak;\n-\t\t}\n-\t}\n-\t/* Not enough resources to support VMDq */\n-\tvpool = 0;\n-\tvrxq = 0;\n-found:\n-\tdev_info->max_vmdq_pools = vpool;\n-\tdev_info->vmdq_queue_num = vrxq;\n-\n-\tdev_info->vmdq_pool_base = 0;\n-\tdev_info->vmdq_queue_base = 0;\n-\n \treturn 0;\n }\n \n",
    "prefixes": [
        "20/20"
    ]
}