get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/66376/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 66376,
    "url": "http://patches.dpdk.org/api/patches/66376/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200309065106.23800-4-mattias.ronnblom@ericsson.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200309065106.23800-4-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200309065106.23800-4-mattias.ronnblom@ericsson.com",
    "date": "2020-03-09T06:51:01",
    "name": "[3/8] event/dsw: extend statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3a0b99264e6c423a38e4dfa6b59b8310d6ead697",
    "submitter": {
        "id": 1077,
        "url": "http://patches.dpdk.org/api/people/1077/?format=api",
        "name": "Mattias Rönnblom",
        "email": "mattias.ronnblom@ericsson.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200309065106.23800-4-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 8828,
            "url": "http://patches.dpdk.org/api/series/8828/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8828",
            "date": "2020-03-09T06:51:04",
            "name": "DSW performance and statistics improvements",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8828/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66376/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/66376/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 14E12A052E;\n\tMon,  9 Mar 2020 07:53:03 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 53CFC1C068;\n\tMon,  9 Mar 2020 07:52:00 +0100 (CET)",
            "from EUR02-VE1-obe.outbound.protection.outlook.com\n (mail-eopbgr20087.outbound.protection.outlook.com [40.107.2.87])\n by dpdk.org (Postfix) with ESMTP id A76EC1BFF2\n for <dev@dpdk.org>; Mon,  9 Mar 2020 07:51:48 +0100 (CET)",
            "from AM6P192CA0004.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:83::17)\n by AM6PR0702MB3574.eurprd07.prod.outlook.com (2603:10a6:209:3::18) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.10; Mon, 9 Mar\n 2020 06:51:47 +0000",
            "from VE1EUR02FT033.eop-EUR02.prod.protection.outlook.com\n (2603:10a6:209:83:cafe::2e) by AM6P192CA0004.outlook.office365.com\n (2603:10a6:209:83::17) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11 via Frontend\n Transport; Mon, 9 Mar 2020 06:51:47 +0000",
            "from oa.msg.ericsson.com (192.176.1.74) by\n VE1EUR02FT033.mail.protection.outlook.com (10.152.12.99) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id\n 15.20.2793.11 via Frontend Transport; Mon, 9 Mar 2020 06:51:47 +0000",
            "from ESESBMB503.ericsson.se (153.88.183.170) by\n ESESSMR501.ericsson.se (153.88.183.108) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n 15.1.1713.5; Mon, 9 Mar 2020 07:51:44 +0100",
            "from ESESBMB504.ericsson.se (153.88.183.171) by\n ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n 15.1.1713.5; Mon, 9 Mar 2020 07:51:43 +0100",
            "from selio1a020.lmera.ericsson.se (153.88.183.153) by\n smtp.internal.ericsson.com (153.88.183.187) with Microsoft SMTP Server id\n 15.1.1713.5 via Frontend Transport; Mon, 9 Mar 2020 07:51:42 +0100",
            "from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se\n [150.132.109.241])\n by selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id\n 0296pgIN024126; Mon, 9 Mar 2020 07:51:43 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=N/oU9AMHHXRgTeVNYt8l3LC6XltPixFwPpgrpDRzOcDVrMFU/pgNT6kP8VYKyAIJ28kS7ZSY6faSAw23j/udNvjnyy1Cao2MQjz6lW5+nYiuV/tW+ycBYhC8JR9zsB/ZeTHYw+m/Fl8UBuvPm/lhys29sp3HJrsH4KBImzwKnTcatD7hV/TJgr1Hydj/tF7G559nMGi8N/fG8U2AnOg04zlzHDmhpK0VSATvMWgG4+wHDS2nSBdCV96gJ2AasrnDUPs7+cGLYbyyDBqwRheRW8W9LcswQgaQZbl43tRwcdNVQyn4PqztyO45e6yiQUZAIPelZ1AEm27kF+KjbP3rgg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=y0JGTKrbjFOgiyDI8YIq8II5oc3jlMbSL767cx9CLuw=;\n b=NFQm7CIU6MmuGw0Sh9Gwz0YfxzEuXfN5PjeQzsT+utwlPU6UHduF68R0nvAKY4A0KPvDHeun3GNCopGvAnOAWWG+DsNwZ7dg0tBzzCFg1rGHYLe/nIJwS3/d/5FzwSRvEWDGkFJYZfv7thtVIpYbeR5n3Ih3AJR+AssFjiEBnkYI1O/zjJ0eAzWPlcY4yz7GPENnNvxnu0hl9CX7SZ7ahSp6G1pht1EpyFxBk6dNJqzKv9eX5LDohLwn5WkuYier8KjV26KAGo1xjQaA5IDr+MnHKzBZPMg0Znzq2xEQZQX4972naEgC90cTSIC1PTBa2HjCIHEuVvoz4elP7Uavgw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 192.176.1.74) smtp.rcpttodomain=arm.com smtp.mailfrom=ericsson.com;\n dmarc=pass (p=reject sp=none pct=100) action=none header.from=ericsson.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=y0JGTKrbjFOgiyDI8YIq8II5oc3jlMbSL767cx9CLuw=;\n b=GxU3hq5DD5hEDHXEDRE9IcFo6EWGtwSCOuwpLBLiM50MtK07ro97I2zkaQI9CzmJzOadRo+gsP7SK8f1tcMiuU/B3e9da2V9RHISPQg5M42W7ivA2C31+zgz2lov7RWqD1g/wcDr86gvW6LrdpA8iJA0N4qKl4ioTjORJqVkZpo=",
        "Authentication-Results": "spf=pass (sender IP is 192.176.1.74)\n smtp.mailfrom=ericsson.com; arm.com; dkim=none (message not signed)\n header.d=none;arm.com; dmarc=pass action=none header.from=ericsson.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of ericsson.com designates\n 192.176.1.74 as permitted sender)\n receiver=protection.outlook.com;\n client-ip=192.176.1.74; helo=oa.msg.ericsson.com;",
        "From": "=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "To": "<jerinj@marvell.com>",
        "CC": "<dev@dpdk.org>, <stefan.sundkvist@ericsson.com>, <Ola.Liljedahl@arm.com>,\n\t=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "Date": "Mon, 9 Mar 2020 07:51:01 +0100",
        "Message-ID": "<20200309065106.23800-4-mattias.ronnblom@ericsson.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200309065106.23800-1-mattias.ronnblom@ericsson.com>",
        "References": "<20200309065106.23800-1-mattias.ronnblom@ericsson.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-EOPAttributedMessage": "0",
        "X-Forefront-Antispam-Report": "CIP:192.176.1.74; IPV:; CTRY:SE; EFV:NLI;\n SFV:NSPM;\n SFS:(10009020)(4636009)(396003)(136003)(346002)(376002)(39860400002)(199004)(189003)(4326008)(36756003)(6916009)(7636002)(6666004)(356004)(8676002)(107886003)(8936002)(246002)(70586007)(86362001)(316002)(336012)(70206006)(2616005)(26005)(54906003)(186003)(2906002)(956004)(30864003)(5660300002)(478600001)(66574012)(1076003)(461764006);\n DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0702MB3574; H:oa.msg.ericsson.com; FPR:;\n SPF:Pass; LANG:en; PTR:office365.se.ericsson.net; A:1; MX:1;",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "3ed41f05-75f3-48ab-1ddd-08d7c3f65680",
        "X-MS-TrafficTypeDiagnostic": "AM6PR0702MB3574:",
        "X-Microsoft-Antispam-PRVS": "\n <AM6PR0702MB35741DF3EA4805A6A2E749EFE1FE0@AM6PR0702MB3574.eurprd07.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:8273;",
        "X-Forefront-PRVS": "0337AFFE9A",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n Kx1PnDdjr60dDRCwJhwm56aLdWMwbs+Ohzwg4QKB1PWj3BD4558gWAX3eH/M16LL7Xj87M44yehToraz6UZsBg2zUKLRSTgU44e8hdsKq06PiMq/ikJ3P5gFMR7AZ3CQ0gmEaC2RJXdddMmlyEs1vOz5gQ9iuxNR9uz3IXfhVq5GxGXZijUXR7SwzJmTtXhyhwXsKGaQHew40+HDmYe1n1X6N928kjjGIwHmdW88KHZQ+0LQrY2IAppB3TIW47LqCYyq8D36oggh3nnvEKtv2gb1P6MwqdOg2ZQ4dcD7kVluFldNxpBcAI8cK8lAspBHbhHP8Je6N8W1XpP3qJvx9vEW7mcvJmSo6wJbPbWCxR+xNjM0zVXQqmnBKR+WL6Coi18rSkWQqdKuR/Lvf5xMiiHdjdvPqipOSmWZ4ALbr2bd0NkTRKU5JFbb/5L4JiE7VEOb0HJCoGBJ4efA40qfwViC5r5N0euUSeZkQ2pLtY1y1KCJWHaO44m+aCFEtWyC",
        "X-OriginatorOrg": "ericsson.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "09 Mar 2020 06:51:47.6041 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3ed41f05-75f3-48ab-1ddd-08d7c3f65680",
        "X-MS-Exchange-CrossTenant-Id": "92e84ceb-fbfd-47ab-be52-080c6b87953f",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74];\n Helo=[oa.msg.ericsson.com]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AM6PR0702MB3574",
        "Subject": "[dpdk-dev] [PATCH 3/8] event/dsw: extend statistics",
        "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 <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": "Extend DSW xstats.\n\nTo allow visualization of migrations, track the number flow\nimmigrations in \"port_<N>_immigrations\". The \"port_<N>_migrations\"\nretains legacy semantics, but is renamed \"port_<N>_emigrations\".\n\nExpose the number of events currently undergoing processing\n(i.e. pending releases) at a particular port.\n\nSigned-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>\n---\n drivers/event/dsw/dsw_evdev.h  |  16 ++--\n drivers/event/dsw/dsw_event.c  | 131 +++++++++++++++++----------------\n drivers/event/dsw/dsw_xstats.c |  17 +++--\n 3 files changed, 91 insertions(+), 73 deletions(-)",
    "diff": "diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h\nindex dc44bce81..2c7f9efa3 100644\n--- a/drivers/event/dsw/dsw_evdev.h\n+++ b/drivers/event/dsw/dsw_evdev.h\n@@ -162,18 +162,20 @@ struct dsw_port {\n \tuint64_t total_busy_cycles;\n \n \t/* For the ctl interface and flow migration mechanism. */\n-\tuint64_t next_migration;\n+\tuint64_t next_emigration;\n \tuint64_t migration_interval;\n \tenum dsw_migration_state migration_state;\n \n-\tuint64_t migration_start;\n-\tuint64_t migrations;\n-\tuint64_t migration_latency;\n+\tuint64_t emigration_start;\n+\tuint64_t emigrations;\n+\tuint64_t emigration_latency;\n \n-\tuint8_t migration_target_port_id;\n-\tstruct dsw_queue_flow migration_target_qf;\n+\tuint8_t emigration_target_port_id;\n+\tstruct dsw_queue_flow emigration_target_qf;\n \tuint8_t cfm_cnt;\n \n+\tuint64_t immigrations;\n+\n \tuint16_t paused_flows_len;\n \tstruct dsw_queue_flow paused_flows[DSW_MAX_PAUSED_FLOWS];\n \n@@ -187,11 +189,13 @@ struct dsw_port {\n \tuint16_t seen_events_idx;\n \tstruct dsw_queue_flow seen_events[DSW_MAX_EVENTS_RECORDED];\n \n+\tuint64_t enqueue_calls;\n \tuint64_t new_enqueued;\n \tuint64_t forward_enqueued;\n \tuint64_t release_enqueued;\n \tuint64_t queue_enqueued[DSW_MAX_QUEUES];\n \n+\tuint64_t dequeue_calls;\n \tuint64_t dequeued;\n \tuint64_t queue_dequeued[DSW_MAX_QUEUES];\n \ndiff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c\nindex 7f1f29218..69cff7aa2 100644\n--- a/drivers/event/dsw/dsw_event.c\n+++ b/drivers/event/dsw/dsw_event.c\n@@ -385,12 +385,12 @@ dsw_retrieve_port_loads(struct dsw_evdev *dsw, int16_t *port_loads,\n }\n \n static bool\n-dsw_select_migration_target(struct dsw_evdev *dsw,\n-\t\t\t    struct dsw_port *source_port,\n-\t\t\t    struct dsw_queue_flow_burst *bursts,\n-\t\t\t    uint16_t num_bursts, int16_t *port_loads,\n-\t\t\t    int16_t max_load, struct dsw_queue_flow *target_qf,\n-\t\t\t    uint8_t *target_port_id)\n+dsw_select_emigration_target(struct dsw_evdev *dsw,\n+\t\t\t     struct dsw_port *source_port,\n+\t\t\t     struct dsw_queue_flow_burst *bursts,\n+\t\t\t     uint16_t num_bursts, int16_t *port_loads,\n+\t\t\t     int16_t max_load, struct dsw_queue_flow *target_qf,\n+\t\t\t     uint8_t *target_port_id)\n {\n \tuint16_t source_load = port_loads[source_port->id];\n \tuint16_t i;\n@@ -598,39 +598,39 @@ dsw_port_flush_paused_events(struct dsw_evdev *dsw,\n }\n \n static void\n-dsw_port_migration_stats(struct dsw_port *port)\n+dsw_port_emigration_stats(struct dsw_port *port)\n {\n-\tuint64_t migration_latency;\n+\tuint64_t emigration_latency;\n \n-\tmigration_latency = (rte_get_timer_cycles() - port->migration_start);\n-\tport->migration_latency += migration_latency;\n-\tport->migrations++;\n+\temigration_latency = (rte_get_timer_cycles() - port->emigration_start);\n+\tport->emigration_latency += emigration_latency;\n+\tport->emigrations++;\n }\n \n static void\n-dsw_port_end_migration(struct dsw_evdev *dsw, struct dsw_port *port)\n+dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port)\n {\n-\tuint8_t queue_id = port->migration_target_qf.queue_id;\n-\tuint16_t flow_hash = port->migration_target_qf.flow_hash;\n+\tuint8_t queue_id = port->emigration_target_qf.queue_id;\n+\tuint16_t flow_hash = port->emigration_target_qf.flow_hash;\n \n \tport->migration_state = DSW_MIGRATION_STATE_IDLE;\n \tport->seen_events_len = 0;\n \n-\tdsw_port_migration_stats(port);\n+\tdsw_port_emigration_stats(port);\n \n \tif (dsw->queues[queue_id].schedule_type != RTE_SCHED_TYPE_PARALLEL) {\n \t\tdsw_port_remove_paused_flow(port, queue_id, flow_hash);\n \t\tdsw_port_flush_paused_events(dsw, port, queue_id, flow_hash);\n \t}\n \n-\tDSW_LOG_DP_PORT(DEBUG, port->id, \"Migration completed for queue_id \"\n+\tDSW_LOG_DP_PORT(DEBUG, port->id, \"Emigration completed for queue_id \"\n \t\t\t\"%d flow_hash %d.\\n\", queue_id, flow_hash);\n }\n \n static void\n-dsw_port_consider_migration(struct dsw_evdev *dsw,\n-\t\t\t    struct dsw_port *source_port,\n-\t\t\t    uint64_t now)\n+dsw_port_consider_emigration(struct dsw_evdev *dsw,\n+\t\t\t     struct dsw_port *source_port,\n+\t\t\t     uint64_t now)\n {\n \tbool any_port_below_limit;\n \tstruct dsw_queue_flow *seen_events = source_port->seen_events;\n@@ -640,7 +640,7 @@ dsw_port_consider_migration(struct dsw_evdev *dsw,\n \tint16_t source_port_load;\n \tint16_t port_loads[dsw->num_ports];\n \n-\tif (now < source_port->next_migration)\n+\tif (now < source_port->next_emigration)\n \t\treturn;\n \n \tif (dsw->num_ports == 1)\n@@ -649,25 +649,25 @@ dsw_port_consider_migration(struct dsw_evdev *dsw,\n \tif (seen_events_len < DSW_MAX_EVENTS_RECORDED)\n \t\treturn;\n \n-\tDSW_LOG_DP_PORT(DEBUG, source_port->id, \"Considering migration.\\n\");\n+\tDSW_LOG_DP_PORT(DEBUG, source_port->id, \"Considering emigration.\\n\");\n \n \t/* Randomize interval to avoid having all threads considering\n-\t * migration at the same in point in time, which might lead to\n-\t * all choosing the same target port.\n+\t * emigration at the same in point in time, which might lead\n+\t * to all choosing the same target port.\n \t */\n-\tsource_port->next_migration = now +\n+\tsource_port->next_emigration = now +\n \t\tsource_port->migration_interval / 2 +\n \t\trte_rand() % source_port->migration_interval;\n \n \tif (source_port->migration_state != DSW_MIGRATION_STATE_IDLE) {\n \t\tDSW_LOG_DP_PORT(DEBUG, source_port->id,\n-\t\t\t\t\"Migration already in progress.\\n\");\n+\t\t\t\t\"Emigration already in progress.\\n\");\n \t\treturn;\n \t}\n \n \t/* For simplicity, avoid migration in the unlikely case there\n \t * is still events to consume in the in_buffer (from the last\n-\t * migration).\n+\t * emigration).\n \t */\n \tif (source_port->in_buffer_len > 0) {\n \t\tDSW_LOG_DP_PORT(DEBUG, source_port->id, \"There are still \"\n@@ -719,52 +719,56 @@ dsw_port_consider_migration(struct dsw_evdev *dsw,\n \t}\n \n \t/* The strategy is to first try to find a flow to move to a\n-\t * port with low load (below the migration-attempt\n+\t * port with low load (below the emigration-attempt\n \t * threshold). If that fails, we try to find a port which is\n \t * below the max threshold, and also less loaded than this\n \t * port is.\n \t */\n-\tif (!dsw_select_migration_target(dsw, source_port, bursts, num_bursts,\n-\t\t\t\t\t port_loads,\n-\t\t\t\t\t DSW_MIN_SOURCE_LOAD_FOR_MIGRATION,\n-\t\t\t\t\t &source_port->migration_target_qf,\n-\t\t\t\t\t &source_port->migration_target_port_id)\n+\tif (!dsw_select_emigration_target(dsw, source_port, bursts, num_bursts,\n+\t\t\t\t      port_loads,\n+\t\t\t\t      DSW_MIN_SOURCE_LOAD_FOR_MIGRATION,\n+\t\t\t\t      &source_port->emigration_target_qf,\n+\t\t\t\t      &source_port->emigration_target_port_id)\n \t    &&\n-\t    !dsw_select_migration_target(dsw, source_port, bursts, num_bursts,\n-\t\t\t\t\t port_loads,\n-\t\t\t\t\t DSW_MAX_TARGET_LOAD_FOR_MIGRATION,\n-\t\t\t\t\t &source_port->migration_target_qf,\n-\t\t\t\t       &source_port->migration_target_port_id))\n+\t    !dsw_select_emigration_target(dsw, source_port, bursts, num_bursts,\n+\t\t\t\t      port_loads,\n+\t\t\t\t      DSW_MAX_TARGET_LOAD_FOR_MIGRATION,\n+\t\t\t\t      &source_port->emigration_target_qf,\n+\t\t\t\t      &source_port->emigration_target_port_id))\n \t\treturn;\n \n \tDSW_LOG_DP_PORT(DEBUG, source_port->id, \"Migrating queue_id %d \"\n \t\t\t\"flow_hash %d from port %d to port %d.\\n\",\n-\t\t\tsource_port->migration_target_qf.queue_id,\n-\t\t\tsource_port->migration_target_qf.flow_hash,\n-\t\t\tsource_port->id, source_port->migration_target_port_id);\n+\t\t\tsource_port->emigration_target_qf.queue_id,\n+\t\t\tsource_port->emigration_target_qf.flow_hash,\n+\t\t\tsource_port->id,\n+\t\t\tsource_port->emigration_target_port_id);\n \n \t/* We have a winner. */\n \n \tsource_port->migration_state = DSW_MIGRATION_STATE_PAUSING;\n-\tsource_port->migration_start = rte_get_timer_cycles();\n+\tsource_port->emigration_start = rte_get_timer_cycles();\n \n \t/* No need to go through the whole pause procedure for\n \t * parallel queues, since atomic/ordered semantics need not to\n \t * be maintained.\n \t */\n \n-\tif (dsw->queues[source_port->migration_target_qf.queue_id].schedule_type\n-\t    == RTE_SCHED_TYPE_PARALLEL) {\n-\t\tuint8_t queue_id = source_port->migration_target_qf.queue_id;\n-\t\tuint16_t flow_hash = source_port->migration_target_qf.flow_hash;\n-\t\tuint8_t dest_port_id = source_port->migration_target_port_id;\n+\tif (dsw->queues[source_port->emigration_target_qf.queue_id].\n+\t    schedule_type == RTE_SCHED_TYPE_PARALLEL) {\n+\t\tuint8_t queue_id =\n+\t\t\tsource_port->emigration_target_qf.queue_id;\n+\t\tuint16_t flow_hash =\n+\t\t\tsource_port->emigration_target_qf.flow_hash;\n+\t\tuint8_t dest_port_id =\n+\t\t\tsource_port->emigration_target_port_id;\n \n \t\t/* Single byte-sized stores are always atomic. */\n \t\tdsw->queues[queue_id].flow_to_port_map[flow_hash] =\n \t\t\tdest_port_id;\n \t\trte_smp_wmb();\n \n-\t\tdsw_port_end_migration(dsw, source_port);\n+\t\tdsw_port_end_emigration(dsw, source_port);\n \n \t\treturn;\n \t}\n@@ -775,12 +779,12 @@ dsw_port_consider_migration(struct dsw_evdev *dsw,\n \tdsw_port_flush_out_buffers(dsw, source_port);\n \n \tdsw_port_add_paused_flow(source_port,\n-\t\t\t\t source_port->migration_target_qf.queue_id,\n-\t\t\t\t source_port->migration_target_qf.flow_hash);\n+\t\t\t\t source_port->emigration_target_qf.queue_id,\n+\t\t\t\t source_port->emigration_target_qf.flow_hash);\n \n \tdsw_port_ctl_broadcast(dsw, source_port, DSW_CTL_PAUS_REQ,\n-\t\t\t       source_port->migration_target_qf.queue_id,\n-\t\t\t       source_port->migration_target_qf.flow_hash);\n+\t\t\t       source_port->emigration_target_qf.queue_id,\n+\t\t\t       source_port->emigration_target_qf.flow_hash);\n \tsource_port->cfm_cnt = 0;\n }\n \n@@ -808,6 +812,9 @@ dsw_port_handle_unpause_flow(struct dsw_evdev *dsw, struct dsw_port *port,\n \n \trte_smp_rmb();\n \n+\tif (dsw_schedule(dsw, queue_id, paused_flow_hash) == port->id)\n+\t\tport->immigrations++;\n+\n \tdsw_port_ctl_enqueue(&dsw->ports[originating_port_id], &cfm);\n \n \tdsw_port_flush_paused_events(dsw, port, queue_id, paused_flow_hash);\n@@ -816,10 +823,10 @@ dsw_port_handle_unpause_flow(struct dsw_evdev *dsw, struct dsw_port *port,\n #define FORWARD_BURST_SIZE (32)\n \n static void\n-dsw_port_forward_migrated_flow(struct dsw_port *source_port,\n-\t\t\t       struct rte_event_ring *dest_ring,\n-\t\t\t       uint8_t queue_id,\n-\t\t\t       uint16_t flow_hash)\n+dsw_port_forward_emigrated_flow(struct dsw_port *source_port,\n+\t\t\t\tstruct rte_event_ring *dest_ring,\n+\t\t\t\tuint8_t queue_id,\n+\t\t\t\tuint16_t flow_hash)\n {\n \tuint16_t events_left;\n \n@@ -868,9 +875,9 @@ static void\n dsw_port_move_migrating_flow(struct dsw_evdev *dsw,\n \t\t\t     struct dsw_port *source_port)\n {\n-\tuint8_t queue_id = source_port->migration_target_qf.queue_id;\n-\tuint16_t flow_hash = source_port->migration_target_qf.flow_hash;\n-\tuint8_t dest_port_id = source_port->migration_target_port_id;\n+\tuint8_t queue_id = source_port->emigration_target_qf.queue_id;\n+\tuint16_t flow_hash = source_port->emigration_target_qf.flow_hash;\n+\tuint8_t dest_port_id = source_port->emigration_target_port_id;\n \tstruct dsw_port *dest_port = &dsw->ports[dest_port_id];\n \n \tdsw_port_flush_out_buffers(dsw, source_port);\n@@ -880,8 +887,8 @@ dsw_port_move_migrating_flow(struct dsw_evdev *dsw,\n \tdsw->queues[queue_id].flow_to_port_map[flow_hash] =\n \t\tdest_port_id;\n \n-\tdsw_port_forward_migrated_flow(source_port, dest_port->in_ring,\n-\t\t\t\t       queue_id, flow_hash);\n+\tdsw_port_forward_emigrated_flow(source_port, dest_port->in_ring,\n+\t\t\t\t\tqueue_id, flow_hash);\n \n \t/* Flow table update and migration destination port's enqueues\n \t * must be seen before the control message.\n@@ -907,7 +914,7 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port)\n \t\t\tport->migration_state = DSW_MIGRATION_STATE_FORWARDING;\n \t\t\tbreak;\n \t\tcase DSW_MIGRATION_STATE_UNPAUSING:\n-\t\t\tdsw_port_end_migration(dsw, port);\n+\t\t\tdsw_port_end_emigration(dsw, port);\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tRTE_ASSERT(0);\n@@ -987,7 +994,7 @@ dsw_port_bg_process(struct dsw_evdev *dsw, struct dsw_port *port)\n \n \t\tdsw_port_consider_load_update(port, now);\n \n-\t\tdsw_port_consider_migration(dsw, port, now);\n+\t\tdsw_port_consider_emigration(dsw, port, now);\n \n \t\tport->ops_since_bg_task = 0;\n \t}\ndiff --git a/drivers/event/dsw/dsw_xstats.c b/drivers/event/dsw/dsw_xstats.c\nindex c3f5db89c..d332a57b6 100644\n--- a/drivers/event/dsw/dsw_xstats.c\n+++ b/drivers/event/dsw/dsw_xstats.c\n@@ -84,16 +84,17 @@ dsw_xstats_port_get_queue_dequeued(struct dsw_evdev *dsw, uint8_t port_id,\n \treturn dsw->ports[port_id].queue_dequeued[queue_id];\n }\n \n-DSW_GEN_PORT_ACCESS_FN(migrations)\n+DSW_GEN_PORT_ACCESS_FN(emigrations)\n+DSW_GEN_PORT_ACCESS_FN(immigrations)\n \n static uint64_t\n dsw_xstats_port_get_migration_latency(struct dsw_evdev *dsw, uint8_t port_id,\n \t\t\t\t      uint8_t queue_id __rte_unused)\n {\n-\tuint64_t total_latency = dsw->ports[port_id].migration_latency;\n-\tuint64_t num_migrations = dsw->ports[port_id].migrations;\n+\tuint64_t total_latency = dsw->ports[port_id].emigration_latency;\n+\tuint64_t num_emigrations = dsw->ports[port_id].emigrations;\n \n-\treturn num_migrations > 0 ? total_latency / num_migrations : 0;\n+\treturn num_emigrations > 0 ? total_latency / num_emigrations : 0;\n }\n \n static uint64_t\n@@ -110,6 +111,8 @@ dsw_xstats_port_get_event_proc_latency(struct dsw_evdev *dsw, uint8_t port_id,\n \n DSW_GEN_PORT_ACCESS_FN(inflight_credits)\n \n+DSW_GEN_PORT_ACCESS_FN(pending_releases)\n+\n static uint64_t\n dsw_xstats_port_get_load(struct dsw_evdev *dsw, uint8_t port_id,\n \t\t\t uint8_t queue_id __rte_unused)\n@@ -136,14 +139,18 @@ static struct dsw_xstats_port dsw_port_xstats[] = {\n \t  false },\n \t{ \"port_%u_queue_%u_dequeued\", dsw_xstats_port_get_queue_dequeued,\n \t  true },\n-\t{ \"port_%u_migrations\", dsw_xstats_port_get_migrations,\n+\t{ \"port_%u_emigrations\", dsw_xstats_port_get_emigrations,\n \t  false },\n \t{ \"port_%u_migration_latency\", dsw_xstats_port_get_migration_latency,\n \t  false },\n+\t{ \"port_%u_immigrations\", dsw_xstats_port_get_immigrations,\n+\t  false },\n \t{ \"port_%u_event_proc_latency\", dsw_xstats_port_get_event_proc_latency,\n \t  false },\n \t{ \"port_%u_inflight_credits\", dsw_xstats_port_get_inflight_credits,\n \t  false },\n+\t{ \"port_%u_pending_releases\", dsw_xstats_port_get_pending_releases,\n+\t  false },\n \t{ \"port_%u_load\", dsw_xstats_port_get_load,\n \t  false },\n \t{ \"port_%u_last_bg\", dsw_xstats_port_get_last_bg,\n",
    "prefixes": [
        "3/8"
    ]
}