get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1427,
    "url": "https://patches.dpdk.org/api/patches/1427/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416530816-2159-5-git-send-email-jingjing.wu@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": "<1416530816-2159-5-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416530816-2159-5-git-send-email-jingjing.wu@intel.com",
    "date": "2014-11-21T00:46:38",
    "name": "[dpdk-dev,v6,04/22] ethdev: define structures for adding/deleting flow director",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "bffff7768cc926651f805470677ab38d3a151de3",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416530816-2159-5-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1427/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1427/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 768D7802A;\n\tFri, 21 Nov 2014 01:37:29 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 381BC7F50\n\tfor <dev@dpdk.org>; Fri, 21 Nov 2014 01:37:26 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga102.fm.intel.com with ESMTP; 20 Nov 2014 16:47:57 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 20 Nov 2014 16:47:10 -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 sAL0l9tb003137;\n\tFri, 21 Nov 2014 08:47: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 sAL0l6fa002221; Fri, 21 Nov 2014 08:47:08 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAL0l6CO002217; \n\tFri, 21 Nov 2014 08:47:06 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,426,1413270000\"; d=\"scan'208\";a=\"635592048\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 21 Nov 2014 08:46:38 +0800",
        "Message-Id": "<1416530816-2159-5-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1416530816-2159-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1414654006-7472-1-git-send-email-jingjing.wu@intel.com>\n\t<1416530816-2159-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 04/22] ethdev: define structures for\n\tadding/deleting flow director",
        "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": "define structures to add or delete flow director filter\n  - struct rte_eth_fdir_filter\n\nSigned-off-by: jingjing.wu <jingjing.wu@intel.com>\n---\n lib/librte_ether/rte_eth_ctrl.h | 167 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 167 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h\nindex 8dd384d..9856842 100644\n--- a/lib/librte_ether/rte_eth_ctrl.h\n+++ b/lib/librte_ether/rte_eth_ctrl.h\n@@ -53,6 +53,7 @@ enum rte_filter_type {\n \tRTE_ETH_FILTER_NONE = 0,\n \tRTE_ETH_FILTER_MACVLAN,\n \tRTE_ETH_FILTER_TUNNEL,\n+\tRTE_ETH_FILTER_FDIR,\n \tRTE_ETH_FILTER_MAX\n };\n \n@@ -155,6 +156,172 @@ struct rte_eth_tunnel_filter_conf {\n \tuint16_t queue_id;      /** < queue number. */\n };\n \n+#define RTE_ETH_FDIR_MAX_FLEXLEN         16 /** < Max length of flexbytes. */\n+\n+/**\n+ * Flow type\n+ */\n+enum rte_eth_flow_type {\n+\tRTE_ETH_FLOW_TYPE_NONE = 0,\n+\tRTE_ETH_FLOW_TYPE_UDPV4,\n+\tRTE_ETH_FLOW_TYPE_TCPV4,\n+\tRTE_ETH_FLOW_TYPE_SCTPV4,\n+\tRTE_ETH_FLOW_TYPE_IPV4_OTHER,\n+\tRTE_ETH_FLOW_TYPE_FRAG_IPV4,\n+\tRTE_ETH_FLOW_TYPE_UDPV6,\n+\tRTE_ETH_FLOW_TYPE_TCPV6,\n+\tRTE_ETH_FLOW_TYPE_SCTPV6,\n+\tRTE_ETH_FLOW_TYPE_IPV6_OTHER,\n+\tRTE_ETH_FLOW_TYPE_FRAG_IPV6,\n+\tRTE_ETH_FLOW_TYPE_MAX = 64,\n+};\n+\n+/**\n+ * A structure used to define the input for IPV4 flow\n+ */\n+struct rte_eth_ipv4_flow {\n+\tuint32_t src_ip;      /**< IPv4 source address to match. */\n+\tuint32_t dst_ip;      /**< IPv4 destination address to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV4 UDP flow\n+ */\n+struct rte_eth_udpv4_flow {\n+\tstruct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */\n+\tuint16_t src_port;           /**< UDP source port to match. */\n+\tuint16_t dst_port;           /**< UDP destination port to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV4 TCP flow\n+ */\n+struct rte_eth_tcpv4_flow {\n+\tstruct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */\n+\tuint16_t src_port;           /**< TCP source port to match. */\n+\tuint16_t dst_port;           /**< TCP destination port to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV4 SCTP flow\n+ */\n+struct rte_eth_sctpv4_flow {\n+\tstruct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */\n+\tuint32_t verify_tag;         /**< Verify tag to match */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV6 flow\n+ */\n+struct rte_eth_ipv6_flow {\n+\tuint32_t src_ip[4];      /**< IPv6 source address to match. */\n+\tuint32_t dst_ip[4];      /**< IPv6 destination address to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV6 UDP flow\n+ */\n+struct rte_eth_udpv6_flow {\n+\tstruct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */\n+\tuint16_t src_port;           /**< UDP source port to match. */\n+\tuint16_t dst_port;           /**< UDP destination port to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV6 TCP flow\n+ */\n+struct rte_eth_tcpv6_flow {\n+\tstruct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */\n+\tuint16_t src_port;           /**< TCP source port to match. */\n+\tuint16_t dst_port;           /**< TCP destination port to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for IPV6 SCTP flow\n+ */\n+struct rte_eth_sctpv6_flow {\n+\tstruct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */\n+\tuint32_t verify_tag;         /**< Verify tag to match */\n+};\n+\n+/**\n+ * An union contains the inputs for all types of flow\n+ */\n+union rte_eth_fdir_flow {\n+\tstruct rte_eth_udpv4_flow  udp4_flow;\n+\tstruct rte_eth_tcpv4_flow  tcp4_flow;\n+\tstruct rte_eth_sctpv4_flow sctp4_flow;\n+\tstruct rte_eth_ipv4_flow   ip4_flow;\n+\tstruct rte_eth_udpv6_flow  udp6_flow;\n+\tstruct rte_eth_tcpv6_flow  tcp6_flow;\n+\tstruct rte_eth_sctpv6_flow sctp6_flow;\n+\tstruct rte_eth_ipv6_flow   ip6_flow;\n+};\n+\n+/**\n+ * A structure used to contain extend input of flow\n+ */\n+struct rte_eth_fdir_flow_ext {\n+\tuint16_t vlan_tci;\n+\tuint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];\n+\t/**< It is filled by the flexible payload to match. */\n+};\n+\n+/**\n+ * A structure used to define the input for a flow director filter entry\n+ */\n+struct rte_eth_fdir_input {\n+\tenum rte_eth_flow_type flow_type;      /**< Type of flow */\n+\tunion rte_eth_fdir_flow flow;\n+\t/**< Flow fields to match, dependent on flow_type */\n+\tstruct rte_eth_fdir_flow_ext flow_ext;\n+\t/**< Additional fields to match */\n+};\n+\n+/**\n+ * Behavior will be taken if FDIR match\n+ */\n+enum rte_eth_fdir_behavior {\n+\tRTE_ETH_FDIR_ACCEPT = 0,\n+\tRTE_ETH_FDIR_REJECT,\n+};\n+\n+/**\n+ * Flow director report status\n+ * It defines what will be reported if FDIR entry is matched.\n+ */\n+enum rte_eth_fdir_status {\n+\tRTE_ETH_FDIR_NO_REPORT_STATUS = 0, /**< Report nothing. */\n+\tRTE_ETH_FDIR_REPORT_ID,            /**< Only report FD ID. */\n+\tRTE_ETH_FDIR_REPORT_ID_FLEX_4,     /**< Report FD ID and 4 flex bytes. */\n+\tRTE_ETH_FDIR_REPORT_FLEX_8,        /**< Report 8 flex bytes. */\n+};\n+\n+/**\n+ * A structure used to define an action when match FDIR packet filter.\n+ */\n+struct rte_eth_fdir_action {\n+\tuint16_t rx_queue;        /**< Queue assigned to if FDIR match. */\n+\tenum rte_eth_fdir_behavior behavior;     /**< Behavior will be taken */\n+\tenum rte_eth_fdir_status report_status;  /**< Status report option */\n+\tuint8_t flex_off;\n+\t/**< If report_status is RTE_ETH_FDIR_REPORT_ID_FLEX_4 or\n+\t     RTE_ETH_FDIR_REPORT_FLEX_8, flex_off specifies where the reported\n+\t     flex bytes start from in flexible payload. */\n+};\n+\n+/**\n+ * A structure used to define the flow director filter entry by filter_ctrl API\n+ * It supports RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_ADD and\n+ * RTE_ETH_FILTER_DELETE operations.\n+ */\n+struct rte_eth_fdir_filter {\n+\tuint32_t soft_id;\n+\t/**< ID, an unique value is required when deal with FDIR entry */\n+\tstruct rte_eth_fdir_input input;    /**< Input set */\n+\tstruct rte_eth_fdir_action action;  /**< Action taken when match */\n+};\n+\n #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "04/22"
    ]
}