get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74919,
    "url": "http://patches.dpdk.org/api/patches/74919/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200728063439.23114-21-ajit.khaparde@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200728063439.23114-21-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200728063439.23114-21-ajit.khaparde@broadcom.com",
    "date": "2020-07-28T06:34:37",
    "name": "[v4,20/22] net/bnxt: cleanup VF-representor dev ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d2d5c0f8ed1f61b0883a3011cc03db8bd4f19a24",
    "submitter": {
        "id": 501,
        "url": "http://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200728063439.23114-21-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 11349,
            "url": "http://patches.dpdk.org/api/series/11349/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11349",
            "date": "2020-07-28T06:34:17",
            "name": "bnxt patches",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/11349/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/74919/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/74919/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 841F6A0521;\n\tTue, 28 Jul 2020 08:39:01 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 302211C1E9;\n\tTue, 28 Jul 2020 08:35:52 +0200 (CEST)",
            "from mail-wm1-f100.google.com (mail-wm1-f100.google.com\n [209.85.128.100]) by dpdk.org (Postfix) with ESMTP id 5C9041C0DA\n for <dev@dpdk.org>; Tue, 28 Jul 2020 08:35:30 +0200 (CEST)",
            "by mail-wm1-f100.google.com with SMTP id t142so10624866wmt.4\n for <dev@dpdk.org>; Mon, 27 Jul 2020 23:35:30 -0700 (PDT)",
            "from localhost.localdomain ([192.19.223.252])\n by smtp-relay.gmail.com with ESMTPS id r16sm30828wmh.29.2020.07.27.23.35.28\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Mon, 27 Jul 2020 23:35:29 -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:content-transfer-encoding;\n bh=ojItC+ZCApBvRyZ+c80ghUN8URMZfSu1WVfc9ZsHPis=;\n b=VjzJIzy2NS0ZXYqiy/HLJiWiHZT4ezP+uc3OGWw8Qp2IacLYmc9j3ooGb97VfZ+xlz\n EOE7rq12DJoI2LZhxx/7G/Xv/MhBOIaqOH1TJddW2w0uI8CtbDve9wwkQLVZdCg9DH8N\n zTxqGN3D6uQOYP7jnR7RFIJ2DwMY/3fLo+gfY=",
        "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:content-transfer-encoding;\n bh=ojItC+ZCApBvRyZ+c80ghUN8URMZfSu1WVfc9ZsHPis=;\n b=aidTnbct/vxK/8vwK/H0+bHS2AaISQHRgtAR42MY8IJFb0/b7q1YXOkyK/tSypEtf9\n LsB561vpAcHEutP4W0jqL5cNd0Dpz/ShKoebiQjGHNY1a3cU063f/Jz8i8SUm3SatZMI\n h+7lJVE+erLOAlvXEYtSmFEneCOk/ms5R6Hwu+GA0i7mAiI3fjQdOQoZhUeEeHqgzAXZ\n ZccdJ5aC1NIPBDAFsWGgqW4lwmDFNdRNalZDeQNnmsaO9Wz1WqAqv+cAMNVwkb/U1S6l\n tlyOYccNiQFlZoD2Y8p2mc+Smccyb64oNzLEDMXqbvQwj4lAqjdkNiIkxrKgbPxulZk3\n GtYg==",
        "X-Gm-Message-State": "AOAM533lsQzRQI+DzOwagtem80tch7AQSfRrWRvVc9WRuJpEsJiY4Ac2\n dtL/Z2ivLscwhcvVnJIJfrkX67jVu0d7dmluUVSqr/f1Wz5rEY1RcygQQ1REOS4hQQzqvygNv0S\n nGn6gLKITSXlgh2+3cuPAG7XNFStoVPioTB+/fnXnwgDU3LUEVoiRrLGUe7zcjNMknf2vMTaE+z\n jnMA==",
        "X-Google-Smtp-Source": "\n ABdhPJz9SGso1wht4ldIaFL5r1dY14k0lTMJHNe8K9vi+0kKM1TSFrFjrs8RQJtAVj0pc+AYLBBkFvcOvqAR",
        "X-Received": "by 2002:a7b:c054:: with SMTP id u20mr2482319wmc.2.1595918129836;\n Mon, 27 Jul 2020 23:35:29 -0700 (PDT)",
        "X-Relaying-Domain": "broadcom.com",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, Somnath Kotur <somnath.kotur@broadcom.com>,\n Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>",
        "Date": "Mon, 27 Jul 2020 23:34:37 -0700",
        "Message-Id": "<20200728063439.23114-21-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "In-Reply-To": "<20200728063439.23114-1-ajit.khaparde@broadcom.com>",
        "References": "\n <CACZ4nht+F+XvmJ0_TvYCQTfUEwan3dmCNer9wRuRQsOetFtodQ@mail.gmail.com>\n <20200728063439.23114-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 20/22] net/bnxt: cleanup VF-representor dev ops",
        "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: Somnath Kotur <somnath.kotur@broadcom.com>\n\nNo 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>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n doc/guides/nics/bnxt.rst     | 46 ++++++++++++++++++++++\n drivers/net/bnxt/bnxt.h      |  1 -\n drivers/net/bnxt/bnxt_reps.c | 75 ++++--------------------------------\n 3 files changed, 53 insertions(+), 69 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst\nindex 6ff75d0a2..129a16cfc 100644\n--- a/doc/guides/nics/bnxt.rst\n+++ b/doc/guides/nics/bnxt.rst\n@@ -688,6 +688,52 @@ optimizes flow insertions and deletions.\n This is a tech preview feature, and is disabled by default. It can be enabled\n using bnxt devargs. For ex: \"-w 0000:0d:00.0,host-based-truflow=1”.\n \n+Notes\n+-----\n+\n+- On stopping a device port, all the flows created on a port by the\n+  application will be flushed from the hardware and any tables maintained\n+  by the PMD. After stopping the device port, all flows on the port become\n+  invalid and are not represented in the system anymore.\n+  Instead of destroying or flushing such flows an application should discard\n+  all references to these flows and re-create the flows as required after the\n+  port is restarted.\n+\n+- While an application is free to use the group id attribute to group flows\n+  together using a specific criteria, the BNXT PMD currently associates this\n+  group id to a VNIC id. One such case is grouping of flows which are filtered\n+  on the same source or destination MAC address. This allows packets of such\n+  flows to be directed to one or more queues associated with the VNIC id.\n+  This implementation is supported only when TRUFLOW functionality is disabled.\n+\n+Note: A VNIC represents a virtual interface in the hardware. It is a resource\n+in the RX path of the chip and is used to setup various target actions such as\n+RSS, MAC filtering etc. for the physical function in use.\n+\n+Virtual Function Port Representors\n+----------------------------------\n+The BNXT PMD supports the creation of VF port representors for the control\n+and monitoring of BNXT virtual function devices. Each port representor\n+corresponds to a single virtual function of that device that is connected to a\n+VF. When there is no hardware flow offload, each packet transmitted by the VF\n+will be received by the corresponding representor. Similarly each packet that is\n+sent to a representor will be received by the VF. Applications can take\n+advantage of this feature when SRIOV is enabled. The representor will allow the\n+first packet that is transmitted by the VF to be received by the DPDK\n+application which can then decide if the flow should be offloaded to the\n+hardware. Once the flow is offloaded in the hardware, any packet matching the\n+flow will be received by the VF while the DPDK application will not receive it\n+any more. The BNXT PMD supports creation and handling of the port representors\n+when the PMD is initialized on a PF or trusted-VF. The user can specify the list\n+of VF IDs of the VFs for which the representors are needed by using the\n+``devargs`` option ``representor``.::\n+\n+  -w DBDF,representor=[0,1,4]\n+\n+Note that currently hot-plugging of representor ports is not supported so all\n+the required representors must be specified on the creation of the PF or the\n+trusted VF.\n+\n Application Support\n -------------------\n \ndiff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex 41e7ae5bd..f4b2a3f92 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 2f775e0c0..6fa9a30d2 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": [
        "v4",
        "20/22"
    ]
}