Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/46924/?format=api
http://patchwork.dpdk.org/api/patches/46924/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20181017010412.23141-3-dg@adax.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20181017010412.23141-3-dg@adax.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20181017010412.23141-3-dg@adax.com", "date": "2018-10-17T01:04:09", "name": "[v4,2/6] kni: add link status test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ad324d4693e03bce518f3d99545b32b883fa8604", "submitter": { "id": 1040, "url": "http://patchwork.dpdk.org/api/people/1040/?format=api", "name": "Dan Gora", "email": "dg@adax.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20181017010412.23141-3-dg@adax.com/mbox/", "series": [ { "id": 1935, "url": "http://patchwork.dpdk.org/api/series/1935/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=1935", "date": "2018-10-17T01:04:09", "name": null, "version": 4, "mbox": "http://patchwork.dpdk.org/series/1935/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/46924/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/46924/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 743155942;\n\tWed, 17 Oct 2018 03:04:44 +0200 (CEST)", "from mail-qk1-f193.google.com (mail-qk1-f193.google.com\n\t[209.85.222.193]) by dpdk.org (Postfix) with ESMTP id A286258CB\n\tfor <dev@dpdk.org>; Wed, 17 Oct 2018 03:04:41 +0200 (CEST)", "by mail-qk1-f193.google.com with SMTP id m8-v6so15432468qka.12\n\tfor <dev@dpdk.org>; Tue, 16 Oct 2018 18:04:41 -0700 (PDT)", "from snappy.local.lan ([187.74.142.5])\n\tby smtp.gmail.com with ESMTPSA id\n\tv54-v6sm19547508qtc.81.2018.10.16.18.04.38\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 16 Oct 2018 18:04:39 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Nu2FQsaWEPNQQlPYUjX6Jf9UUv5Errbh07snQSA60GI=;\n\tb=SoA39RFrhq0E/gzn4Mhoyw4uEW9lj9FgsfsYRJ4m7I/VzRda26Uckp5l78DllZpNZv\n\tiGS25cdbTfMlfuv6PG+8lnIpgQX2GBg9vtLbcAqo5jYLoPlJZW+9Q/Ml7hWBGPdx4NSd\n\tYJQmP1hAazgg/T7iJyAYsT1HfRhwUX2vIhg62OqZmr8RUbfKN7uTTECWteiXBC3YfTXo\n\tI/FZPXDu8ifrnHobGpIHp4icWAczTjSw8E7SeT81m1CvJPRDpt4pLDqN2yRwfgTwP2J2\n\t2BJPnrzPFCMMMTUN7YRvINIZRnor3iTwqbnb7TX8gad1wgeu+pPS3Uti3xChGEeUNSUy\n\tlmhQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=Nu2FQsaWEPNQQlPYUjX6Jf9UUv5Errbh07snQSA60GI=;\n\tb=BlPmD0VV0U5+v+iHBE+e922FO3KmdMMYA1j4Ysz0xsC+v4fC2pAeW+7HXzGg1cXzqG\n\t2V694JNNQHrVDlPumFNN44u9mvxSAtH5gDD2MYBUeF9ff9tIIotTkIb1vxn7BktfTzym\n\tCtMHzPVNlMCiliqmVrJQY/DuC4m8NCWP36tbfdtDcF+8Gf/lefmtsPOeY0QcpKijZ86v\n\tYy7C6kyOiDW2VZGll3x5u/ki6wukTOxuKgdii/JLYS0fdOVwFhu5+e1QqgfUZf/MYL72\n\t5ieSBWxtyVR1gTwEneu2347gwjDYa8OhPB6npTs60F1/qT/hrToC7g5b1UrpJt7+fgMS\n\tFCig==", "X-Gm-Message-State": "ABuFfohEXUmvqy9NqkIC0wDAd+BgvnRSoLIJrtXBP2qIUGpadzxOp2Yz\n\txvH1wGiyzUt0ZWfYRc81/j3E8POPTco=", "X-Google-Smtp-Source": "ACcGV60I9A9u/OzcdTSQElz5l26pJx4Gxjb2DJQLxcrqO6d1UA2fYxdp5KubKPhNIOiIpNmcQlB/ig==", "X-Received": "by 2002:ae9:df02:: with SMTP id\n\tt2-v6mr22472239qkf.161.1539738280692; \n\tTue, 16 Oct 2018 18:04:40 -0700 (PDT)", "From": "Dan Gora <dg@adax.com>", "To": "dev@dpdk.org", "Cc": "Igor Ryzhov <iryzhov@nfware.com>,\n\tStephen Hemminger <stephen@networkplumber.org>,\n\tFerruh Yigit <ferruh.yigit@intel.com>, Dan Gora <dg@adax.com>", "Date": "Tue, 16 Oct 2018 22:04:09 -0300", "Message-Id": "<20181017010412.23141-3-dg@adax.com>", "X-Mailer": "git-send-email 2.19.0", "In-Reply-To": "<20180911232906.18352-1-dg@adax.com>", "References": "<20180911232906.18352-1-dg@adax.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v4 2/6] kni: add link status test", "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": "Test changing the link status of the KNI interface with\nrte_kni_update_link().\n\nSigned-off-by: Dan Gora <dg@adax.com>\n---\n test/test/test_kni.c | 77 ++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 77 insertions(+)", "diff": "diff --git a/test/test/test_kni.c b/test/test/test_kni.c\nindex cf64c0b27..e38206905 100644\n--- a/test/test/test_kni.c\n+++ b/test/test/test_kni.c\n@@ -118,6 +118,79 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)\n \t\t\t\t\t port_id, kni_pkt_mtu);\n \treturn 0;\n }\n+\n+static int\n+test_kni_link_change(void)\n+{\n+\tint ret;\n+\tint pid;\n+\n+\tpid = fork();\n+\tif (pid < 0) {\n+\t\tprintf(\"Error: Failed to fork a process\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tif (pid == 0) {\n+\t\tprintf(\"Starting KNI Link status change tests.\\n\");\n+\t\tif (system(IFCONFIG TEST_KNI_PORT\" up\") == -1) {\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\tret = rte_kni_update_link(test_kni_ctx, 1);\n+\t\tif (ret < 0) {\n+\t\t\tprintf(\"Failed to change link state to Up ret=%d.\\n\",\n+\t\t\t\tret);\n+\t\t\tgoto error;\n+\t\t}\n+\t\trte_delay_ms(1000);\n+\t\tprintf(\"KNI: Set LINKUP, previous state=%d\\n\", ret);\n+\n+\t\tret = rte_kni_update_link(test_kni_ctx, 0);\n+\t\tif (ret != 1) {\n+\t\t\tprintf(\n+\t\t\"Failed! Previous link state should be 1, returned %d.\\n\",\n+\t\t\t\tret);\n+\t\t\tgoto error;\n+\t\t}\n+\t\trte_delay_ms(1000);\n+\t\tprintf(\"KNI: Set LINKDOWN, previous state=%d\\n\", ret);\n+\n+\t\tret = rte_kni_update_link(test_kni_ctx, 1);\n+\t\tif (ret != 0) {\n+\t\t\tprintf(\n+\t\t\"Failed! Previous link state should be 0, returned %d.\\n\",\n+\t\t\t\tret);\n+\t\t\tgoto error;\n+\t\t}\n+\t\tprintf(\"KNI: Set LINKUP, previous state=%d\\n\", ret);\n+\n+\t\tret = 0;\n+\t\trte_delay_ms(1000);\n+\n+error:\n+\t\tif (system(IFCONFIG TEST_KNI_PORT\" down\") == -1)\n+\t\t\tret = -1;\n+\n+\t\tprintf(\"KNI: Link status change tests: %s.\\n\",\n+\t\t\t(ret == 0) ? \"Passed\" : \"Failed\");\n+\t\texit(ret);\n+\t} else {\n+\t\tint p_ret, status;\n+\n+\t\twhile (1) {\n+\t\t\tp_ret = waitpid(pid, &status, WNOHANG);\n+\t\t\tif (p_ret != 0) {\n+\t\t\t\tif (WIFEXITED(status))\n+\t\t\t\t\treturn WEXITSTATUS(status);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\trte_delay_ms(10);\n+\t\t\trte_kni_handle_request(test_kni_ctx);\n+\t\t}\n+\t}\n+}\n /**\n * This loop fully tests the basic functions of KNI. e.g. transmitting,\n * receiving to, from kernel space, and kernel requests.\n@@ -401,6 +474,10 @@ test_kni_processing(uint16_t port_id, struct rte_mempool *mp)\n \t\tgoto fail_kni;\n \t}\n \n+\tret = test_kni_link_change();\n+\tif (ret != 0)\n+\t\tgoto fail_kni;\n+\n \trte_eal_mp_remote_launch(test_kni_loop, NULL, CALL_MASTER);\n \tRTE_LCORE_FOREACH_SLAVE(i) {\n \t\tif (rte_eal_wait_lcore(i) < 0) {\n", "prefixes": [ "v4", "2/6" ] }{ "id": 46924, "url": "