Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/106471/?format=api
http://patches.dpdk.org/api/patches/106471/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20220125070809.1810-1-junx.dong@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": "<20220125070809.1810-1-junx.dong@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220125070809.1810-1-junx.dong@intel.com", "date": "2022-01-25T07:08:09", "name": "[V2] framework/crb: Add functions of check and wait specified link status", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "bd84c67b380855cf8393827747bb0c3dba182a0f", "submitter": { "id": 2237, "url": "http://patches.dpdk.org/api/people/2237/?format=api", "name": "Jun Dong", "email": "junx.dong@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20220125070809.1810-1-junx.dong@intel.com/mbox/", "series": [ { "id": 21348, "url": "http://patches.dpdk.org/api/series/21348/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=21348", "date": "2022-01-25T07:08:09", "name": "[V2] framework/crb: Add functions of check and wait specified link status", "version": 2, "mbox": "http://patches.dpdk.org/series/21348/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/106471/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/106471/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 5A564A04A9;\n\tTue, 25 Jan 2022 08:08:32 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 32EAA4282D;\n\tTue, 25 Jan 2022 08:08:32 +0100 (CET)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 040E14013F\n for <dts@dpdk.org>; Tue, 25 Jan 2022 08:08:29 +0100 (CET)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jan 2022 23:08:28 -0800", "from shwdenpg197.ccr.corp.intel.com ([10.253.109.35])\n by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jan 2022 23:08:18 -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=1643094510; x=1674630510;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=xMhRfM1hW93pFAI++z02sdiWpRxr557AUiJIW+QE4ms=;\n b=MYrBWmNbiJnPun6FFGEn94PuAU0lVz8eVW8ApsOwO+Gx3EGDr49e8S1V\n Ia4gCeLgeYruFSKIwEiezFbcE3YDVH0LYytwljN5LnxW0VL2+GelwzXoM\n uPHuR68NuI9rK39jmMtmcaSU2vZSOUlvgz9pz3QwBf7bg0UDYeXPGOZXX\n WIm4vNFFyxOlOboX0G9nnPdEs5lgfRzra21JrRU+HUGdaPzQhhTFQpft+\n iROX46nRGKB4xmn+1ts8lCMwRp1rZohj/vqjoNreYgEwf6VoQxv+ysPZE\n WCr9gyuy708BhI9A9jrspqOm7O9+DVjSAgPuSmywFWZsps0iXCog/vTvY g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10237\"; a=\"229812955\"", "E=Sophos;i=\"5.88,314,1635231600\"; d=\"scan'208\";a=\"229812955\"", "E=Sophos;i=\"5.88,314,1635231600\"; d=\"scan'208\";a=\"617519050\"" ], "From": "DongJunX <junx.dong@intel.com>", "To": "dts@dpdk.org", "Cc": "lijuan.tu@intel.com,\n\tqingx.sun@intel.com,\n\tjunx.dong@intel.com", "Subject": "[DTS][V2] framework/crb: Add functions of check and wait specified\n link status", "Date": "Tue, 25 Jan 2022 15:08:09 +0800", "Message-Id": "<20220125070809.1810-1-junx.dong@intel.com>", "X-Mailer": "git-send-email 2.33.1.windows.1", "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": "Signed-off-by: DongJunX <junx.dong@intel.com>\n---\n framework/crb.py | 30 ++++++++++++++++++++++++++++++\n 1 file changed, 30 insertions(+)", "diff": "diff --git a/framework/crb.py b/framework/crb.py\nindex bd4f565d..7875510f 100755\n--- a/framework/crb.py\n+++ b/framework/crb.py\n@@ -907,3 +907,33 @@ class Crb(object):\n else:\n self.logger.info(\"NIC %s may be not find %s\" % (intf, flag))\n return False\n+\n+ def is_interface_up(self, intf, timeout=15):\n+ \"\"\"\n+ check and wait port link status up until timeout\n+ \"\"\"\n+ for i in range(timeout):\n+ link_status = self.get_interface_link_status(intf)\n+ if link_status == 'Up':\n+ return True\n+ time.sleep(1)\n+ self.logger.error(f\"check and wait {intf} link up timeout\")\n+ return False\n+\n+ def is_interface_down(self, intf, timeout=15):\n+ \"\"\"\n+ check and wait port link status down until timeout\n+ \"\"\"\n+ for i in range(timeout):\n+ link_status = self.get_interface_link_status(intf)\n+ if link_status == 'Down':\n+ return True\n+ time.sleep(1)\n+ self.logger.error(f\"check and wait {intf} link down timeout\")\n+ return False\n+\n+ def get_interface_link_status(self, intf):\n+ out = self.send_expect(f\"ethtool {intf}\", \"#\")\n+ link_status_matcher = r'Link detected: (\\w+)'\n+ link_status = re.search(link_status_matcher, out).groups()[0]\n+ return 'Up' if link_status == 'yes' else 'Down'\n", "prefixes": [ "V2" ] }{ "id": 106471, "url": "