Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/32903/?format=api
https://patches.dpdk.org/api/patches/32903/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180104160112.28651-5-thomas@monjalon.net/", "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": "<20180104160112.28651-5-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20180104160112.28651-5-thomas@monjalon.net", "date": "2018-01-04T16:01:11", "name": "[dpdk-dev,v4,4/5] ethdev: add notifications for probing and removal", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "96d2e69aafd200ffcb428bb2e06cb1c4d9a05a40", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180104160112.28651-5-thomas@monjalon.net/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/32903/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/32903/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 67BC51B172;\n\tThu, 4 Jan 2018 17:01:45 +0100 (CET)", "from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n\t[66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 73B601B00C\n\tfor <dev@dpdk.org>; Thu, 4 Jan 2018 17:01:41 +0100 (CET)", "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id A56FA20BEB;\n\tThu, 4 Jan 2018 11:01:40 -0500 (EST)", "from frontend1 ([10.202.2.160])\n\tby compute1.internal (MEProxy); Thu, 04 Jan 2018 11:01:40 -0500", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 063C17E183;\n\tThu, 4 Jan 2018 11:01:39 -0500 (EST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tcc:date:from:in-reply-to:message-id:references:subject:to\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=VjhjxBOwY9Ky3E\n\tSJsXJ3Hz3cLVHwxv099yWFFnLoxh8=; b=sE6fbJov681PRoYx5Lt6tNlaAMl99y\n\tDHQhtFGrOoHHGfNFJcwu0IIKtempn+84mgLj1NGlM/GDU1ozAfh9pQ1FX2qdH2Ty\n\tt0Em6Z4xVZyZ5/Jcuc8PDLBHvZ7Fwq7+MMVBT6ggWE/Aokzn63inVEdQhi/rCY8d\n\tYcOQv4NGT2JuM=", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:date:from:in-reply-to:message-id\n\t:references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=\n\tfm1; bh=VjhjxBOwY9Ky3ESJsXJ3Hz3cLVHwxv099yWFFnLoxh8=; b=Dguz/MT+\n\tTTi9uEGjH12Fcv3oYoDoNSBIlXZFCVYEtRNM4kAjRj9Y3AOnatMb6Hj8R6DdZPbv\n\tUFrltdXUGpvXT3zxfDwbpNi1BzVV1yNk7IkVdAB3Xx3CWaefYkbACNOgU4Dzi/Ci\n\tS6Rd2Ekwmt7bl9Vips3t43IrdX0ZhbgJMNd3rRM/zvHNkOG5NT5nMXTsOYu0yHlh\n\t2rSgTlrG4zQLZfCGfzH3OgVsLyqe5wRUiJ6lwAgYNVsaL0q+QNf0gHPVzQjwYcP7\n\tJs5kTJv5fj1ncavT+JlwLEGACPW5cv/hrIP4OR7AXlRp4ZqvZ4jo35MwpJf2DceU\n\tePaQAkJrDlRnSw==" ], "X-ME-Sender": "<xms:5E9OWtEUajPoWaHab1KJhmBqIYmWiSFXW1H0DF3qSZVXJW8DAWRfdQ>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com", "Date": "Thu, 4 Jan 2018 17:01:11 +0100", "Message-Id": "<20180104160112.28651-5-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.15.1", "In-Reply-To": "<20180104160112.28651-1-thomas@monjalon.net>", "References": "<20171128221302.15400-1-thomas@monjalon.net>\n\t<20180104160112.28651-1-thomas@monjalon.net>", "Subject": "[dpdk-dev] [PATCH v4 4/5] ethdev: add notifications for probing and\n\tremoval", "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When a PMD finishes probing, it creates the new port by calling\nthe function rte_eth_dev_allocate().\nA notification of the new port is sent there to the upper layer.\n\nWhen a PMD finishes removal of a port, it calls the function\nrte_eth_dev_release_port().\nA notification of the destroyed port is sent there to the upper layer.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\nReviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\nv2: no change\nv3: no change\nv4: no change\n---\n lib/librte_ether/rte_ethdev.c | 5 +++++\n lib/librte_ether/rte_ethdev.h | 2 ++\n 2 files changed, 7 insertions(+)", "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 8700f6f43..7c1f7eef9 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -237,6 +237,8 @@ rte_eth_dev_allocate(const char *name)\n \teth_dev->data->port_id = port_id;\n \teth_dev->data->mtu = ETHER_MTU;\n \n+\t_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_NEW, NULL);\n+\n \treturn eth_dev;\n }\n \n@@ -278,6 +280,9 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)\n \t\treturn -EINVAL;\n \n \teth_dev->state = RTE_ETH_DEV_UNUSED;\n+\n+\t_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_DESTROY, NULL);\n+\n \treturn 0;\n }\n \ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex c92508cfd..11f97e709 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -3528,6 +3528,8 @@ enum rte_eth_event_type {\n \tRTE_ETH_EVENT_VF_MBOX, /**< message from the VF received by PF */\n \tRTE_ETH_EVENT_MACSEC, /**< MACsec offload related event */\n \tRTE_ETH_EVENT_INTR_RMV, /**< device removal event */\n+\tRTE_ETH_EVENT_NEW, /**< port is probed */\n+\tRTE_ETH_EVENT_DESTROY, /**< port is released */\n \tRTE_ETH_EVENT_MAX /**< max value of this enum */\n };\n \n", "prefixes": [ "dpdk-dev", "v4", "4/5" ] }{ "id": 32903, "url": "