Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/818464/?format=api
{ "id": 818464, "url": "http://patchwork.ozlabs.org/api/patches/818464/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/1506404199-23579-9-git-send-email-yliu@fridaylinux.org/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api", "name": "Open vSwitch", "link_name": "openvswitch", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "git@github.com:openvswitch/ovs.git", "webscm_url": "https://github.com/openvswitch/ovs", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1506404199-23579-9-git-send-email-yliu@fridaylinux.org>", "list_archive_url": null, "date": "2017-09-26T05:36:38", "name": "[ovs-dev,v3,8/9] netdev-dpdk: add debug for rte flow patterns", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "2d122c0de0e22cd05bf817d3c0010679c4494a15", "submitter": { "id": 72215, "url": "http://patchwork.ozlabs.org/api/people/72215/?format=api", "name": "Yuanhan Liu", "email": "yliu@fridaylinux.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/1506404199-23579-9-git-send-email-yliu@fridaylinux.org/mbox/", "series": [ { "id": 5061, "url": "http://patchwork.ozlabs.org/api/series/5061/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=5061", "date": "2017-09-26T05:36:30", "name": "OVS-DPDK flow offload with rte_flow", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/5061/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/818464/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/818464/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "ovs-dev@mail.linuxfoundation.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=fridaylinux-org.20150623.gappssmtp.com\n\theader.i=@fridaylinux-org.20150623.gappssmtp.com\n\theader.b=\"sh/zqera\"; dkim-atps=neutral" ], "Received": [ "from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1VHx1brgz9t30\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 15:43:57 +1000 (AEST)", "from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 9CEEBC0D;\n\tTue, 26 Sep 2017 05:40:44 +0000 (UTC)", "from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id F1291AB9\n\tfor <dev@openvswitch.org>; Tue, 26 Sep 2017 05:40:43 +0000 (UTC)", "from mail-pf0-f179.google.com (mail-pf0-f179.google.com\n\t[209.85.192.179])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5043A367\n\tfor <dev@openvswitch.org>; Tue, 26 Sep 2017 05:40:43 +0000 (UTC)", "by mail-pf0-f179.google.com with SMTP id m63so5038410pfk.7\n\tfor <dev@openvswitch.org>; Mon, 25 Sep 2017 22:40:43 -0700 (PDT)", "from localhost.localdomain ([101.228.205.132])\n\tby smtp.gmail.com with ESMTPSA id\n\to79sm13180077pfi.108.2017.09.25.22.40.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 25 Sep 2017 22:40:41 -0700 (PDT)" ], "X-Greylist": "whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=fridaylinux-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=eD5JKmVjWaJIytIv7Spg+jRu1XQO/2O5LsmidoH+dto=;\n\tb=sh/zqerazyJjfDmGZpvIoiTDEUEt5FKDiA43b139Wi9O+qMRWBZclU5q9ISMhfVvCy\n\tDjnbg39SeSAwhZMSZUqttiDDyaF+e//8M4XgXPo/zrnh+Q1EFgwk7CN8JiMAx5lyEUM1\n\tw3etdEaU/Hb1SogguTtoODKCN5KFfdQNiGl/4ZtwF6P4q61qraEUBL2vFQC9rpw05WrN\n\tYMmBkjuiHHzUNJ5Y+BfUPjqV7MihZyZhZY00CClqLrveWqIijH6vIRC453YGOlv6e/8j\n\tL65UurbMxUmYvyr7+7BNIxu34nPgccNk2CxpwfIxlfMwy23m/BK3zh+Tr7Rqv+8tkNV5\n\tb99g==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=eD5JKmVjWaJIytIv7Spg+jRu1XQO/2O5LsmidoH+dto=;\n\tb=tia+AgV4As32zLmBVDTqDYPBR8uoBrRZN1XmUSrY1XDfURhXuhqhwCHgepX9die6gQ\n\tUWLTy1R4JXeuvcR9gjN3kOzN+l5TuHFeqcmXGHLb/MU7zyFTKFjTuXjCoK+ie811r5LE\n\tOqxICbr105nnO77rncnQJKTc9ivC1SYjXWclDgBYFI8iknItyhehAgouWTdZTnzoSqvJ\n\tgAMC2te9MM8G1WEjcwQh7OHn3e3nl0o1+9SKOu6a9YK4m76tjJlOcFKsSw4vKmVnNSRk\n\tg+rHtHK9z3254wVgbROUHcOHD+fBrwKV/8Wnr8PoxrDP2h4gVc425+NwkioNMK6Ytf/y\n\t4SjA==", "X-Gm-Message-State": "AHPjjUjmcx8D0rKHOV8g3bxRceAi3Ozny+ei0sRxxliBOzVHTHqBOoSP\n\tiyBzcjWRDNHS9+eWGEfb2dsT3VNC3AJxdQ==", "X-Google-Smtp-Source": "AOwi7QCEC2COWQq7HRqKq1dZkN617IxZq44l/QHuZs2lLoiNSNdGBJQpKpEVGWfVU7FgPMplOgBiuA==", "X-Received": "by 10.84.160.204 with SMTP id v12mr9646863plg.382.1506404442552; \n\tMon, 25 Sep 2017 22:40:42 -0700 (PDT)", "From": "Yuanhan Liu <yliu@fridaylinux.org>", "To": "dev@openvswitch.org", "Date": "Tue, 26 Sep 2017 13:36:38 +0800", "Message-Id": "<1506404199-23579-9-git-send-email-yliu@fridaylinux.org>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1506404199-23579-1-git-send-email-yliu@fridaylinux.org>", "References": "<1506404199-23579-1-git-send-email-yliu@fridaylinux.org>", "X-Spam-Status": "No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1", "X-Spam-Checker-Version": "SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org", "Cc": "Simon Horman <simon.horman@netronome.com>", "Subject": "[ovs-dev] [PATCH v3 8/9] netdev-dpdk: add debug for rte flow\n\tpatterns", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.12", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>", "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>", "List-Post": "<mailto:ovs-dev@openvswitch.org>", "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>", "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "ovs-dev-bounces@openvswitch.org", "Errors-To": "ovs-dev-bounces@openvswitch.org" }, "content": "The log level will be set to DBG when this patchset is close to\nbeing merged.\n\nCo-authored-by: Finn Christensen <fc@napatech.com>\nSigned-off-by: Yuanhan Liu <yliu@fridaylinux.org>\nSigned-off-by: Finn Christensen <fc@napatech.com>\n---\n lib/netdev-dpdk.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 177 insertions(+)", "diff": "diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c\nindex 02c3677..80fd64b 100644\n--- a/lib/netdev-dpdk.c\n+++ b/lib/netdev-dpdk.c\n@@ -3420,6 +3420,182 @@ struct flow_actions {\n };\n \n static void\n+dump_flow_pattern(struct rte_flow_item *item)\n+{\n+ if (item->type == RTE_FLOW_ITEM_TYPE_ETH) {\n+ const struct rte_flow_item_eth *eth_spec = item->spec;\n+ const struct rte_flow_item_eth *eth_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow eth pattern:\\n\");\n+ if (eth_spec) {\n+ VLOG_INFO(\"spec: src=\"ETH_ADDR_FMT\", dst=\"ETH_ADDR_FMT\", \"\n+ \"type=0x%04\" PRIx16\"\\n\",\n+ eth_spec->src.addr_bytes[0], eth_spec->src.addr_bytes[1],\n+ eth_spec->src.addr_bytes[2], eth_spec->src.addr_bytes[3],\n+ eth_spec->src.addr_bytes[4], eth_spec->src.addr_bytes[5],\n+ eth_spec->dst.addr_bytes[0], eth_spec->dst.addr_bytes[1],\n+ eth_spec->dst.addr_bytes[2], eth_spec->dst.addr_bytes[3],\n+ eth_spec->dst.addr_bytes[4], eth_spec->dst.addr_bytes[5],\n+ ntohs(eth_spec->type));\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+ if (eth_mask) {\n+ VLOG_INFO(\"mask: src=\"ETH_ADDR_FMT\", dst=\"ETH_ADDR_FMT\", \"\n+ \"type=0x%04\"PRIx16\"\\n\",\n+ eth_mask->src.addr_bytes[0], eth_mask->src.addr_bytes[1],\n+ eth_mask->src.addr_bytes[2], eth_mask->src.addr_bytes[3],\n+ eth_mask->src.addr_bytes[4], eth_mask->src.addr_bytes[5],\n+ eth_mask->dst.addr_bytes[0], eth_mask->dst.addr_bytes[1],\n+ eth_mask->dst.addr_bytes[2], eth_mask->dst.addr_bytes[3],\n+ eth_mask->dst.addr_bytes[4], eth_mask->dst.addr_bytes[5],\n+ eth_mask->type);\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+\n+ if (item->type == RTE_FLOW_ITEM_TYPE_VLAN) {\n+ const struct rte_flow_item_vlan *vlan_spec = item->spec;\n+ const struct rte_flow_item_vlan *vlan_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow vlan pattern:\\n\");\n+ if (vlan_spec) {\n+ VLOG_INFO(\"spec: tpid=0x%\"PRIx16\", tci=0x%\"PRIx16\"\\n\",\n+ ntohs(vlan_spec->tpid), ntohs(vlan_spec->tci));\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+\n+ if (vlan_mask) {\n+ VLOG_INFO(\"mask: tpid=0x%\"PRIx16\", tci=0x%\"PRIx16\"\\n\",\n+ vlan_mask->tpid, vlan_mask->tci);\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+\n+ if (item->type == RTE_FLOW_ITEM_TYPE_IPV4) {\n+ const struct rte_flow_item_ipv4 *ipv4_spec = item->spec;\n+ const struct rte_flow_item_ipv4 *ipv4_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow ipv4 pattern:\\n\");\n+ if (ipv4_spec) {\n+ VLOG_INFO(\"spec: tos=0x%\"PRIx8\", ttl=%\"PRIx8\", proto=0x%\"PRIx8\n+ \", src=\"IP_FMT\", dst=\"IP_FMT\"\\n\",\n+ ipv4_spec->hdr.type_of_service,\n+ ipv4_spec->hdr.time_to_live,\n+ ipv4_spec->hdr.next_proto_id,\n+ IP_ARGS(ipv4_spec->hdr.src_addr),\n+ IP_ARGS(ipv4_spec->hdr.dst_addr));\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+ if (ipv4_mask) {\n+ VLOG_INFO(\"mask: tos=0x%\"PRIx8\", ttl=%\"PRIx8\", proto=0x%\"PRIx8\n+ \", src=\"IP_FMT\", dst=\"IP_FMT\"\\n\",\n+ ipv4_mask->hdr.type_of_service,\n+ ipv4_mask->hdr.time_to_live,\n+ ipv4_mask->hdr.next_proto_id,\n+ IP_ARGS(ipv4_mask->hdr.src_addr),\n+ IP_ARGS(ipv4_mask->hdr.dst_addr));\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+\n+ if (item->type == RTE_FLOW_ITEM_TYPE_UDP) {\n+ const struct rte_flow_item_udp *udp_spec = item->spec;\n+ const struct rte_flow_item_udp *udp_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow udp pattern:\\n\");\n+ if (udp_spec) {\n+ VLOG_INFO(\"spec: src_port=%\"PRIu16\", dst_port=%\"PRIu16\"\\n\",\n+ ntohs(udp_spec->hdr.src_port),\n+ ntohs(udp_spec->hdr.dst_port));\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+ if (udp_mask) {\n+ VLOG_INFO(\"mask: src_port=0x%\"PRIx16\", dst_port=0x%\"PRIx16\"\\n\",\n+ udp_mask->hdr.src_port,\n+ udp_mask->hdr.dst_port);\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+\n+ if (item->type == RTE_FLOW_ITEM_TYPE_SCTP) {\n+ const struct rte_flow_item_sctp *sctp_spec = item->spec;\n+ const struct rte_flow_item_sctp *sctp_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow sctp pattern:\\n\");\n+ if (sctp_spec) {\n+ VLOG_INFO(\"spec: src_port=%\"PRIu16\", dst_port=%\"PRIu16\"\\n\",\n+ ntohs(sctp_spec->hdr.src_port),\n+ ntohs(sctp_spec->hdr.dst_port));\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+ if (sctp_mask) {\n+ VLOG_INFO(\"mask: src_port=0x%\"PRIx16\", dst_port=0x%\"PRIx16\"\\n\",\n+ sctp_mask->hdr.src_port,\n+ sctp_mask->hdr.dst_port);\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+\n+ if (item->type == RTE_FLOW_ITEM_TYPE_ICMP) {\n+ const struct rte_flow_item_icmp *icmp_spec = item->spec;\n+ const struct rte_flow_item_icmp *icmp_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow icmp pattern:\\n\");\n+ if (icmp_spec) {\n+ VLOG_INFO(\"spec: icmp_type=%\"PRIu8\", icmp_code=%\"PRIu8\"\\n\",\n+ ntohs(icmp_spec->hdr.icmp_type),\n+ ntohs(icmp_spec->hdr.icmp_code));\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+ if (icmp_mask) {\n+ VLOG_INFO(\"mask: icmp_type=0x%\"PRIx8\", icmp_code=0x%\"PRIx8\"\\n\",\n+ icmp_spec->hdr.icmp_type,\n+ icmp_spec->hdr.icmp_code);\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+\n+ if (item->type == RTE_FLOW_ITEM_TYPE_TCP) {\n+ const struct rte_flow_item_tcp *tcp_spec = item->spec;\n+ const struct rte_flow_item_tcp *tcp_mask = item->mask;\n+\n+ VLOG_INFO(\"rte flow tcp pattern:\\n\");\n+ if (tcp_spec) {\n+ VLOG_INFO(\"spec: src_port=%\"PRIu16\", dst_port=%\"PRIu16\n+ \", data_off=0x%\"PRIx8\", tcp_flags=0x%\"PRIx8\"\\n\",\n+ ntohs(tcp_spec->hdr.src_port),\n+ ntohs(tcp_spec->hdr.dst_port),\n+ tcp_spec->hdr.data_off,\n+ tcp_spec->hdr.tcp_flags);\n+ } else {\n+ VLOG_INFO(\"spec = null\\n\");\n+ }\n+ if (tcp_mask) {\n+ VLOG_INFO(\"mask: src_port=%\"PRIx16\", dst_port=%\"PRIx16\n+ \", data_off=0x%\"PRIx8\", tcp_flags=0x%\"PRIx8\"\\n\",\n+ tcp_mask->hdr.src_port,\n+ tcp_mask->hdr.dst_port,\n+ tcp_mask->hdr.data_off,\n+ tcp_mask->hdr.tcp_flags);\n+ } else {\n+ VLOG_INFO(\"mask = null\\n\");\n+ }\n+ }\n+}\n+\n+static void\n add_flow_pattern(struct flow_patterns *patterns, enum rte_flow_item_type type,\n const void *spec, const void *mask)\n {\n@@ -3438,6 +3614,7 @@ add_flow_pattern(struct flow_patterns *patterns, enum rte_flow_item_type type,\n patterns->items[cnt].spec = spec;\n patterns->items[cnt].mask = mask;\n patterns->items[cnt].last = NULL;\n+ dump_flow_pattern(&patterns->items[cnt]);\n patterns->cnt++;\n }\n \n", "prefixes": [ "ovs-dev", "v3", "8/9" ] }