get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18823,
    "url": "http://patches.dpdk.org/api/patches/18823/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1483500187-124740-5-git-send-email-beilei.xing@intel.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": "<1483500187-124740-5-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1483500187-124740-5-git-send-email-beilei.xing@intel.com",
    "date": "2017-01-04T03:22:54",
    "name": "[dpdk-dev,v5,04/17] net/i40e: restore ethertype filter",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f54c664c08701e7e1b1548cec240ef199e922d77",
    "submitter": {
        "id": 410,
        "url": "http://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1483500187-124740-5-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/18823/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/18823/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 2742EF91A;\n\tWed,  4 Jan 2017 04:24:21 +0100 (CET)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id AC049377E\n\tfor <dev@dpdk.org>; Wed,  4 Jan 2017 04:23:47 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga105.fm.intel.com with ESMTP; 03 Jan 2017 19:23:47 -0800",
            "from unknown (HELO dpdk9.sh.intel.com) ([10.239.129.31])\n\tby FMSMGA003.fm.intel.com with ESMTP; 03 Jan 2017 19:23:46 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.33,458,1477983600\"; d=\"scan'208\";a=\"804865206\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "jingjing.wu@intel.com,\n\thelin.zhang@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Wed,  4 Jan 2017 11:22:54 +0800",
        "Message-Id": "<1483500187-124740-5-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1483500187-124740-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1483068352-32272-1-git-send-email-beilei.xing@intel.com>\n\t<1483500187-124740-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 04/17] net/i40e: restore ethertype filter",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "Add support of restoring ethertype filter in case filter\ndropped accidentally, as all filters need to be added and\nremoved by user obviously for generic filter API.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 44 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 44 insertions(+)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex fb7d794..189d110 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -474,6 +474,9 @@ static int i40e_tunnel_filter_convert(\n static int i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,\n \t\t\t\tstruct i40e_tunnel_filter *tunnel_filter);\n \n+static void i40e_ethertype_filter_restore(struct i40e_pf *pf);\n+static void i40e_filter_restore(struct i40e_pf *pf);\n+\n static const struct rte_pci_id pci_id_i40e_map[] = {\n \t{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },\n \t{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },\n@@ -1955,6 +1958,8 @@ i40e_dev_start(struct rte_eth_dev *dev)\n \t/* enable uio intr after callback register */\n \trte_intr_enable(intr_handle);\n \n+\ti40e_filter_restore(pf);\n+\n \treturn I40E_SUCCESS;\n \n err_up:\n@@ -10071,3 +10076,42 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n \n \treturn ret;\n }\n+\n+/* Restore ethertype filter */\n+static void\n+i40e_ethertype_filter_restore(struct i40e_pf *pf)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tstruct i40e_ethertype_filter_list\n+\t\t*ethertype_list = &pf->ethertype.ethertype_list;\n+\tstruct i40e_ethertype_filter *f;\n+\tstruct i40e_control_filter_stats stats;\n+\tuint16_t flags;\n+\n+\tTAILQ_FOREACH(f, ethertype_list, rules) {\n+\t\tflags = 0;\n+\t\tif (!(f->flags & RTE_ETHTYPE_FLAGS_MAC))\n+\t\t\tflags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC;\n+\t\tif (f->flags & RTE_ETHTYPE_FLAGS_DROP)\n+\t\t\tflags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_DROP;\n+\t\tflags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_TO_QUEUE;\n+\n+\t\tmemset(&stats, 0, sizeof(stats));\n+\t\ti40e_aq_add_rem_control_packet_filter(hw,\n+\t\t\t\t\t    f->input.mac_addr.addr_bytes,\n+\t\t\t\t\t    f->input.ether_type,\n+\t\t\t\t\t    flags, pf->main_vsi->seid,\n+\t\t\t\t\t    f->queue, 1, &stats, NULL);\n+\t}\n+\tPMD_DRV_LOG(INFO, \"Ethertype filter:\"\n+\t\t    \" mac_etype_used = %u, etype_used = %u,\"\n+\t\t    \" mac_etype_free = %u, etype_free = %u\\n\",\n+\t\t    stats.mac_etype_used, stats.etype_used,\n+\t\t    stats.mac_etype_free, stats.etype_free);\n+}\n+\n+static void\n+i40e_filter_restore(struct i40e_pf *pf)\n+{\n+\ti40e_ethertype_filter_restore(pf);\n+}\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "04/17"
    ]
}