Show a patch.

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

{
    "id": 377,
    "url": "http://patches.dpdk.org/api/patches/377/",
    "web_url": "http://patches.dpdk.org/patch/377/",
    "project": {
        "id": 1,
        "url": "http://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": "<1410706109-30448-4-git-send-email-helin.zhang@intel.com>",
    "date": "2014-09-14T14:48:27",
    "name": "[dpdk-dev,v2,3/5] i40e: support of processing crc stripping config in PF host",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2bcdd16ae7d27e64ee62b25a480bf4a12dc4ed69",
    "submitter": {
        "id": 14,
        "url": "http://patches.dpdk.org/api/people/14/",
        "name": "Helin Zhang",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/377/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/377/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/377/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "References": "<1410706109-30448-1-git-send-email-helin.zhang@intel.com>",
        "X-Mailman-Version": "2.1.15",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,521,1406617200\"; d=\"scan'208\";a=\"602689861\"",
        "Date": "Sun, 14 Sep 2014 22:48:27 +0800",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1410706109-30448-4-git-send-email-helin.zhang@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 2345FB39C;\n\tSun, 14 Sep 2014 16:43:19 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id C3A99AE99\n\tfor <dev@dpdk.org>; Sun, 14 Sep 2014 16:43:17 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 14 Sep 2014 07:48:44 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 14 Sep 2014 07:48:43 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s8EEmefR018787;\n\tSun, 14 Sep 2014 22:48:40 +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 s8EEmch1030504; Sun, 14 Sep 2014 22:48:40 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8EEmc3K030500; \n\tSun, 14 Sep 2014 22:48:38 +0800"
        ],
        "List-Post": "<mailto:dev@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v2 3/5] i40e: support of processing crc stripping\n\tconfig in PF host",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Precedence": "list",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "X-ExtLoop1": "1",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Delivered-To": "patchwork@dpdk.org",
        "In-Reply-To": "<1410706109-30448-1-git-send-email-helin.zhang@intel.com>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "To support processing the extra configuration of crc stripping\nin DPDK PF host, new 'struct i40e_virtchnl_queue_pair_extra_info'\nand a new virtual channel operation of\n'I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX' are added, and also\nfunctions are reworked to support configuring VSI queues with\nor without crc stripping configuration.\n\nv2 changes:\n* Put processing crc stripping configuration in PF host into a\n  single patch.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nReviewed-by: Jingjing Wu <jingjing.wu@intel.com>\nReviewed-by: Jing Chen <jing.d.chen@intel.com>\n---\n lib/librte_pmd_i40e/i40e_pf.c | 38 ++++++++++++++++++++++++++++++--------\n lib/librte_pmd_i40e/i40e_pf.h |  7 +++++++\n 2 files changed, 37 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_pf.c b/lib/librte_pmd_i40e/i40e_pf.c\nindex 1583021..bc9bfcb 100644\n--- a/lib/librte_pmd_i40e/i40e_pf.c\n+++ b/lib/librte_pmd_i40e/i40e_pf.c\n@@ -327,7 +327,8 @@ send_msg:\n static int\n i40e_pf_host_hmc_config_rxq(struct i40e_hw *hw,\n \t\t\t    struct i40e_pf_vf *vf,\n-\t\t\t    struct i40e_virtchnl_rxq_info *rxq)\n+\t\t\t    struct i40e_virtchnl_rxq_info *rxq,\n+\t\t\t    struct i40e_virtchnl_queue_pair_extra_info *qpei)\n {\n \tint err = I40E_SUCCESS;\n \tstruct i40e_hmc_obj_rxq rx_ctx;\n@@ -411,13 +412,15 @@ i40e_pf_host_hmc_config_txq(struct i40e_hw *hw,\n static int\n i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf,\n \t\t\t\t\t   uint8_t *msg,\n-\t\t\t\t\t   uint16_t msglen)\n+\t\t\t\t\t   uint16_t msglen,\n+\t\t\t\t\t   int opcode)\n {\n \tstruct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);\n \tstruct i40e_vsi *vsi = vf->vsi;\n \tstruct i40e_virtchnl_vsi_queue_config_info *vc_vqci =\n \t\t(struct i40e_virtchnl_vsi_queue_config_info *)msg;\n \tstruct i40e_virtchnl_queue_pair_info *vc_qpi;\n+\tstruct i40e_virtchnl_queue_pair_extra_info *vc_qpei = NULL;\n \tint i, ret = I40E_SUCCESS;\n \n \tif (msg == NULL || msglen <= sizeof(*vc_vqci) ||\n@@ -428,6 +431,12 @@ i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf,\n \t}\n \n \tvc_qpi = vc_vqci->qpair;\n+\tif (opcode == I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX)\n+\t\tvc_qpei = (struct i40e_virtchnl_queue_pair_extra_info *)\n+\t\t\t\t\t\t(((uint8_t *)vc_qpi) +\n+\t\t\t(sizeof(struct i40e_virtchnl_queue_pair_info) *\n+\t\t\t\t\tvc_vqci->num_queue_pairs));\n+\n \tfor (i = 0; i < vc_vqci->num_queue_pairs; i++) {\n \t\tif (vc_qpi[i].rxq.queue_id > vsi->nb_qps - 1 ||\n \t\t\tvc_qpi[i].txq.queue_id > vsi->nb_qps - 1) {\n@@ -435,9 +444,16 @@ i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf,\n \t\t\tgoto send_msg;\n \t\t}\n \n-\t\t/* Apply VF RX queue setting to HMC */\n-\t\tif (i40e_pf_host_hmc_config_rxq(hw, vf, &vc_qpi[i].rxq)\n-\t\t\t!= I40E_SUCCESS) {\n+\t\t/*\n+\t\t * Apply VF RX queue setting to HMC.\n+\t\t * If the opcode is I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX,\n+\t\t * then the extra information of\n+\t\t * 'struct i40e_virtchnl_queue_pair_extra_info' is needed,\n+\t\t * otherwise set the last parameter to NULL.\n+\t\t */\n+\t\tif (i40e_pf_host_hmc_config_rxq(hw, vf, &vc_qpi[i].rxq,\n+\t\t\t(vc_qpei != NULL ? (&vc_qpei[i]) : NULL)) !=\n+\t\t\t\t\t\t\tI40E_SUCCESS) {\n \t\t\tPMD_DRV_LOG(ERR, \"Configure RX queue HMC failed\");\n \t\t\tret = I40E_ERR_PARAM;\n \t\t\tgoto send_msg;\n@@ -453,8 +469,8 @@ i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf,\n \t}\n \n send_msg:\n-\ti40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES,\n-\t\t\t\t\t\t\tret, NULL, 0);\n+\ti40e_pf_host_send_msg_to_vf(vf, opcode, ret, NULL, 0);\n+\n \treturn ret;\n }\n \n@@ -870,7 +886,13 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,\n \t\tbreak;\n \tcase I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES:\n \t\tPMD_DRV_LOG(INFO, \"OP_CONFIG_VSI_QUEUES received\\n\");\n-\t\ti40e_pf_host_process_cmd_config_vsi_queues(vf, msg, msglen);\n+\t\ti40e_pf_host_process_cmd_config_vsi_queues(vf, msg,\n+\t\t\t\t\t\tmsglen, opcode);\n+\t\tbreak;\n+\tcase I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX:\n+\t\tPMD_DRV_LOG(INFO, \"OP_CONFIG_VSI_QUEUES_EX received\\n\");\n+\t\ti40e_pf_host_process_cmd_config_vsi_queues(vf, msg,\n+\t\t\t\t\t\tmsglen, opcode);\n \t\tbreak;\n \tcase I40E_VIRTCHNL_OP_CONFIG_IRQ_MAP:\n \t\tPMD_DRV_LOG(INFO, \"OP_CONFIG_IRQ_MAP received\\n\");\ndiff --git a/lib/librte_pmd_i40e/i40e_pf.h b/lib/librte_pmd_i40e/i40e_pf.h\nindex 41b6826..19e1379 100644\n--- a/lib/librte_pmd_i40e/i40e_pf.h\n+++ b/lib/librte_pmd_i40e/i40e_pf.h\n@@ -57,7 +57,14 @@ enum i40e_virtchnl_ops_DPDK {\n \tI40E_VIRTCHNL_OP_GET_LINK_STAT = I40E_VIRTCHNL_OP_EVENT + 0x100,\n \tI40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD,\n \tI40E_VIRTCHNL_OP_CFG_VLAN_PVID,\n+\tI40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX,\n };\n+\n+/* DPDK extra configurations for queues */\n+struct i40e_virtchnl_queue_pair_extra_info {\n+\tuint8_t crcstrip;\n+};\n+\n struct i40e_virtchnl_vlan_offload_info {\n \tuint16_t vsi_id;\n \tuint8_t enable_vlan_strip;\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "3/5"
    ]
}