get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2190,
    "url": "https://patches.dpdk.org/api/patches/2190/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1420355937-18484-4-git-send-email-changchun.ouyang@intel.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": "<1420355937-18484-4-git-send-email-changchun.ouyang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1420355937-18484-4-git-send-email-changchun.ouyang@intel.com",
    "date": "2015-01-04T07:18:54",
    "name": "[dpdk-dev,v4,3/6] ixgbe: Get VF queue number",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "101f65a166eae851c50004734d02f3feb46e202e",
    "submitter": {
        "id": 31,
        "url": "https://patches.dpdk.org/api/people/31/?format=api",
        "name": "Ouyang Changchun",
        "email": "changchun.ouyang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1420355937-18484-4-git-send-email-changchun.ouyang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2190/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2190/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id B8B055A71;\n\tSun,  4 Jan 2015 08:19:25 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id C03AD5A71\n\tfor <dev@dpdk.org>; Sun,  4 Jan 2015 08:19:21 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga102.fm.intel.com with ESMTP; 03 Jan 2015 23:19:12 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga003.jf.intel.com with ESMTP; 03 Jan 2015 23:13:42 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t047J9H2031956;\n\tSun, 4 Jan 2015 15:19:09 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t047J6hv018539; Sun, 4 Jan 2015 15:19:08 +0800",
            "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t047J6Zh018535; \n\tSun, 4 Jan 2015 15:19:06 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,691,1406617200\"; d=\"scan'208\";a=\"507181521\"",
        "From": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Sun,  4 Jan 2015 15:18:54 +0800",
        "Message-Id": "<1420355937-18484-4-git-send-email-changchun.ouyang@intel.com>",
        "X-Mailer": "git-send-email 1.7.12.2",
        "In-Reply-To": "<1420355937-18484-1-git-send-email-changchun.ouyang@intel.com>",
        "References": "<1419398584-19520-1-git-send-email-changchun.ouyang@intel.com>\n\t<1420355937-18484-1-git-send-email-changchun.ouyang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 3/6] ixgbe: Get VF queue number",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Get the available Rx and Tx queue number when receiving IXGBE_VF_GET_QUEUES message from VF.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n lib/librte_pmd_ixgbe/ixgbe_pf.c | 35 ++++++++++++++++++++++++++++++++++-\n 1 file changed, 34 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.c b/lib/librte_pmd_ixgbe/ixgbe_pf.c\nindex 495aff5..cbb0145 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_pf.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c\n@@ -53,6 +53,8 @@\n #include \"ixgbe_ethdev.h\"\n \n #define IXGBE_MAX_VFTA     (128)\n+#define IXGBE_VF_MSG_SIZE_DEFAULT 1\n+#define IXGBE_VF_GET_QUEUE_MSG_SIZE 5\n \n static inline uint16_t\n dev_num_vf(struct rte_eth_dev *eth_dev)\n@@ -491,9 +493,36 @@ ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)\n }\n \n static int\n+ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)\n+{\n+\tstruct ixgbe_vf_info *vfinfo =\n+\t\t*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);\n+\tuint32_t default_q = vf * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;\n+\n+\t/* Verify if the PF supports the mbox APIs version or not */\n+\tswitch (vfinfo[vf].api_version) {\n+\tcase ixgbe_mbox_api_20:\n+\tcase ixgbe_mbox_api_11:\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -1;\n+\t}\n+\n+\t/* Notify VF of Rx and Tx queue number */\n+\tmsgbuf[IXGBE_VF_RX_QUEUES] = RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;\n+\tmsgbuf[IXGBE_VF_TX_QUEUES] = RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;\n+\n+\t/* Notify VF of default queue */\n+\tmsgbuf[IXGBE_VF_DEF_QUEUE] = default_q;\n+\n+\treturn 0;\n+}\n+\n+static int\n ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)\n {\n \tuint16_t mbx_size = IXGBE_VFMAILBOX_SIZE;\n+\tuint16_t msg_size = IXGBE_VF_MSG_SIZE_DEFAULT;\n \tuint32_t msgbuf[IXGBE_VFMAILBOX_SIZE];\n \tint32_t retval;\n \tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n@@ -537,6 +566,10 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)\n \tcase IXGBE_VF_API_NEGOTIATE:\n \t\tretval = ixgbe_negotiate_vf_api(dev, vf, msgbuf);\n \t\tbreak;\n+\tcase IXGBE_VF_GET_QUEUES:\n+\t\tretval = ixgbe_get_vf_queues(dev, vf, msgbuf);\n+\t\tmsg_size = IXGBE_VF_GET_QUEUE_MSG_SIZE;\n+\t\tbreak;\n \tdefault:\n \t\tPMD_DRV_LOG(DEBUG, \"Unhandled Msg %8.8x\", (unsigned)msgbuf[0]);\n \t\tretval = IXGBE_ERR_MBX;\n@@ -551,7 +584,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)\n \n \tmsgbuf[0] |= IXGBE_VT_MSGTYPE_CTS;\n \n-\tixgbe_write_mbx(hw, msgbuf, 1, vf);\n+\tixgbe_write_mbx(hw, msgbuf, msg_size, vf);\n \n \treturn retval;\n }\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "3/6"
    ]
}