Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1329/?format=api
https://patches.dpdk.org/api/patches/1329/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416296251-7534-5-git-send-email-jijiang.liu@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": "<1416296251-7534-5-git-send-email-jijiang.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1416296251-7534-5-git-send-email-jijiang.liu@intel.com", "date": "2014-11-18T07:37:31", "name": "[dpdk-dev,4/4] testpmd:application changes", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "21acfad33ced828fcca84372f151f88d58fa7bf2", "submitter": { "id": 52, "url": "https://patches.dpdk.org/api/people/52/?format=api", "name": "Jijiang Liu", "email": "jijiang.liu@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416296251-7534-5-git-send-email-jijiang.liu@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/1329/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/1329/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 02EE87F30;\n\tTue, 18 Nov 2014 08:27:31 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id C72677F78\n\tfor <dev@dpdk.org>; Tue, 18 Nov 2014 08:27:27 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP; 17 Nov 2014 23:35:07 -0800", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 17 Nov 2014 23:37:46 -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 sAI7biBS006491;\n\tTue, 18 Nov 2014 15:37:44 +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 sAI7bgDr007599; Tue, 18 Nov 2014 15:37:44 +0800", "(from jijiangl@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAI7bgF1007595; \n\tTue, 18 Nov 2014 15:37:42 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.07,408,1413270000\"; d=\"scan'208\";a=\"638795291\"", "From": "Jijiang Liu <jijiang.liu@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 18 Nov 2014 15:37:31 +0800", "Message-Id": "<1416296251-7534-5-git-send-email-jijiang.liu@intel.com>", "X-Mailer": "git-send-email 1.7.12.2", "In-Reply-To": "<1416296251-7534-1-git-send-email-jijiang.liu@intel.com>", "References": "<1416296251-7534-1-git-send-email-jijiang.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH 4/4] testpmd:application changes", "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": "Change the codes in testpmd due to introducing abstract packet type.\n\nSigned-off-by: Jijiang Liu <jijiang.liu@intel.com>\n---\n app/test-pmd/csumonly.c | 12 ++++++------\n app/test-pmd/rxonly.c | 20 +++++++++-----------\n 2 files changed, 15 insertions(+), 17 deletions(-)", "diff": "diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex 8d10bfd..d9948e7 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -219,6 +219,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \tstruct tcp_hdr *inner_tcp_hdr;\n \tstruct sctp_hdr *sctp_hdr;\n \tstruct sctp_hdr *inner_sctp_hdr;\n+\tenum rte_eth_packet_type packet_type;\n \n \tuint16_t nb_rx;\n \tuint16_t nb_tx;\n@@ -272,11 +273,10 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\tmb = pkts_burst[i];\n \t\tl2_len = sizeof(struct ether_hdr);\n \t\tpkt_ol_flags = mb->ol_flags;\n+\t\tpacket_type = (enum rte_eth_packet_type)mb->packet_type;\n \t\tol_flags = (pkt_ol_flags & (~PKT_TX_L4_MASK));\n-\t\tipv4_tunnel = (pkt_ol_flags & PKT_RX_TUNNEL_IPV4_HDR) ?\n-\t\t\t\t1 : 0;\n-\t\tipv6_tunnel = (pkt_ol_flags & PKT_RX_TUNNEL_IPV6_HDR) ?\n-\t\t\t\t1 : 0;\n+\t\tipv4_tunnel = RTE_ETH_IS_TUNNEL_IPV4_HDR(packet_type);\n+\t\tipv6_tunnel = RTE_ETH_IS_TUNNEL_IPV6_HDR(packet_type);\n \t\teth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);\n \t\teth_type = rte_be_to_cpu_16(eth_hdr->ether_type);\n \t\tif (eth_type == ETHER_TYPE_VLAN) {\n@@ -309,7 +309,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t * + ipv4 or ipv6\n \t\t * + udp or tcp or sctp or others\n \t\t */\n-\t\tif (pkt_ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_TUNNEL_IPV4_HDR)) {\n+\t\tif (pkt_ol_flags & PKT_RX_IPV4_HDR) {\n \n \t\t\t/* Do not support ipv4 option field */\n \t\t\tl3_len = sizeof(struct ipv4_hdr) ;\n@@ -455,7 +455,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)\n \t\t\t\t}\n \t\t\t}\n \t\t\t/* End of L4 Handling*/\n-\t\t} else if (pkt_ol_flags & (PKT_RX_IPV6_HDR | PKT_RX_TUNNEL_IPV6_HDR)) {\n+\t\t} else if (pkt_ol_flags & PKT_RX_IPV6_HDR) {\n \t\t\tipv6_hdr = (struct ipv6_hdr *) (rte_pktmbuf_mtod(mb,\n \t\t\t\t\tunsigned char *) + l2_len);\n \t\t\tl3_len = sizeof(struct ipv6_hdr) ;\ndiff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c\nindex 9ad1df6..3bf1b93 100644\n--- a/app/test-pmd/rxonly.c\n+++ b/app/test-pmd/rxonly.c\n@@ -71,7 +71,7 @@\n \n #include \"testpmd.h\"\n \n-#define MAX_PKT_RX_FLAGS 13\n+#define MAX_PKT_RX_FLAGS 11\n static const char *pkt_rx_flag_names[MAX_PKT_RX_FLAGS] = {\n \t\"VLAN_PKT\",\n \t\"RSS_HASH\",\n@@ -86,9 +86,6 @@ static const char *pkt_rx_flag_names[MAX_PKT_RX_FLAGS] = {\n \n \t\"IEEE1588_PTP\",\n \t\"IEEE1588_TMST\",\n-\n-\t\"TUNNEL_IPV4_HDR\",\n-\t\"TUNNEL_IPV6_HDR\",\n };\n \n static inline void\n@@ -108,11 +105,12 @@ pkt_burst_receive(struct fwd_stream *fs)\n \tstruct rte_mbuf *pkts_burst[MAX_PKT_BURST];\n \tstruct rte_mbuf *mb;\n \tstruct ether_hdr *eth_hdr;\n+\tenum rte_eth_packet_type packet_type;\n \tuint16_t eth_type;\n \tuint64_t ol_flags;\n \tuint16_t nb_rx;\n-\tuint16_t i, packet_type;\n-\tuint64_t is_encapsulation;\n+\tuint16_t i;\n+\tuint32_t is_encapsulation;\n \n #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES\n \tuint64_t start_tsc;\n@@ -154,10 +152,10 @@ pkt_burst_receive(struct fwd_stream *fs)\n \t\teth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);\n \t\teth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);\n \t\tol_flags = mb->ol_flags;\n-\t\tpacket_type = mb->packet_type;\n+\t\tpacket_type = (enum rte_eth_packet_type)mb->packet_type;\n \n-\t\tis_encapsulation = ol_flags & (PKT_RX_TUNNEL_IPV4_HDR |\n-\t\t\t\tPKT_RX_TUNNEL_IPV6_HDR);\n+\t\tis_encapsulation = RTE_ETH_IS_TUNNEL_IPV4_HDR(packet_type) |\n+\t\t\t\tRTE_ETH_IS_TUNNEL_IPV6_HDR(packet_type);\n \n \t\tprint_ether_addr(\" src=\", ð_hdr->s_addr);\n \t\tprint_ether_addr(\" - dst=\", ð_hdr->d_addr);\n@@ -186,7 +184,7 @@ pkt_burst_receive(struct fwd_stream *fs)\n \t\t\tl2_len = sizeof(struct ether_hdr);\n \n \t\t\t /* Do not support ipv4 option field */\n-\t\t\tif (ol_flags & PKT_RX_TUNNEL_IPV4_HDR) {\n+\t\t\tif (RTE_ETH_IS_TUNNEL_IPV4_HDR(packet_type)) {\n \t\t\t\tl3_len = sizeof(struct ipv4_hdr);\n \t\t\t\tipv4_hdr = (struct ipv4_hdr *) (rte_pktmbuf_mtod(mb,\n \t\t\t\t\t\tunsigned char *) + l2_len);\n@@ -207,7 +205,7 @@ pkt_burst_receive(struct fwd_stream *fs)\n \n \t\t\t\tprintf(\" - VXLAN packet: packet type =%d, \"\n \t\t\t\t\t\"Destination UDP port =%d, VNI = %d\",\n-\t\t\t\t\tpacket_type, RTE_BE_TO_CPU_16(udp_hdr->dst_port),\n+\t\t\t\t\t(uint16_t)packet_type, RTE_BE_TO_CPU_16(udp_hdr->dst_port),\n \t\t\t\t\trte_be_to_cpu_32(vxlan_hdr->vx_vni) >> 8);\n \t\t\t}\n \t\t}\n", "prefixes": [ "dpdk-dev", "4/4" ] }{ "id": 1329, "url": "