Show a patch.

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

{
    "id": 103,
    "url": "https://patches.dpdk.org/api/patches/103/",
    "web_url": "https://patches.dpdk.org/patch/103/",
    "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": "<1406535955-31070-5-git-send-email-helin.zhang@intel.com>",
    "date": "2014-07-28T08:25:53",
    "name": "[dpdk-dev,v2,4/6] i40e: support of 'is_command_supported'",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "71577282eecb535602308e94bab8e44d63861dcc",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/",
        "name": "Helin Zhang",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/103/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/103/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/103/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Date": "Mon, 28 Jul 2014 16:25:53 +0800",
        "In-Reply-To": "<1406535955-31070-1-git-send-email-helin.zhang@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1406535955-31070-1-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "dev@dpdk.org",
        "Received": [
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id D7AC1959\n\tfor <dev@dpdk.org>; Mon, 28 Jul 2014 10:24:30 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP; 28 Jul 2014 01:26:15 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 28 Jul 2014 01:26:14 -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 s6S8QBsV022894;\n\tMon, 28 Jul 2014 16:26:11 +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 s6S8Q7as031208; Mon, 28 Jul 2014 16:26:09 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s6S8Q7s2031204; \n\tMon, 28 Jul 2014 16:26:07 +0800"
        ],
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "Precedence": "list",
        "X-ExtLoop1": "1",
        "Message-Id": "<1406535955-31070-5-git-send-email-helin.zhang@intel.com>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v2 4/6] i40e: support of 'is_command_supported'",
        "X-List-Received-Date": "Mon, 28 Jul 2014 08:24:31 -0000",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Return-Path": "<hzhan75@shecgisg004.sh.intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.01,747,1400050800\"; d=\"scan'208\";a=\"576413776\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "'is_command_supported' is defined for the capability discovery.\nActually it is to check if a command (feature) is supported on\na specific type of NIC port. Now i40e supports below eight\ncommands. Of cause, more commands can be supported later.\n - RTE_CMD_GET_SYM_HASH_ENABLE_PER_PCTYPE\n - RTE_CMD_SET_SYM_HASH_ENABLE_PER_PCTYPE\n - RTE_CMD_GET_SYM_HASH_ENABLE_PER_PORT\n - RTE_CMD_SET_SYM_HASH_ENABLE_PER_PORT\n - RTE_CMD_GET_FILTER_SWAP\n - RTE_CMD_SET_FILTER_SWAP\n - RTE_CMD_GET_HASH_FUNCTION\n - RTE_CMD_SET_HASH_FUNCTION\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_pmd_i40e/i40e_ethdev.c | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex 4403af4..87a4999 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -204,6 +204,8 @@ static int i40e_dev_rss_hash_update(struct rte_eth_dev *dev,\n \t\t\t\t    struct rte_eth_rss_conf *rss_conf);\n static int i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,\n \t\t\t\t      struct rte_eth_rss_conf *rss_conf);\n+static int i40e_dev_is_command_supported(struct rte_eth_dev *dev __rte_unused,\n+\t\t\t\t\t enum rte_eth_command cmd);\n static int i40e_rx_classification_filter_ctl(struct rte_eth_dev *dev,\n \t\t\t\t\t     enum rte_eth_command cmd,\n \t\t\t\t\t     void *args);\n@@ -252,6 +254,7 @@ static struct eth_dev_ops i40e_eth_dev_ops = {\n \t.reta_query                   = i40e_dev_rss_reta_query,\n \t.rss_hash_update              = i40e_dev_rss_hash_update,\n \t.rss_hash_conf_get            = i40e_dev_rss_hash_conf_get,\n+\t.is_command_supported         = i40e_dev_is_command_supported,\n \t.rx_classification_filter_ctl = i40e_rx_classification_filter_ctl,\n };\n \n@@ -4292,6 +4295,31 @@ i40e_get_hash_function(struct i40e_hw *hw, enum rte_i40e_hash_function *hf)\n }\n \n static int\n+i40e_dev_is_command_supported(struct rte_eth_dev *dev __rte_unused,\n+\t\t\t      enum rte_eth_command cmd)\n+{\n+\tuint32_t i;\n+\t/* Below commands defined in rte_eth_features.h are for i40e only */\n+\tstatic const enum rte_eth_command i40e_commands[] = {\n+\t\tRTE_CMD_GET_SYM_HASH_ENABLE_PER_PCTYPE,\n+\t\tRTE_CMD_SET_SYM_HASH_ENABLE_PER_PCTYPE,\n+\t\tRTE_CMD_GET_SYM_HASH_ENABLE_PER_PORT,\n+\t\tRTE_CMD_SET_SYM_HASH_ENABLE_PER_PORT,\n+\t\tRTE_CMD_GET_FILTER_SWAP,\n+\t\tRTE_CMD_SET_FILTER_SWAP,\n+\t\tRTE_CMD_GET_HASH_FUNCTION,\n+\t\tRTE_CMD_SET_HASH_FUNCTION,\n+\t};\n+\n+\tfor (i = 0; i < RTE_DIM(i40e_commands); i++) {\n+\t\tif (i40e_commands[i] == cmd)\n+\t\t\treturn 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n i40e_rx_classification_filter_ctl(struct rte_eth_dev *dev,\n \t\t\t\t  enum rte_eth_command cmd,\n \t\t\t\t  void *args)\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "4/6"
    ]
}