Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2270/?format=api
https://patches.dpdk.org/api/patches/2270/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421286361-11504-2-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": "<1421286361-11504-2-git-send-email-jingjing.wu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1421286361-11504-2-git-send-email-jingjing.wu@intel.com", "date": "2015-01-15T01:45:57", "name": "[dpdk-dev,1/5] ethdev: define ntuple filter type and its structure", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6bd553bbe669e6dc4c7ff93153099994623291c9", "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/1421286361-11504-2-git-send-email-jingjing.wu@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/2270/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/2270/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 BE91D5A7F;\n\tThu, 15 Jan 2015 02:46:18 +0100 (CET)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 370225A35\n\tfor <dev@dpdk.org>; Thu, 15 Jan 2015 02:46:10 +0100 (CET)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga103.fm.intel.com with ESMTP; 14 Jan 2015 17:40:53 -0800", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga003.jf.intel.com with ESMTP; 14 Jan 2015 17:39:55 -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 t0F1k72j015950;\n\tThu, 15 Jan 2015 09:46:07 +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 t0F1k4ji011545; Thu, 15 Jan 2015 09:46:07 +0800", "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0F1k4hV011541; \n\tThu, 15 Jan 2015 09:46:04 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.09,400,1418112000\"; d=\"scan'208\";a=\"512469772\"", "From": "Jingjing Wu <jingjing.wu@intel.com>", "To": "dev@dpdk.org", "Date": "Thu, 15 Jan 2015 09:45:57 +0800", "Message-Id": "<1421286361-11504-2-git-send-email-jingjing.wu@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1421286361-11504-1-git-send-email-jingjing.wu@intel.com>", "References": "<1421286361-11504-1-git-send-email-jingjing.wu@intel.com>", "Subject": "[dpdk-dev] [PATCH 1/5] ethdev: define ntuple filter type and its\n\tstructure", "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": "This patch defines ntuple filter type RTE_ETH_FILTER_NTUPLE and its structure rte_eth_ntuple_filter.\nIt also corrects the typo TCP_UGR_FLAG to TCP_URG_FLAG\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n lib/librte_ether/rte_eth_ctrl.h | 50 +++++++++++++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 2 ++\n 2 files changed, 52 insertions(+)", "diff": "diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h\nindex 5d9c387..58d830d 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_ETHERTYPE,\n+\tRTE_ETH_FILTER_NTUPLE,\n \tRTE_ETH_FILTER_TUNNEL,\n \tRTE_ETH_FILTER_FDIR,\n \tRTE_ETH_FILTER_MAX\n@@ -117,6 +118,55 @@ struct rte_eth_ethertype_filter {\n };\n \n /**\n+ * Define all structures for ntuple Filter type.\n+ */\n+\n+#define RTE_NTUPLE_FLAGS_DST_IP 0x0001 /**< If set, dst_ip is part of ntuple */\n+#define RTE_NTUPLE_FLAGS_SRC_IP 0x0002 /**< If set, src_ip is part of ntuple */\n+#define RTE_NTUPLE_FLAGS_DST_PORT 0x0004 /**< If set, dst_port is part of ntuple */\n+#define RTE_NTUPLE_FLAGS_SRC_PORT 0x0008 /**< If set, src_port is part of ntuple */\n+#define RTE_NTUPLE_FLAGS_PROTO 0x0010 /**< If set, protocol is part of ntuple */\n+#define RTE_NTUPLE_FLAGS_TCP_FLAG 0x0020 /**< If set, tcp flag is involved */\n+\n+#define RTE_5TUPLE_FLAGS ( \\\n+\t\tRTE_NTUPLE_FLAGS_DST_IP | \\\n+\t\tRTE_NTUPLE_FLAGS_SRC_IP | \\\n+\t\tRTE_NTUPLE_FLAGS_DST_PORT | \\\n+\t\tRTE_NTUPLE_FLAGS_SRC_PORT | \\\n+\t\tRTE_NTUPLE_FLAGS_PROTO)\n+\n+#define RTE_2TUPLE_FLAGS ( \\\n+\t\tRTE_NTUPLE_FLAGS_DST_PORT | \\\n+\t\tRTE_NTUPLE_FLAGS_PROTO)\n+\n+\n+/**\n+ * A structure used to define the ntuple filter entry\n+ * to support RTE_ETH_FILTER_NTUPLE with RTE_ETH_FILTER_ADD,\n+ * RTE_ETH_FILTER_DELETE and RTE_ETH_FILTER_GET operations.\n+ */\n+struct rte_eth_ntuple_filter {\n+\tuint16_t flags; /**< Flags from RTE_NTUPLE_FLAGS_* */\n+\tuint32_t dst_ip; /**< Destination IP address in big endian. */\n+\tuint32_t dst_ip_mask; /**< Mask of destination IP address. */\n+\tuint32_t src_ip; /**< Source IP address in big endian. */\n+\tuint32_t src_ip_mask; /**< Mask of destination IP address. */\n+\tuint16_t dst_port; /**< Destination port in big endian. */\n+\tuint16_t dst_port_mask; /**< Mask of destination port. */\n+\tuint16_t src_port; /**< Source Port in big endian. */\n+\tuint16_t src_port_mask; /**< Mask of source port. */\n+\tuint8_t proto; /**< L4 protocol. */\n+\tuint8_t proto_mask; /**< Mask of L4 protocol. */\n+\t/** tcp_flags only meaningful when the proto is TCP.\n+\t The packet matched above ntuple fields and contain\n+\t any set bit in tcp_flags will hit this filter. */\n+\tuint8_t tcp_flags;\n+\tuint16_t priority; /**< seven levels (001b-111b), 111b is highest,\n+\t\t\t\t used when more than one filter matches. */\n+\tuint16_t queue; /**< Queue assigned to when match*/\n+};\n+\n+/**\n * Tunneled type.\n */\n enum rte_eth_tunnel_type {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex ce0528f..551b28f 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -963,6 +963,8 @@ struct rte_eth_dev_callback;\n /** @internal Structure to keep track of registered callbacks */\n TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);\n \n+\n+#define TCP_URG_FLAG 0x20\n #define TCP_UGR_FLAG 0x20\n #define TCP_ACK_FLAG 0x10\n #define TCP_PSH_FLAG 0x08\n", "prefixes": [ "dpdk-dev", "1/5" ] }{ "id": 2270, "url": "