Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55059/?format=api
http://patches.dpdk.org/api/patches/55059/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190619151846.113820-67-leyi.rong@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": "<20190619151846.113820-67-leyi.rong@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190619151846.113820-67-leyi.rong@intel.com", "date": "2019-06-19T15:18:43", "name": "[v3,66/69] net/ice/base: fix for UDP and TCP related switch rules", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8d0a0c0460a72eec297e7b8947f8b6a816351641", "submitter": { "id": 1204, "url": "http://patches.dpdk.org/api/people/1204/?format=api", "name": "Leyi Rong", "email": "leyi.rong@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190619151846.113820-67-leyi.rong@intel.com/mbox/", "series": [ { "id": 5083, "url": "http://patches.dpdk.org/api/series/5083/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5083", "date": "2019-06-19T15:17:37", "name": "shared code update", "version": 3, "mbox": "http://patches.dpdk.org/series/5083/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/55059/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/55059/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B13711CE53;\n\tWed, 19 Jun 2019 17:22:54 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 46E781C3A5\n\tfor <dev@dpdk.org>; Wed, 19 Jun 2019 17:21:39 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Jun 2019 08:21:38 -0700", "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby orsmga006.jf.intel.com with ESMTP; 19 Jun 2019 08:21:38 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.63,392,1557212400\"; d=\"scan'208\";a=\"165050605\"", "From": "Leyi Rong <leyi.rong@intel.com>", "To": "qi.z.zhang@intel.com", "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tDan Nowlin <dan.nowlin@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>", "Date": "Wed, 19 Jun 2019 23:18:43 +0800", "Message-Id": "<20190619151846.113820-67-leyi.rong@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190619151846.113820-1-leyi.rong@intel.com>", "References": "<20190611155221.2703-1-leyi.rong@intel.com>\n\t<20190619151846.113820-1-leyi.rong@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 66/69] net/ice/base: fix for UDP and TCP\n\trelated switch rules", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/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 corrects some errors in UDP and TCP switch rule\nprogramming by adding additional dummy packets.\n\nFixes: 5e81d85ff066 (\"net/ice/base: enable additional switch rules\")\n\nSigned-off-by: Dan Nowlin <dan.nowlin@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 156 +++++++++++++++++++++++-------\n 1 file changed, 123 insertions(+), 33 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 660d491ed..2e1dbfe42 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -89,7 +89,7 @@ u8 dummy_gre_packet[] = { 0, 0, 0, 0,\t\t/* ICE_MAC_OFOS 0 */\n \t\t\t};\n \n static const\n-struct ice_dummy_pkt_offsets dummy_udp_tun_packet_offsets[] = {\n+struct ice_dummy_pkt_offsets dummy_udp_tun_tcp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_UDP_OF,\t\t34 },\n@@ -101,7 +101,7 @@ struct ice_dummy_pkt_offsets dummy_udp_tun_packet_offsets[] = {\n };\n \n static const\n-u8 dummy_udp_tun_packet[] = {\n+u8 dummy_udp_tun_tcp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n@@ -138,7 +138,80 @@ u8 dummy_udp_tun_packet[] = {\n };\n \n static const\n-struct ice_dummy_pkt_offsets dummy_tcp_tun_packet_offsets[] = {\n+struct ice_dummy_pkt_offsets dummy_udp_tun_udp_packet_offsets[] = {\n+\t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_IPV4_OFOS,\t14 },\n+\t{ ICE_UDP_OF,\t\t34 },\n+\t{ ICE_VXLAN,\t\t42 },\n+\t{ ICE_MAC_IL,\t\t50 },\n+\t{ ICE_IPV4_IL,\t\t64 },\n+\t{ ICE_UDP_ILOS,\t\t84 },\n+\t{ ICE_PROTOCOL_LAST,\t0 },\n+};\n+\n+static const\n+u8 dummy_udp_tun_udp_packet[] = {\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x08, 0x00,\n+\n+\t0x45, 0x00, 0x00, 0x4e, /* ICE_IPV4_OFOS 14 */\n+\t0x00, 0x01, 0x00, 0x00,\n+\t0x00, 0x11, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x00, 0x00, 0x12, 0xb5, /* ICE_UDP_OF 34 */\n+\t0x00, 0x3a, 0x00, 0x00,\n+\n+\t0x0c, 0x00, 0x00, 0x03, /* ICE_VXLAN 42 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 50 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x08, 0x00,\n+\n+\t0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_IL 64 */\n+\t0x00, 0x01, 0x00, 0x00,\n+\t0x00, 0x11, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 84 */\n+\t0x00, 0x08, 0x00, 0x00,\n+};\n+\n+static const\n+struct ice_dummy_pkt_offsets dummy_udp_packet_offsets[] = {\n+\t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_IPV4_OFOS,\t14 },\n+\t{ ICE_UDP_ILOS,\t\t34 },\n+\t{ ICE_PROTOCOL_LAST,\t0 },\n+};\n+\n+static const u8\n+dummy_udp_packet[] = {\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x08, 0x00,\n+\n+\t0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 14 */\n+\t0x00, 0x01, 0x00, 0x00,\n+\t0x00, 0x11, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_UDP_ILOS 34 */\n+\t0x00, 0x08, 0x00, 0x00,\n+\n+\t0x00, 0x00,\t/* 2 bytes for 4 byte alignment */\n+};\n+\n+static const\n+struct ice_dummy_pkt_offsets dummy_tcp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_TCP_IL,\t\t34 },\n@@ -146,22 +219,26 @@ struct ice_dummy_pkt_offsets dummy_tcp_tun_packet_offsets[] = {\n };\n \n static const u8\n-dummy_tcp_tun_packet[] = {0, 0, 0, 0,\t\t/* ICE_MAC_OFOS 0 */\n-\t\t\t 0, 0, 0, 0,\n-\t\t\t 0, 0, 0, 0,\n-\t\t\t 0x08, 0,\n-\t\t\t 0x45, 0, 0, 0x28, /* ICE_IPV4_OFOS 14 */\n-\t\t\t 0, 0x01, 0, 0,\n-\t\t\t 0x40, 0x06, 0xF5, 0x69,\n-\t\t\t 0, 0, 0, 0,\n-\t\t\t 0, 0, 0, 0,\n-\t\t\t 0, 0, 0, 0,\t\t/* ICE_TCP_IL 34 */\n-\t\t\t 0, 0, 0, 0,\n-\t\t\t 0, 0, 0, 0,\n-\t\t\t 0x50, 0x02, 0x20,\n-\t\t\t 0, 0x9, 0x79, 0, 0,\n-\t\t\t 0, 0 /* 2 bytes padding for 4 byte alignment*/\n-\t\t\t};\n+dummy_tcp_packet[] = {\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x08, 0x00,\n+\n+\t0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 14 */\n+\t0x00, 0x01, 0x00, 0x00,\n+\t0x00, 0x06, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_TCP_IL 34 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x50, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x00, 0x00,\t/* 2 bytes for 4 byte alignment */\n+};\n \n /* this is a recipe to profile bitmap association */\n static ice_declare_bitmap(recipe_to_profile[ICE_MAX_NUM_RECIPES],\n@@ -5195,8 +5272,16 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\t u16 *pkt_len,\n \t\t const struct ice_dummy_pkt_offsets **offsets)\n {\n+\tbool tcp = false, udp = false;\n \tu16 i;\n \n+\tfor (i = 0; i < lkups_cnt; i++) {\n+\t\tif (lkups[i].type == ICE_UDP_ILOS)\n+\t\t\tudp = true;\n+\t\telse if (lkups[i].type == ICE_TCP_IL)\n+\t\t\ttcp = true;\n+\t}\n+\n \tif (tun_type == ICE_SW_TUN_NVGRE || tun_type == ICE_ALL_TUNNELS) {\n \t\t*pkt = dummy_gre_packet;\n \t\t*pkt_len = sizeof(dummy_gre_packet);\n@@ -5205,25 +5290,30 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t}\n \n \tif (tun_type == ICE_SW_TUN_VXLAN || tun_type == ICE_SW_TUN_GENEVE ||\n-\t tun_type == ICE_SW_TUN_VXLAN_GPE) {\n-\t\t*pkt = dummy_udp_tun_packet;\n-\t\t*pkt_len = sizeof(dummy_udp_tun_packet);\n-\t\t*offsets = dummy_udp_tun_packet_offsets;\n+\t tun_type == ICE_SW_TUN_VXLAN_GPE || tun_type == ICE_SW_TUN_UDP) {\n+\t\tif (tcp) {\n+\t\t\t*pkt = dummy_udp_tun_tcp_packet;\n+\t\t\t*pkt_len = sizeof(dummy_udp_tun_tcp_packet);\n+\t\t\t*offsets = dummy_udp_tun_tcp_packet_offsets;\n+\t\t\treturn;\n+\t\t}\n+\n+\t\t*pkt = dummy_udp_tun_udp_packet;\n+\t\t*pkt_len = sizeof(dummy_udp_tun_udp_packet);\n+\t\t*offsets = dummy_udp_tun_udp_packet_offsets;\n \t\treturn;\n \t}\n \n-\tfor (i = 0; i < lkups_cnt; i++) {\n-\t\tif (lkups[i].type == ICE_UDP_ILOS) {\n-\t\t\t*pkt = dummy_udp_tun_packet;\n-\t\t\t*pkt_len = sizeof(dummy_udp_tun_packet);\n-\t\t\t*offsets = dummy_udp_tun_packet_offsets;\n-\t\t\treturn;\n-\t\t}\n+\tif (udp) {\n+\t\t*pkt = dummy_udp_packet;\n+\t\t*pkt_len = sizeof(dummy_udp_packet);\n+\t\t*offsets = dummy_udp_packet_offsets;\n+\t\treturn;\n \t}\n \n-\t*pkt = dummy_tcp_tun_packet;\n-\t*pkt_len = sizeof(dummy_tcp_tun_packet);\n-\t*offsets = dummy_tcp_tun_packet_offsets;\n+\t*pkt = dummy_tcp_packet;\n+\t*pkt_len = sizeof(dummy_tcp_packet);\n+\t*offsets = dummy_tcp_packet_offsets;\n }\n \n /**\n", "prefixes": [ "v3", "66/69" ] }{ "id": 55059, "url": "