Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/94797/?format=api
https://patches.dpdk.org/api/patches/94797/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210624133216.3088933-1-ferruh.yigit@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": "<20210624133216.3088933-1-ferruh.yigit@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210624133216.3088933-1-ferruh.yigit@intel.com", "date": "2021-06-24T13:32:16", "name": "kni: update link only on change", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1d4fa1efd0715abf704b243c365bb451a43d2419", "submitter": { "id": 324, "url": "https://patches.dpdk.org/api/people/324/?format=api", "name": "Ferruh Yigit", "email": "ferruh.yigit@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210624133216.3088933-1-ferruh.yigit@intel.com/mbox/", "series": [ { "id": 17475, "url": "https://patches.dpdk.org/api/series/17475/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17475", "date": "2021-06-24T13:32:16", "name": "kni: update link only on change", "version": 1, "mbox": "https://patches.dpdk.org/series/17475/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/94797/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/94797/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-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 A85EAA0547;\n\tThu, 24 Jun 2021 15:32:40 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3734B40040;\n\tThu, 24 Jun 2021 15:32:40 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 65D774003C\n for <dev@dpdk.org>; Thu, 24 Jun 2021 15:32:39 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jun 2021 06:32:21 -0700", "from silpixa00399752.ir.intel.com (HELO\n silpixa00399752.ger.corp.intel.com) ([10.237.222.27])\n by orsmga007.jf.intel.com with ESMTP; 24 Jun 2021 06:32:20 -0700" ], "IronPort-SDR": [ "\n +DumLCeHhjc7/kZR+YoRG7BzQX34aCdvzTf/V3HM8KowkXaexWBJ1iiUVR8lbxCrTOXlRhVhcA\n 54m8GX++Bhkg==", "\n bsdBSo2zD1EWYOec4oSMKaUPJ6cGV5EFWQ34IcGtOrgPUqYyOWZH9MQrAeP59RpcIFYOTeEMkB\n 8MbC0XKS24aw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10024\"; a=\"204460294\"", "E=Sophos;i=\"5.83,296,1616482800\"; d=\"scan'208\";a=\"204460294\"", "E=Sophos;i=\"5.83,296,1616482800\"; d=\"scan'208\";a=\"445306075\"" ], "X-ExtLoop1": "1", "From": "Ferruh Yigit <ferruh.yigit@intel.com>", "To": "Ferruh Yigit <ferruh.yigit@intel.com>, Ray Kinsella <mdr@ashroe.eu>,\n Neil Horman <nhorman@tuxdriver.com>", "Cc": "dev@dpdk.org,\n\tDan Gora <dg@adax.com>", "Date": "Thu, 24 Jun 2021 14:32:16 +0100", "Message-Id": "<20210624133216.3088933-1-ferruh.yigit@intel.com>", "X-Mailer": "git-send-email 2.31.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] kni: update link only on change", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "'rte_kni_update_link()' updates virtual KNI interface link using kernel\nsysfs interface.\nIf the requested link status is same as interface link status, do not\nupdate the link status but return with success.\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\nCc: Dan Gora <dg@adax.com>\n---\n lib/kni/rte_kni.c | 5 ++++-\n lib/kni/version.map | 1 +\n 2 files changed, 5 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c\nindex 9dae6a8d7c0c..8ac4484272b0 100644\n--- a/lib/kni/rte_kni.c\n+++ b/lib/kni/rte_kni.c\n@@ -810,6 +810,9 @@ rte_kni_update_link(struct rte_kni *kni, unsigned int linkup)\n \t}\n \told_linkup = (old_carrier[0] == '1');\n \n+\tif (old_linkup == (int)linkup)\n+\t\tgoto out;\n+\n \tnew_carrier = linkup ? \"1\" : \"0\";\n \tret = write(fd, new_carrier, 1);\n \tif (ret < 1) {\n@@ -817,7 +820,7 @@ rte_kni_update_link(struct rte_kni *kni, unsigned int linkup)\n \t\tclose(fd);\n \t\treturn -1;\n \t}\n-\n+out:\n \tclose(fd);\n \treturn old_linkup;\n }\ndiff --git a/lib/kni/version.map b/lib/kni/version.map\nindex a93da95f3671..bb810a7f2f38 100644\n--- a/lib/kni/version.map\n+++ b/lib/kni/version.map\n@@ -19,5 +19,6 @@ DPDK_21 {\n EXPERIMENTAL {\n \tglobal:\n \n+\t# updated in v21.08\n \trte_kni_update_link;\n };\n", "prefixes": [] }{ "id": 94797, "url": "