Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/124106/?format=api
http://patches.dpdk.org/api/patches/124106/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20230217122023.2345221-6-songx.jiale@intel.com/", "project": { "id": 3, "url": "http://patches.dpdk.org/api/projects/3/?format=api", "name": "DTS", "link_name": "dts", "list_id": "dts.dpdk.org", "list_email": "dts@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dts", "webscm_url": "http://git.dpdk.org/tools/dts/", "list_archive_url": "https://inbox.dpdk.org/dts", "list_archive_url_format": "https://inbox.dpdk.org/dts/{}", "commit_url_format": "" }, "msgid": "<20230217122023.2345221-6-songx.jiale@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20230217122023.2345221-6-songx.jiale@intel.com", "date": "2023-02-17T12:20:23", "name": "[V2,5/5] tests/pmd_bonded: modify script to adapt changes in dpdk", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "413b5c521e40460976ec5aa2a66f3fa3f040e332", "submitter": { "id": 2352, "url": "http://patches.dpdk.org/api/people/2352/?format=api", "name": "Jiale, SongX", "email": "songx.jiale@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20230217122023.2345221-6-songx.jiale@intel.com/mbox/", "series": [ { "id": 27055, "url": "http://patches.dpdk.org/api/series/27055/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=27055", "date": "2023-02-17T12:20:18", "name": "modify script to adapt changes in dpdk", "version": 2, "mbox": "http://patches.dpdk.org/series/27055/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/124106/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/124106/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dts-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7396941CB9;\n\tFri, 17 Feb 2023 05:23:23 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6AB79410F1;\n\tFri, 17 Feb 2023 05:23:23 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 449F141141\n for <dts@dpdk.org>; Fri, 17 Feb 2023 05:23:21 +0100 (CET)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 20:23:20 -0800", "from unknown (HELO localhost.localdomain) ([10.239.252.20])\n by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 20:23:19 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1676607801; x=1708143801;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=eU2e7Hoock1wxkUsOZY+qd+4JXumGGibIciOQF0PalM=;\n b=OR9Ei+Xj3ecpRWC5dB+t7VBbvLcSQbGdUWe+uyzK/OHxMIgcNBSd93MP\n 2chGMzNDDuywG6OgFRYV41etcZyYMF+kqqs68vPJn6+fyM9UwIU5BPMxS\n 9LhtVTTqz5FNLPxXQn+FtVZG1VVVZi87+izCEDqkYIMiyeNDeg86JOJfJ\n 6rEHRiWxUt0Rlw/9VUhlbodBOF/qlqqsCN8bQ4/gTIUH0LwejcKEtFb9r\n 5uP1AyOtwya8EUTzfB8JXFmsMm1j3jFgiad/eOJdVmMOokcPSY776MKGK\n gWByjNO3l4x3KOkEtWEsoOGn9/7CPJtbP0qWsHOpNXNWxi4WmJG735gp1 w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10623\"; a=\"359353892\"", "E=Sophos;i=\"5.97,304,1669104000\"; d=\"scan'208\";a=\"359353892\"", "E=McAfee;i=\"6500,9779,10623\"; a=\"663757851\"", "E=Sophos;i=\"5.97,304,1669104000\"; d=\"scan'208\";a=\"663757851\"" ], "From": "Song Jiale <songx.jiale@intel.com>", "To": "dts@dpdk.org", "Cc": "Song Jiale <songx.jiale@intel.com>", "Subject": "[dts] [PATCH V2 5/5] tests/pmd_bonded: modify script to adapt changes\n in dpdk", "Date": "Fri, 17 Feb 2023 12:20:23 +0000", "Message-Id": "<20230217122023.2345221-6-songx.jiale@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230217122023.2345221-1-songx.jiale@intel.com>", "References": "<20230217122023.2345221-1-songx.jiale@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dts@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "test suite reviews and discussions <dts.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dts/>", "List-Post": "<mailto:dts@dpdk.org>", "List-Help": "<mailto:dts-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>", "Errors-To": "dts-bounces@dpdk.org" }, "content": "the display information of the binding port in dpdk-testpmd has changed.\nmodify the script to adapt to this change.\n\nAccording to dpdk commit f3b5f3d35c59e1(\"app/testpmd: use dump API to show bonding info\").\n\n\nSigned-off-by: Song Jiale <songx.jiale@intel.com>\n---\n tests/TestSuite_pmd_bonded.py | 53 ++++++++++++++++++-----------------\n 1 file changed, 28 insertions(+), 25 deletions(-)", "diff": "diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py\nindex 97f76e93..a27a991a 100644\n--- a/tests/TestSuite_pmd_bonded.py\n+++ b/tests/TestSuite_pmd_bonded.py\n@@ -25,13 +25,13 @@ from framework.test_case import TestCase\n SOCKET_0 = 0\n SOCKET_1 = 1\n \n-MODE_ROUND_ROBIN = 0\n-MODE_ACTIVE_BACKUP = 1\n-MODE_XOR_BALANCE = 2\n-MODE_BROADCAST = 3\n-MODE_LACP = 4\n-MODE_TLB_BALANCE = 5\n-MODE_ALB_BALANCE = 6\n+MODE_ROUND_ROBIN = \"ROUND_ROBIN(0)\"\n+MODE_ACTIVE_BACKUP = \"ACTIVE_BACKUP(1)\"\n+MODE_XOR_BALANCE = \"BALANCE(2)\"\n+MODE_BROADCAST = \"BROADCAST(3)\"\n+MODE_LACP = \"8023AD(4)\"\n+MODE_TLB_BALANCE = \"TLB(5)\"\n+MODE_ALB_BALANCE = \"ALB(6)\"\n \n FRAME_SIZE_64 = 64\n FRAME_SIZE_65 = 65\n@@ -413,7 +413,7 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n \"\"\"\n Get the mode of the bonding device which you choose.\n \"\"\"\n- return self.get_info_from_bond_config(\"Bonding mode: \", \"\\d*\", bond_port)\n+ return self.get_info_from_bond_config(\"Bonding mode: \", \"\\S*\", bond_port)\n \n def get_bond_balance_policy(self, bond_port):\n \"\"\"\n@@ -449,7 +449,7 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n \"\"\"\n Get the primary slave of the bonding device which you choose.\n \"\"\"\n- return self.get_info_from_bond_config(\"Primary: \\[\", \"\\d*\", bond_port)\n+ return self.get_info_from_bond_config(\"Current Primary: \\[\", \"\\d*\", bond_port)\n \n def launch_app(self, pmd_param=\" \"):\n \"\"\"\n@@ -457,16 +457,18 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n \"\"\"\n self.pmdout.start_testpmd(\"all\", param=pmd_param)\n \n- def create_bonded_device(self, mode=0, socket=0, verify_detail=False):\n+ def create_bonded_device(self, mode=\"\", socket=0, verify_detail=False):\n \"\"\"\n Create a bonding device with the parameters you specified.\n \"\"\"\n+ p = r\"\\w+\\((\\d+)\\)\"\n+ mode_id = int(re.match(p, mode).group(1))\n out = self.dut.send_expect(\n- \"create bonded device %d %d\" % (mode, socket), \"testpmd> \"\n+ \"create bonded device %d %d\" % (mode_id, socket), \"testpmd> \"\n )\n self.verify(\n \"Created new bonded device\" in out,\n- \"Create bonded device on mode [%d] socket [%d] failed\" % (mode, socket),\n+ \"Create bonded device on mode [%s] socket [%d] failed\" % (mode, socket),\n )\n bond_port = self.get_value_from_str(\n \"Created new bonded device net_bonding_testpmd_[\\d] on \\(port \", \"\\d+\", out\n@@ -478,7 +480,7 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n \"show bonding config %d\" % bond_port, \"testpmd> \"\n )\n self.verify(\n- \"Bonding mode: %d\" % mode in out,\n+ \"Bonding mode: %s\" % mode in out,\n \"Bonding mode display error when create bonded device\",\n )\n self.verify(\n@@ -911,19 +913,20 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n Do some basic operations to bonded devices and slaves,\n such as adding, removing, setting primary or setting mode.\n \"\"\"\n+ p = r\"\\w+\\((\\d+)\\)\"\n+ mode_id = int(re.match(p, mode_set).group(1))\n bond_port_0 = self.create_bonded_device(mode_set, SOCKET_0, True)\n self.add_slave_to_bonding_device(bond_port_0, False, self.dut_ports[1])\n-\n mode_value = self.get_bond_mode(bond_port_0)\n- self.verify(\"%d\" % mode_set in mode_value, \"Setting bonding mode error\")\n+ self.verify(\"%s\" % mode_set in mode_value, \"Setting bonding mode error\")\n \n bond_port_1 = self.create_bonded_device(mode_set, SOCKET_0)\n self.add_slave_to_bonding_device(bond_port_0, False, self.dut_ports[0])\n self.add_slave_to_bonding_device(bond_port_1, True, self.dut_ports[0])\n \n- OTHER_MODE = mode_set + 1 if not mode_set else mode_set - 1\n+ OTHER_MODE = mode_id + 1 if not mode_id else mode_id - 1\n self.set_mode_for_bonding_device(bond_port_0, OTHER_MODE)\n- self.set_mode_for_bonding_device(bond_port_0, mode_set)\n+ self.set_mode_for_bonding_device(bond_port_0, mode_id)\n \n self.add_slave_to_bonding_device(bond_port_0, False, self.dut_ports[2])\n time.sleep(5)\n@@ -968,14 +971,14 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n self.verify(\n mac_address_1_orig == mac_address_bond_now\n and mac_address_bond_now == mac_address_2_now,\n- \"NOT all slaves MAC address same with bonding device in mode %d\"\n+ \"NOT all slaves MAC address same with bonding device in mode %s\"\n % mode_set,\n )\n else:\n self.verify(\n mac_address_1_orig == mac_address_bond_now\n and mac_address_bond_now != mac_address_2_now,\n- \"All slaves should not be the same in mode %d\" % mode_set,\n+ \"All slaves should not be the same in mode %s\" % mode_set,\n )\n \n new_mac = \"00:11:22:00:33:44\"\n@@ -990,7 +993,7 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n == mac_address_2_now\n == mac_address_bond_now\n == new_mac,\n- \"Set mac failed for bonding device in mode %d\" % mode_set,\n+ \"Set mac failed for bonding device in mode %s\" % mode_set,\n )\n elif mode_set == MODE_LACP:\n self.verify(\n@@ -998,14 +1001,14 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n and mac_address_1_now != new_mac\n and mac_address_2_now != new_mac\n and mac_address_1_now != mac_address_2_now,\n- \"Set mac failed for bonding device in mode %d\" % mode_set,\n+ \"Set mac failed for bonding device in mode %s\" % mode_set,\n )\n elif mode_set in [MODE_ACTIVE_BACKUP, MODE_TLB_BALANCE]:\n self.verify(\n mac_address_bond_now == new_mac\n and mac_address_1_now == new_mac\n and mac_address_bond_now != mac_address_2_now,\n- \"Set mac failed for bonding device in mode %d\" % mode_set,\n+ \"Set mac failed for bonding device in mode %s\" % mode_set,\n )\n \n self.set_primary_for_bonding_device(bond_port, self.dut_ports[2], False)\n@@ -1117,18 +1120,18 @@ UDP(sport=srcport, dport=destport)/Raw(load=\"\\x50\"*%s)], iface=\"%s\", count=%d)'\n if mode_set in [MODE_ROUND_ROBIN, MODE_XOR_BALANCE, MODE_BROADCAST]:\n self.verify(\n port_disabled_num == 4,\n- \"Not all slaves of bonded device turn promiscuous mode off in mode %d.\"\n+ \"Not all slaves of bonded device turn promiscuous mode off in mode %s.\"\n % mode_set,\n )\n elif mode_set == MODE_LACP:\n self.verify(\n port_disabled_num == 1,\n- \"Not only turn bound device promiscuous mode off in mode %d\" % mode_set,\n+ \"Not only turn bound device promiscuous mode off in mode %s\" % mode_set,\n )\n else:\n self.verify(\n port_disabled_num == 2,\n- \"Not only the primary slave turn promiscous mode off in mode %d, \"\n+ \"Not only the primary slave turn promiscous mode off in mode %s, \"\n % mode_set\n + \" when bonded device promiscous disabled.\",\n )\n", "prefixes": [ "V2", "5/5" ] }{ "id": 124106, "url": "