get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44986,
    "url": "https://patches.dpdk.org/api/patches/44986/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180919222235.6239-3-pbhagavatula@caviumnetworks.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": "<20180919222235.6239-3-pbhagavatula@caviumnetworks.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180919222235.6239-3-pbhagavatula@caviumnetworks.com",
    "date": "2018-09-19T22:22:34",
    "name": "[v3,3/4] app/test-eventdev: add Tx adapter support",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "cf1e9da871374e8eeb811ae7ea990ac1561fa1a9",
    "submitter": {
        "id": 768,
        "url": "https://patches.dpdk.org/api/people/768/?format=api",
        "name": "Pavan Nikhilesh",
        "email": "pbhagavatula@caviumnetworks.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180919222235.6239-3-pbhagavatula@caviumnetworks.com/mbox/",
    "series": [
        {
            "id": 1403,
            "url": "https://patches.dpdk.org/api/series/1403/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1403",
            "date": "2018-09-19T22:22:32",
            "name": "[v3,1/4] app/test-eventdev: fix minor typos",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/1403/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/44986/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/44986/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 C9F6F1B144;\n\tThu, 20 Sep 2018 00:23:20 +0200 (CEST)",
            "from NAM01-BN3-obe.outbound.protection.outlook.com\n\t(mail-bn3nam01on0058.outbound.protection.outlook.com [104.47.33.58])\n\tby dpdk.org (Postfix) with ESMTP id 6910B1B13B\n\tfor <dev@dpdk.org>; Thu, 20 Sep 2018 00:23:14 +0200 (CEST)",
            "from localhost.localdomain (115.113.156.3) by\n\tBYAPR07MB4965.namprd07.prod.outlook.com (2603:10b6:a03:5b::14) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.1143.18; Wed, 19 Sep 2018 22:23:10 +0000"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=mAk+3q6Z/6WeTIg6Nys4icAbhP/3AQpQB+LTMq6R+Ck=;\n\tb=hbLKicsPm9jiR41fU5iF42CZ3QGD30fRvqbEGWa0yBCm897S6jyay0ZZ9kFDn3XKSGqEUlBGs4swSHV5s0lf9+OZ5HOeOve0Zz2wqTRQl9veF6AGcWFcYbHv/osQRZ30qYZqU8hgtSxB5JmqjIUHxIglvTcwGszlbRE3qI22zaM=",
        "From": "Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>",
        "To": "jerin.jacob@caviumnetworks.com, nikhil.rao@intel.com,\n\tanoob.joseph@caviumnetworks.com",
        "Cc": "dev@dpdk.org,\n\tPavan Nikhilesh <pbhagavatula@caviumnetworks.com>",
        "Date": "Thu, 20 Sep 2018 03:52:34 +0530",
        "Message-Id": "<20180919222235.6239-3-pbhagavatula@caviumnetworks.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20180919222235.6239-1-pbhagavatula@caviumnetworks.com>",
        "References": "<20180904141223.24216-1-pbhagavatula@caviumnetworks.com>\n\t<20180919222235.6239-1-pbhagavatula@caviumnetworks.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[115.113.156.3]",
        "X-ClientProxiedBy": "MA1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM\n\t(2603:1096:a00:21::13) To BYAPR07MB4965.namprd07.prod.outlook.com\n\t(2603:10b6:a03:5b::14)",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "f8f354a8-3dc1-456d-d221-08d61e7e7c9e",
        "X-Microsoft-Antispam": "BCL:0; PCL:0;\n\tRULEID:(7020095)(4652040)(8989299)(5600074)(711020)(2017052603328)(7153060)(7193020);\n\tSRVR:BYAPR07MB4965; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BYAPR07MB4965;\n\t3:2K+wF4qc0Jg/oVGnL5mOFBk8Om29P2ZH2HlakoMdI9nU2irmcHPz5sNTB6ypzkIJEteKcqbpbQVJvPTveo5wD8X3hBcH1ortVrovMAd6camMWJa6iFZXfQrsg0jOav6AqlDaLE8v5QYpgWx1iUYhoCafh4SayDTV8KXrMT3zoifjR9H9TKnZByQcZ2G+43RGXKDZVrp0GgdDZcIu45zQNVY8x0uOL0/1twc5+QSnyrrAnd0srgN6MmKs2Fxsz81M;\n\t25:VELPmH4sm9gcKPwPSDHZLv/Kqu2PyiaCk9gc2KNbNZoQwc1uMyvCj14NmeuAKYqDziWxgghxx24ELCRsh3+eGBUN6U9vdlRMgIjoIqxl1uorZ5ZxdOX4xEgySVsIgUOf8e0z90UFwpRpg1qSjCBjulXbj8P4xvOKs6zKFFNY7aqp66mRL9/jZo1FTC3rOWIW3u1y4QyHzZfmG2FUc9ALDo51jCafZOxvypUYfKz+4U11Jkufd6NzmDrbiewOkrtOq5JZh27I6H5wShjvIx5cJA/+WQFxy6ooQzT0LkqyKos9vfRoU/hcQ21gGd8VqdpawB+nSqe+fya8YOVSxmmHDQ==;\n\t31:2GIxd2szZodh8Czu4ZAkaaNfy9iNQSDgweL3oTMeShmVXLo/NTKSKiZTKiobbSWvm/pXgJ+rnPW1ZbZgN+uuipmEwdY69Tt0QrZogoSXFU/XPYcZZ+y8ha6/zdUOTNniVsw5MVpKCy3Rgod/9ZiZc1Ebhhwc0WKrfosnqTbip0u75qmZodSnMPbJ/eQ/r2mcstYiKuTk94iwYKuQmvr/41Z/Fhtky8pip82XCbUw7qA=",
            "1; BYAPR07MB4965;\n\t20:mCBJHjf6E6xJ6s+4m2iP4zvQtMEp5Ks38dRbB4ZabHMyIeOjnDGGrTaaTasO84xi6hBFY7ChO+/t6woHgALwHJy2sKX03LhvOKR8nSQ2RIVF5Pn36UjnIX6zcg2PUsKzTr2iWXEN+b38Mr7qrcBa86u4rkAS40z8ziPoWnEagN0JCCYqLGmrzy8V3ceTYjr9O0cbYfyYhs9QNVkC20cTztZB0XNJ+1oO+4o6zP4PErSpHE6Q4nQEuhv7YZZCciH2LFRFYxLpFN1wKn0RIriXakQC2KcXjD9Te7aTaQ4j0uYjHYp/KbUCuAY0fOtvymUE5NNLXZoJn8EU10Al2WMie3JI1zv7jpJETAmqOAf4qNkVvZgE5VQ+cHw4h4VOI3mIab+rYd3onx0RgCEteD9qckrldqtnJL/1aV+ktJXnCq86tadXPmVsoLRM6MY09BsNl2Apzxcpn7PRpilFjEIiCor5wCvSoHOT1hhDc7PrJRKCiPHBYXQFQQXegSDr/yhhSB7lGkYgzl6CdssBL6+VY537KS58jcPPTQa/nxCy60wW6RZTBve5j0uqzAWJk6f23Ao0ZcRPJYMzyMND7k6sQJP/qHNFYLibKK8CHp0l2Gs=;\n\t4:oNb1787t0JE70WUIKjcb4SweBnjTqT3miAOxO/o7V4Yp+3/OO0XzYZjvi8SQ2Wub2VvEXW8bWAblJJbvWUPakkTcIeFWP4ZAdvTi3laQ+fbbf4SiGjKhPXCMLsLKKteM0yArZCqS9r53ffMI6+VWk1ICAT6tya3uWJmNKLAiVdpop8fUHt9Yj/Gv14huQt6vlYsmBo55fP62Arn80Wc8GC3rDj2tRW9YxrTYzF3OTFCKl99hcD5tE4e+5ka7VV/ck+Ugh/3w8yCYK5GyA/02f9ZeKrH34p8UkVpuvFoRxZr7Bt91BDBX5sAtZe1Q5S43",
            "=?us-ascii?Q?1; BYAPR07MB4965;\n\t23:i4bXtuI5dNob7+yiVSyzy9xsIPucYvrmIU9W3avXc?=\n\t5DtYqt82Skpk1M5DEt8yKD3vx8T9y9KRTwTnwHz9tN2ZlErJu1u8frNLGANgY5ynCkhz2NH7ATuY+AW+nqNXZI+/z6+W7lYHug8BP0OOcsTQETFn+h6pgw1Au3BEbtrOVdx49CdE8JGxVKKwEE/lOiDT+Vbagcf1eIrPkJRBWbo30wLCZz4CpTgZuIhBU3v1WCBoF1XPHbSXKJhQfn9W4qNhv6bbqB85aB9YWkeZn9JaVipvNiK0P6mWC/hmUebzZGnG7zKg1ZjevUKFCfVZauTPCpldQPuvD9mRy/CpshXavGeB22jNfaq4J5GXtXhFaI23It4QGP5JcaM/zCgDHWGPyiIwDZrcgELXZesIZfuRnHq3J+iRwguSoQm3+6doGGEQjPJ9UyLJ8x/Jo1zB+aIADRmOgErRp05WHIpJQLheapuMDVgVSRAg5wKn52APbhf1ShhRuqBWNV2k8JPJeP70lPIeDilHBikg1SIG1E2bPcCdoeRQE9Sl3/xsjRmG3tPImfmTtENomg443BVE8a7TrSI3U1UCdo9cqLxxJSd3NVbfDikFC7qyXNDeOdKJBbm9FXloY/HR2Tab8kGjPWummZVBfKHlQWA6JcRbvd/7fSQ9yUsXRevRvGvg0kzR+bOu9/3RHTcKvz453jLQ8KHmoEgaHi4YTwVGFKkPu4r2qB3YPLQMvuTiU2vMLDNFD+TbXPnAeaGjcDI6HXQpxQQJPlOu8Vliq1Jx1pROQsBatIUFJY/dfLoNBw2U/HS9HUUPNZK4b9JNV8IOnfOenoDDJ4twxQIznoy78wVqM5VgpMRqKnrHM4tXUPtanLFXoy0vcA6rzjstB0kcUkRaYlkBefuJlHC126vSnpiUN0oUpDL4nNO6EJYmYenEo77DlAZG0VBMqAw0uSqi716orS30QaCoQav5Hb3PHaxiqsqxK1ZGltYINSbg3jkfzdj7+P+faqQUwH8nJ5YdVZCA5juL6u8LsugRLfZ+8fcibyhTeFUGOYM2z3qXfJYRPjCNVNhRGzywEjPUQ7Fgt1HIK5RcDJnz8TDD+oRFBTnp++D7tcayFi6Atpz3bPv+Ij34MqlI/073Axo00FTdiakOm5WaKebG7+zKE47Jn/+6AlRLcV6EM4SW3eZXuB96by6Vg8EhA74wqsfI46OlQGwQfIWIZWtm4czcqA0bJpMBqivnLSyFni4CdcB+gdvwjllgYi+ePhYU2r/W5EOPsNJY78TKf3eDv3gUMEDi34hvzT9BFMcCFU4PM4qpxJzhCtiwkXfNuGtQ7FDUMAnXgn+tMr+QkxP2fXEzTAdVPgtYUnvhpHSwuSMjSmnC7uAKJvmGtFpPS4urRhg6LehnNMRHKkc",
            "1; BYAPR07MB4965;\n\t6:3KwkdCRaD75Srazw0j8l1pDH5B/5IQSBSTxHbPl9W9bCg2sU0Fk1a1PWHUtz2mXJns6JJrKiQrzAZGy8sdSJiZfaOkgVwEnFRIEPfHXcfDNPu3sZqgDIdVIl5qRZRK5TVGywQGcIS3jpwykjPD3WoTGW3cy8nHtsaxguJvTDZgiKoXmmQkPWWeB5uYk4qjVbbQDYXGxITBtN0pwDA0hqGVBKJGl/sVnR49EV0KQfjBvGyzkKy+eiYru/dv9K+zCiIbOry348Ld4wM6kGPJ6zVfJ0DAV/f4nNnM6CKUUhPIdxgWBMLYd0uG4us6r0vsKTDNatR0UiByVLqP9F5EfnFWg7yjvi6yGeza/EmFeKWaMLWf9B+jhVtER05ustPBUsdp2gS80Vm6jUlG+d5IUBGSuwVH9MqiFjLVbHMQHijfcdwMtQ+Xyzzp+cav/UDZL5tRp/SbM4hjrmfjJsSY0ZEg==;\n\t5:LS9UwoMcvnQJmInr8McL3sFDoHjgzGD30Df/fx1bpcYEBt8FT6asEuohlpckCU+9jNlSGiVI7D/RFoRV45gZZc7dPX9moA2IkuS8GVrTEGPUV/BpqqL2bhlor/6f+Sg6FAoqiA0qVSu59SFWL8bOdfKrF2/jzrO+18gGCQY3NHg=;\n\t7:oXlIRxZrjGJqh0CqjznwdWnbCFgqdIw99/gbT+mNx5+lZ/XBt7SbGU83B990MpwtkBAZ/vUDbRNoDHxAjfw951CXyOLWxXP5o7XBSuvlOgG+2vfKhMiFj8URDzJD1Tb15Lb836CNOlhuhD7jOhvztW8FbCM/OXWeY01DVvfCq1Nf1ZLRM/oA1+1UGwrT5WK+faDRyDY7N/lbx2SM4vg3ZxBrt472D0c6ofjdxN1qC8BFsrkCJ3uCyAENBB6WV9t1"
        ],
        "X-MS-TrafficTypeDiagnostic": "BYAPR07MB4965:",
        "X-Microsoft-Antispam-PRVS": "<BYAPR07MB49653CBDC5E1DC7F9AFB72CA801C0@BYAPR07MB4965.namprd07.prod.outlook.com>",
        "X-Exchange-Antispam-Report-Test": "UriScan:(21532816269658);",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231355)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991041);\n\tSRVR:BYAPR07MB4965; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4965; ",
        "X-Forefront-PRVS": "0800C0C167",
        "X-Forefront-Antispam-Report": "SFV:NSPM;\n\tSFS:(10009020)(6069001)(39860400002)(346002)(376002)(136003)(396003)(366004)(189003)(199004)(66066001)(6636002)(575784001)(53946003)(6512007)(81166006)(81156014)(6666003)(53936002)(48376002)(4326008)(1857600001)(316002)(50226002)(486006)(36756003)(8936002)(446003)(11346002)(16526019)(26005)(476003)(956004)(8676002)(2616005)(2906002)(14444005)(42882007)(6346003)(5660300001)(68736007)(16586007)(97736004)(47776003)(7736002)(107886003)(6486002)(72206003)(478600001)(52116002)(105586002)(50466002)(51416003)(1076002)(3846002)(6506007)(6116002)(69590400006)(386003)(25786009)(305945005)(106356001)(76176011)(42262002)(579004);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4965; H:localhost.localdomain;\n\tFPR:; \n\tSPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; ",
        "Received-SPF": "None (protection.outlook.com: cavium.com does not designate\n\tpermitted sender hosts)",
        "Authentication-Results": "spf=none (sender IP is )\n\tsmtp.mailfrom=Pavan.Bhagavatula@cavium.com; ",
        "X-Microsoft-Antispam-Message-Info": "ujRXT7Im9uIhqtnQjwhVuzqU6+XoevAkLyNp72+Faw4N/041KbJlHyo97aOyRtmt750IxP00F0t3r0xlWguqOzGsBfZwyeQVmFqt/0QBbzYXIlPt5Xu5gZTZYUZKWdGNmUcgFG6J0oQnVwEujjzDP1qq47Sr4fIUqPdOleHvjV5wuUgWIaDKC6XN5+Htx+D9OEgOeXPuRNIXD8NbAie6yxi6hJKArSFHtwBpH9XHgO9n8gvYeqjtr84FAKOUmwRGan5XRgrcZBhLDee3Wq2p7MaUyqK6/r6uDJNySL6dGy5FEDKMrnWQU8brliHEEvLWGmhd40TN5pSCxUelpfrI2IqUAjgzBi0GnOJojCvLLXg=",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-OriginatorOrg": "caviumnetworks.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "19 Sep 2018 22:23:10.8124\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "f8f354a8-3dc1-456d-d221-08d61e7e7c9e",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "711e4ccf-2e9b-4bcf-a551-4094005b6194",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BYAPR07MB4965",
        "Subject": "[dpdk-dev] [PATCH v3 3/4] app/test-eventdev: add Tx adapter support",
        "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": "Convert existing Tx service based pipeline to Tx adapter based APIs and\nsimplify worker functions.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>\n---\n app/test-eventdev/test_pipeline_atq.c    | 269 ++++++++++++-----------\n app/test-eventdev/test_pipeline_common.c | 202 +++++------------\n app/test-eventdev/test_pipeline_common.h |  62 +++---\n app/test-eventdev/test_pipeline_queue.c  | 241 ++++++++++----------\n 4 files changed, 363 insertions(+), 411 deletions(-)",
    "diff": "diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c\nindex f0b2f9015..01af298f3 100644\n--- a/app/test-eventdev/test_pipeline_atq.c\n+++ b/app/test-eventdev/test_pipeline_atq.c\n@@ -15,7 +15,7 @@ pipeline_atq_nb_event_queues(struct evt_options *opt)\n \treturn rte_eth_dev_count_avail();\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_single_stage_tx(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_INIT;\n@@ -28,23 +28,18 @@ pipeline_atq_worker_single_stage_tx(void *arg)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tif (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\t\t\tpipeline_tx_pkt(ev.mbuf);\n-\t\t\tw->processed_pkts++;\n-\t\t\tcontinue;\n-\t\t}\n-\t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n-\t\tpipeline_event_enqueue(dev, port, &ev);\n+\t\tpipeline_event_tx(dev, port, &ev);\n+\t\tw->processed_pkts++;\n \t}\n \n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_single_stage_fwd(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_INIT;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n@@ -54,16 +49,16 @@ pipeline_atq_worker_single_stage_fwd(void *arg)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tw->processed_pkts++;\n-\t\tev.queue_id = tx_queue;\n+\t\tev.queue_id = tx_queue[ev.mbuf->port];\n \t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n \t\tpipeline_event_enqueue(dev, port, &ev);\n+\t\tw->processed_pkts++;\n \t}\n \n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_single_stage_burst_tx(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_BURST_INIT;\n@@ -79,27 +74,21 @@ pipeline_atq_worker_single_stage_burst_tx(void *arg)\n \n \t\tfor (i = 0; i < nb_rx; i++) {\n \t\t\trte_prefetch0(ev[i + 1].mbuf);\n-\t\t\tif (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\n-\t\t\t\tpipeline_tx_pkt(ev[i].mbuf);\n-\t\t\t\tev[i].op = RTE_EVENT_OP_RELEASE;\n-\t\t\t\tw->processed_pkts++;\n-\t\t\t} else\n-\t\t\t\tpipeline_fwd_event(&ev[i],\n-\t\t\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n+\t\t\trte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);\n \t\t}\n \n-\t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n+\t\tpipeline_event_tx_burst(dev, port, ev, nb_rx);\n+\t\tw->processed_pkts += nb_rx;\n \t}\n \n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_single_stage_burst_fwd(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_BURST_INIT;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,\n@@ -112,23 +101,22 @@ pipeline_atq_worker_single_stage_burst_fwd(void *arg)\n \n \t\tfor (i = 0; i < nb_rx; i++) {\n \t\t\trte_prefetch0(ev[i + 1].mbuf);\n-\t\t\tev[i].queue_id = tx_queue;\n+\t\t\trte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);\n+\t\t\tev[i].queue_id = tx_queue[ev[i].mbuf->port];\n \t\t\tpipeline_fwd_event(&ev[i], RTE_SCHED_TYPE_ATOMIC);\n-\t\t\tw->processed_pkts++;\n \t\t}\n \n \t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n+\t\tw->processed_pkts += nb_rx;\n \t}\n \n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_multi_stage_tx(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages;\n-\n \n \twhile (t->done == false) {\n \t\tuint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n@@ -141,29 +129,24 @@ pipeline_atq_worker_multi_stage_tx(void *arg)\n \t\tcq_id = ev.sub_event_type % nb_stages;\n \n \t\tif (cq_id == last_queue) {\n-\t\t\tif (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\n-\t\t\t\tpipeline_tx_pkt(ev.mbuf);\n-\t\t\t\tw->processed_pkts++;\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n-\t\t} else {\n-\t\t\tev.sub_event_type++;\n-\t\t\tpipeline_fwd_event(&ev, sched_type_list[cq_id]);\n+\t\t\tpipeline_event_tx(dev, port, &ev);\n+\t\t\tw->processed_pkts++;\n+\t\t\tcontinue;\n \t\t}\n \n+\t\tev.sub_event_type++;\n+\t\tpipeline_fwd_event(&ev, sched_type_list[cq_id]);\n \t\tpipeline_event_enqueue(dev, port, &ev);\n \t}\n+\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_multi_stage_fwd(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n@@ -176,9 +159,9 @@ pipeline_atq_worker_multi_stage_fwd(void *arg)\n \t\tcq_id = ev.sub_event_type % nb_stages;\n \n \t\tif (cq_id == last_queue) {\n-\t\t\tw->processed_pkts++;\n-\t\t\tev.queue_id = tx_queue;\n+\t\t\tev.queue_id = tx_queue[ev.mbuf->port];\n \t\t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n+\t\t\tw->processed_pkts++;\n \t\t} else {\n \t\t\tev.sub_event_type++;\n \t\t\tpipeline_fwd_event(&ev, sched_type_list[cq_id]);\n@@ -186,14 +169,14 @@ pipeline_atq_worker_multi_stage_fwd(void *arg)\n \n \t\tpipeline_event_enqueue(dev, port, &ev);\n \t}\n+\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_multi_stage_burst_tx(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_BURST_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages;\n \n \twhile (t->done == false) {\n \t\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,\n@@ -209,34 +192,27 @@ pipeline_atq_worker_multi_stage_burst_tx(void *arg)\n \t\t\tcq_id = ev[i].sub_event_type % nb_stages;\n \n \t\t\tif (cq_id == last_queue) {\n-\t\t\t\tif (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\n-\t\t\t\t\tpipeline_tx_pkt(ev[i].mbuf);\n-\t\t\t\t\tev[i].op = RTE_EVENT_OP_RELEASE;\n-\t\t\t\t\tw->processed_pkts++;\n-\t\t\t\t\tcontinue;\n-\t\t\t\t}\n-\n-\t\t\t\tpipeline_fwd_event(&ev[i],\n-\t\t\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n-\t\t\t} else {\n-\t\t\t\tev[i].sub_event_type++;\n-\t\t\t\tpipeline_fwd_event(&ev[i],\n-\t\t\t\t\t\tsched_type_list[cq_id]);\n+\t\t\t\tpipeline_event_tx(dev, port, &ev[i]);\n+\t\t\t\tev[i].op = RTE_EVENT_OP_RELEASE;\n+\t\t\t\tw->processed_pkts++;\n+\t\t\t\tcontinue;\n \t\t\t}\n+\n+\t\t\tev[i].sub_event_type++;\n+\t\t\tpipeline_fwd_event(&ev[i], sched_type_list[cq_id]);\n \t\t}\n \n \t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n \t}\n+\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_atq_worker_multi_stage_burst_fwd(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_BURST_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,\n@@ -253,7 +229,7 @@ pipeline_atq_worker_multi_stage_burst_fwd(void *arg)\n \n \t\t\tif (cq_id == last_queue) {\n \t\t\t\tw->processed_pkts++;\n-\t\t\t\tev[i].queue_id = tx_queue;\n+\t\t\t\tev[i].queue_id = tx_queue[ev[i].mbuf->port];\n \t\t\t\tpipeline_fwd_event(&ev[i],\n \t\t\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n \t\t\t} else {\n@@ -265,6 +241,7 @@ pipeline_atq_worker_multi_stage_burst_fwd(void *arg)\n \n \t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n \t}\n+\n \treturn 0;\n }\n \n@@ -274,39 +251,36 @@ worker_wrapper(void *arg)\n \tstruct worker_data *w  = arg;\n \tstruct evt_options *opt = w->t->opt;\n \tconst bool burst = evt_has_burst_mode(w->dev_id);\n-\tconst bool mt_safe = !w->t->mt_unsafe;\n+\tconst bool internal_port = w->t->internal_port;\n \tconst uint8_t nb_stages = opt->nb_stages;\n \tRTE_SET_USED(opt);\n \n \tif (nb_stages == 1) {\n-\t\tif (!burst && mt_safe)\n+\t\tif (!burst && internal_port)\n \t\t\treturn pipeline_atq_worker_single_stage_tx(arg);\n-\t\telse if (!burst && !mt_safe)\n+\t\telse if (!burst && !internal_port)\n \t\t\treturn pipeline_atq_worker_single_stage_fwd(arg);\n-\t\telse if (burst && mt_safe)\n+\t\telse if (burst && internal_port)\n \t\t\treturn pipeline_atq_worker_single_stage_burst_tx(arg);\n-\t\telse if (burst && !mt_safe)\n+\t\telse if (burst && !internal_port)\n \t\t\treturn pipeline_atq_worker_single_stage_burst_fwd(arg);\n \t} else {\n-\t\tif (!burst && mt_safe)\n+\t\tif (!burst && internal_port)\n \t\t\treturn pipeline_atq_worker_multi_stage_tx(arg);\n-\t\telse if (!burst && !mt_safe)\n+\t\telse if (!burst && !internal_port)\n \t\t\treturn pipeline_atq_worker_multi_stage_fwd(arg);\n-\t\tif (burst && mt_safe)\n+\t\tif (burst && internal_port)\n \t\t\treturn pipeline_atq_worker_multi_stage_burst_tx(arg);\n-\t\telse if (burst && !mt_safe)\n+\t\telse if (burst && !internal_port)\n \t\t\treturn pipeline_atq_worker_multi_stage_burst_fwd(arg);\n \t}\n+\n \trte_panic(\"invalid worker\\n\");\n }\n \n static int\n pipeline_atq_launch_lcores(struct evt_test *test, struct evt_options *opt)\n {\n-\tstruct test_pipeline *t = evt_test_priv(test);\n-\n-\tif (t->mt_unsafe)\n-\t\trte_service_component_runstate_set(t->tx_service.service_id, 1);\n \treturn pipeline_launch_lcores(test, opt, worker_wrapper);\n }\n \n@@ -317,34 +291,36 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \tint nb_ports;\n \tint nb_queues;\n \tuint8_t queue;\n-\tstruct rte_event_dev_info info;\n-\tstruct test_pipeline *t = evt_test_priv(test);\n-\tuint8_t tx_evqueue_id = 0;\n+\tuint8_t tx_evqueue_id[RTE_MAX_ETHPORTS] = {0};\n \tuint8_t queue_arr[RTE_EVENT_MAX_QUEUES_PER_DEV];\n \tuint8_t nb_worker_queues = 0;\n+\tuint8_t tx_evport_id = 0;\n+\tuint16_t prod = 0;\n+\tstruct rte_event_dev_info info;\n+\tstruct test_pipeline *t = evt_test_priv(test);\n \n \tnb_ports = evt_nr_active_lcores(opt->wlcores);\n \tnb_queues = rte_eth_dev_count_avail();\n \n-\t/* One extra port and queueu for Tx service */\n-\tif (t->mt_unsafe) {\n-\t\ttx_evqueue_id = nb_queues;\n-\t\tnb_ports++;\n-\t\tnb_queues++;\n+\t/* One queue for Tx adapter per port */\n+\tif (!t->internal_port) {\n+\t\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\t\ttx_evqueue_id[prod] = nb_queues;\n+\t\t\tnb_queues++;\n+\t\t}\n \t}\n \n-\n \trte_event_dev_info_get(opt->dev_id, &info);\n \n \tconst struct rte_event_dev_config config = {\n-\t\t\t.nb_event_queues = nb_queues,\n-\t\t\t.nb_event_ports = nb_ports,\n-\t\t\t.nb_events_limit  = info.max_num_events,\n-\t\t\t.nb_event_queue_flows = opt->nb_flows,\n-\t\t\t.nb_event_port_dequeue_depth =\n-\t\t\t\tinfo.max_event_port_dequeue_depth,\n-\t\t\t.nb_event_port_enqueue_depth =\n-\t\t\t\tinfo.max_event_port_enqueue_depth,\n+\t\t.nb_event_queues = nb_queues,\n+\t\t.nb_event_ports = nb_ports,\n+\t\t.nb_events_limit  = info.max_num_events,\n+\t\t.nb_event_queue_flows = opt->nb_flows,\n+\t\t.nb_event_port_dequeue_depth =\n+\t\t\tinfo.max_event_port_dequeue_depth,\n+\t\t.nb_event_port_enqueue_depth =\n+\t\t\tinfo.max_event_port_enqueue_depth,\n \t};\n \tret = rte_event_dev_configure(opt->dev_id, &config);\n \tif (ret) {\n@@ -353,21 +329,23 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t}\n \n \tstruct rte_event_queue_conf q_conf = {\n-\t\t\t.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,\n-\t\t\t.nb_atomic_flows = opt->nb_flows,\n-\t\t\t.nb_atomic_order_sequences = opt->nb_flows,\n+\t\t.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,\n+\t\t.nb_atomic_flows = opt->nb_flows,\n+\t\t.nb_atomic_order_sequences = opt->nb_flows,\n \t};\n \t/* queue configurations */\n \tfor (queue = 0; queue < nb_queues; queue++) {\n \t\tq_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES;\n \n-\t\tif (t->mt_unsafe) {\n-\t\t\tif (queue == tx_evqueue_id) {\n-\t\t\t\tq_conf.event_queue_cfg =\n-\t\t\t\t\tRTE_EVENT_QUEUE_CFG_SINGLE_LINK;\n-\t\t\t} else {\n-\t\t\t\tqueue_arr[nb_worker_queues] = queue;\n-\t\t\t\tnb_worker_queues++;\n+\t\tif (!t->internal_port) {\n+\t\t\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\t\t\tif (queue == tx_evqueue_id[prod]) {\n+\t\t\t\t\tq_conf.event_queue_cfg =\n+\t\t\t\t\t\tRTE_EVENT_QUEUE_CFG_SINGLE_LINK;\n+\t\t\t\t} else {\n+\t\t\t\t\tqueue_arr[nb_worker_queues] = queue;\n+\t\t\t\t\tnb_worker_queues++;\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \n@@ -383,20 +361,15 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \n \t/* port configuration */\n \tconst struct rte_event_port_conf p_conf = {\n-\t\t\t.dequeue_depth = opt->wkr_deq_dep,\n-\t\t\t.enqueue_depth = info.max_event_port_dequeue_depth,\n-\t\t\t.new_event_threshold = info.max_num_events,\n+\t\t.dequeue_depth = opt->wkr_deq_dep,\n+\t\t.enqueue_depth = info.max_event_port_dequeue_depth,\n+\t\t.new_event_threshold = info.max_num_events,\n \t};\n \n-\tif (t->mt_unsafe) {\n+\tif (!t->internal_port)\n \t\tret = pipeline_event_port_setup(test, opt, queue_arr,\n \t\t\t\tnb_worker_queues, p_conf);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\n-\t\tret = pipeline_event_tx_service_setup(test, opt, tx_evqueue_id,\n-\t\t\t\tnb_ports - 1, p_conf);\n-\t} else\n+\telse\n \t\tret = pipeline_event_port_setup(test, opt, NULL, nb_queues,\n \t\t\t\tp_conf);\n \n@@ -408,30 +381,32 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t *\n \t * eth_dev_count = 2, nb_stages = 2, atq mode\n \t *\n-\t * Multi thread safe :\n+\t * eth0, eth1 have Internal port capability :\n \t *\tqueues = 2\n \t *\tstride = 1\n \t *\n \t *\tevent queue pipelines:\n-\t *\teth0 -> q0 ->tx\n-\t *\teth1 -> q1 ->tx\n+\t *\teth0 -> q0 ->Tx\n+\t *\teth1 -> q1 ->Tx\n \t *\n \t *\tq0, q1 are configured as ATQ so, all the different stages can\n \t *\tbe enqueued on the same queue.\n \t *\n-\t * Multi thread unsafe :\n-\t *\tqueues = 3\n+\t * eth0, eth1 use Tx adapters service core :\n+\t *\tqueues = 4\n \t *\tstride = 1\n \t *\n \t *\tevent queue pipelines:\n-\t *\teth0 -> q0\n-\t *\t\t  } (q3->tx) Tx service\n-\t *\teth1 -> q1\n+\t *\teth0 -> q0  -> q2 -> Tx\n+\t *\teth1 -> q1  -> q3 -> Tx\n \t *\n-\t *\tq0,q1 are configured as stated above.\n-\t *\tq3 configured as SINGLE_LINK|ATOMIC.\n+\t *\tq0, q1 are configured as stated above.\n+\t *\tq2, q3 configured as SINGLE_LINK.\n \t */\n \tret = pipeline_event_rx_adapter_setup(opt, 1, p_conf);\n+\tif (ret)\n+\t\treturn ret;\n+\tret = pipeline_event_tx_adapter_setup(opt, p_conf);\n \tif (ret)\n \t\treturn ret;\n \n@@ -445,12 +420,58 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t\t}\n \t}\n \n+\t/* Connect the tx_evqueue_id to the Tx adapter port */\n+\tif (!t->internal_port) {\n+\t\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\t\tret = rte_event_eth_tx_adapter_event_port_get(prod,\n+\t\t\t\t\t&tx_evport_id);\n+\t\t\tif (ret) {\n+\t\t\t\tevt_err(\"Unable to get Tx adapter[%d]\", prod);\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\n+\t\t\tif (rte_event_port_link(opt->dev_id, tx_evport_id,\n+\t\t\t\t\t\t&tx_evqueue_id[prod],\n+\t\t\t\t\t\tNULL, 1) != 1) {\n+\t\t\t\tevt_err(\"Unable to link Tx adptr[%d] evprt[%d]\",\n+\t\t\t\t\t\tprod, tx_evport_id);\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\tret = rte_eth_dev_start(prod);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"Ethernet dev [%d] failed to start.\"\n+\t\t\t\t\t\" Using synthetic producer\", prod);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n \tret = rte_event_dev_start(opt->dev_id);\n \tif (ret) {\n \t\tevt_err(\"failed to start eventdev %d\", opt->dev_id);\n \t\treturn ret;\n \t}\n \n+\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\tret = rte_event_eth_rx_adapter_start(prod);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"Rx adapter[%d] start failed\", prod);\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t\tret = rte_event_eth_tx_adapter_start(prod);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"Tx adapter[%d] start failed\", prod);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\tmemcpy(t->tx_evqueue_id, tx_evqueue_id, sizeof(uint8_t) *\n+\t\t\tRTE_MAX_ETHPORTS);\n+\n \treturn 0;\n }\n \ndiff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c\nindex cdf9010b4..398b0010e 100644\n--- a/app/test-eventdev/test_pipeline_common.c\n+++ b/app/test-eventdev/test_pipeline_common.c\n@@ -5,58 +5,6 @@\n \n #include \"test_pipeline_common.h\"\n \n-static int32_t\n-pipeline_event_tx_burst_service_func(void *args)\n-{\n-\n-\tint i;\n-\tstruct tx_service_data *tx = args;\n-\tconst uint8_t dev = tx->dev_id;\n-\tconst uint8_t port = tx->port_id;\n-\tstruct rte_event ev[BURST_SIZE + 1];\n-\n-\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev, BURST_SIZE, 0);\n-\n-\tif (!nb_rx) {\n-\t\tfor (i = 0; i < tx->nb_ethports; i++)\n-\t\t\trte_eth_tx_buffer_flush(i, 0, tx->tx_buf[i]);\n-\t\treturn 0;\n-\t}\n-\n-\tfor (i = 0; i < nb_rx; i++) {\n-\t\tstruct rte_mbuf *m = ev[i].mbuf;\n-\t\trte_eth_tx_buffer(m->port, 0, tx->tx_buf[m->port], m);\n-\t}\n-\ttx->processed_pkts += nb_rx;\n-\n-\treturn 0;\n-}\n-\n-static int32_t\n-pipeline_event_tx_service_func(void *args)\n-{\n-\n-\tint i;\n-\tstruct tx_service_data *tx = args;\n-\tconst uint8_t dev = tx->dev_id;\n-\tconst uint8_t port = tx->port_id;\n-\tstruct rte_event ev;\n-\n-\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n-\n-\tif (!nb_rx) {\n-\t\tfor (i = 0; i < tx->nb_ethports; i++)\n-\t\t\trte_eth_tx_buffer_flush(i, 0, tx->tx_buf[i]);\n-\t\treturn 0;\n-\t}\n-\n-\tstruct rte_mbuf *m = ev.mbuf;\n-\trte_eth_tx_buffer(m->port, 0, tx->tx_buf[m->port], m);\n-\ttx->processed_pkts++;\n-\n-\treturn 0;\n-}\n-\n int\n pipeline_test_result(struct evt_test *test, struct evt_options *opt)\n {\n@@ -97,11 +45,8 @@ processed_pkts(struct test_pipeline *t)\n \tuint64_t total = 0;\n \n \trte_smp_rmb();\n-\tif (t->mt_unsafe)\n-\t\ttotal = t->tx_service.processed_pkts;\n-\telse\n-\t\tfor (i = 0; i < t->nb_workers; i++)\n-\t\t\ttotal += t->worker[i].processed_pkts;\n+\tfor (i = 0; i < t->nb_workers; i++)\n+\t\ttotal += t->worker[i].processed_pkts;\n \n \treturn total;\n }\n@@ -215,7 +160,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)\n {\n \tuint16_t i;\n \tuint8_t nb_queues = 1;\n-\tuint8_t mt_state = 0;\n \tstruct test_pipeline *t = evt_test_priv(test);\n \tstruct rte_eth_rxconf rx_conf;\n \tstruct rte_eth_conf port_conf = {\n@@ -237,13 +181,17 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)\n \t\treturn -ENODEV;\n \t}\n \n+\tt->internal_port = 1;\n \tRTE_ETH_FOREACH_DEV(i) {\n \t\tstruct rte_eth_dev_info dev_info;\n \t\tstruct rte_eth_conf local_port_conf = port_conf;\n+\t\tuint32_t caps = 0;\n+\n+\t\trte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps);\n+\t\tif (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT))\n+\t\t\tt->internal_port = 0;\n \n \t\trte_eth_dev_info_get(i, &dev_info);\n-\t\tmt_state = !(dev_info.tx_offload_capa &\n-\t\t\t\tDEV_TX_OFFLOAD_MT_LOCKFREE);\n \t\trx_conf = dev_info.default_rxconf;\n \t\trx_conf.offloads = port_conf.rxmode.offloads;\n \n@@ -278,11 +226,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)\n \t\t\treturn -EINVAL;\n \t\t}\n \n-\t\tt->mt_unsafe |= mt_state;\n-\t\tt->tx_service.tx_buf[i] =\n-\t\t\trte_malloc(NULL, RTE_ETH_TX_BUFFER_SIZE(BURST_SIZE), 0);\n-\t\tif (t->tx_service.tx_buf[i] == NULL)\n-\t\t\trte_panic(\"Unable to allocate Tx buffer memory.\");\n \t\trte_eth_promiscuous_enable(i);\n \t}\n \n@@ -294,7 +237,6 @@ pipeline_event_port_setup(struct evt_test *test, struct evt_options *opt,\n \t\tuint8_t *queue_arr, uint8_t nb_queues,\n \t\tconst struct rte_event_port_conf p_conf)\n {\n-\tint i;\n \tint ret;\n \tuint8_t port;\n \tstruct test_pipeline *t = evt_test_priv(test);\n@@ -315,23 +257,15 @@ pipeline_event_port_setup(struct evt_test *test, struct evt_options *opt,\n \t\t\treturn ret;\n \t\t}\n \n-\t\tif (queue_arr == NULL) {\n-\t\t\tif (rte_event_port_link(opt->dev_id, port, NULL, NULL,\n-\t\t\t\t\t\t0) != nb_queues)\n-\t\t\t\tgoto link_fail;\n-\t\t} else {\n-\t\t\tfor (i = 0; i < nb_queues; i++) {\n-\t\t\t\tif (rte_event_port_link(opt->dev_id, port,\n-\t\t\t\t\t\t&queue_arr[i], NULL, 1) != 1)\n-\t\t\t\t\tgoto link_fail;\n-\t\t\t}\n-\t\t}\n+\t\tif (rte_event_port_link(opt->dev_id, port, queue_arr, NULL,\n+\t\t\t\t\tnb_queues) != nb_queues)\n+\t\t\tgoto link_fail;\n \t}\n \n \treturn 0;\n \n link_fail:\n-\tevt_err(\"failed to link all queues to port %d\", port);\n+\tevt_err(\"failed to link queues to port %d\", port);\n \treturn -EINVAL;\n }\n \n@@ -384,79 +318,64 @@ pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride,\n \t\t\t}\n \t\t}\n \n-\t\tret = rte_eth_dev_start(prod);\n-\t\tif (ret) {\n-\t\t\tevt_err(\"Ethernet dev [%d] failed to start.\"\n-\t\t\t\t\t\" Using synthetic producer\", prod);\n-\t\t\treturn ret;\n-\t\t}\n-\n-\t\tret = rte_event_eth_rx_adapter_start(prod);\n-\t\tif (ret) {\n-\t\t\tevt_err(\"Rx adapter[%d] start failed\", prod);\n-\t\t\treturn ret;\n-\t\t}\n-\t\tevt_info(\"Port[%d] using Rx adapter[%d] started\", prod, prod);\n+\t\tevt_info(\"Port[%d] using Rx adapter[%d] configured\", prod,\n+\t\t\t\tprod);\n \t}\n \n \treturn ret;\n }\n \n int\n-pipeline_event_tx_service_setup(struct evt_test *test, struct evt_options *opt,\n-\t\tuint8_t tx_queue_id, uint8_t tx_port_id,\n-\t\tconst struct rte_event_port_conf p_conf)\n+pipeline_event_tx_adapter_setup(struct evt_options *opt,\n+\t\tstruct rte_event_port_conf port_conf)\n {\n-\tint ret;\n-\tstruct rte_service_spec serv;\n-\tstruct test_pipeline *t = evt_test_priv(test);\n-\tstruct tx_service_data *tx = &t->tx_service;\n+\tint ret = 0;\n+\tuint16_t consm = 0;\n \n-\tret = rte_event_port_setup(opt->dev_id, tx_port_id, &p_conf);\n-\tif (ret) {\n-\t\tevt_err(\"failed to setup port %d\", tx_port_id);\n-\t\treturn ret;\n-\t}\n+\tRTE_ETH_FOREACH_DEV(consm) {\n+\t\tuint32_t cap;\n \n-\tif (rte_event_port_link(opt->dev_id, tx_port_id, &tx_queue_id,\n-\t\t\t\tNULL, 1) != 1) {\n-\t\tevt_err(\"failed to link queues to port %d\", tx_port_id);\n-\t\treturn -EINVAL;\n-\t}\n+\t\tret = rte_event_eth_tx_adapter_caps_get(opt->dev_id,\n+\t\t\t\tconsm, &cap);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"failed to get event tx adapter[%d] caps\",\n+\t\t\t\t\tconsm);\n+\t\t\treturn ret;\n+\t\t}\n \n-\ttx->dev_id = opt->dev_id;\n-\ttx->queue_id = tx_queue_id;\n-\ttx->port_id = tx_port_id;\n-\ttx->nb_ethports = rte_eth_dev_count_avail();\n-\ttx->t = t;\n-\n-\t/* Register Tx service */\n-\tmemset(&serv, 0, sizeof(struct rte_service_spec));\n-\tsnprintf(serv.name, sizeof(serv.name), \"Tx_service\");\n-\n-\tif (evt_has_burst_mode(opt->dev_id))\n-\t\tserv.callback = pipeline_event_tx_burst_service_func;\n-\telse\n-\t\tserv.callback = pipeline_event_tx_service_func;\n-\n-\tserv.callback_userdata = (void *)tx;\n-\tret = rte_service_component_register(&serv, &tx->service_id);\n-\tif (ret) {\n-\t\tevt_err(\"failed to register Tx service\");\n-\t\treturn ret;\n-\t}\n+\t\tret = rte_event_eth_tx_adapter_create(consm, opt->dev_id,\n+\t\t\t\t&port_conf);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"failed to create tx adapter[%d]\", consm);\n+\t\t\treturn ret;\n+\t\t}\n \n-\tret = evt_service_setup(tx->service_id);\n-\tif (ret) {\n-\t\tevt_err(\"Failed to setup service core for Tx service\\n\");\n-\t\treturn ret;\n-\t}\n+\t\tret = rte_event_eth_tx_adapter_queue_add(consm, consm, -1);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"failed to add tx queues to adapter[%d]\",\n+\t\t\t\t\tconsm);\n+\t\t\treturn ret;\n+\t\t}\n \n-\trte_service_runstate_set(tx->service_id, 1);\n+\t\tif (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {\n+\t\t\tuint32_t service_id;\n \n-\treturn 0;\n-}\n+\t\t\trte_event_eth_tx_adapter_service_id_get(consm,\n+\t\t\t\t\t&service_id);\n+\t\t\tret = evt_service_setup(service_id);\n+\t\t\tif (ret) {\n+\t\t\t\tevt_err(\"Failed to setup service core\"\n+\t\t\t\t\t\t\" for Tx adapter\\n\");\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\t\t}\n+\n+\t\tevt_info(\"Port[%d] using Tx adapter[%d] Configured\", consm,\n+\t\t\t\tconsm);\n+\t}\n \n+\treturn ret;\n+}\n \n void\n pipeline_ethdev_destroy(struct evt_test *test, struct evt_options *opt)\n@@ -464,16 +383,10 @@ pipeline_ethdev_destroy(struct evt_test *test, struct evt_options *opt)\n \tuint16_t i;\n \tRTE_SET_USED(test);\n \tRTE_SET_USED(opt);\n-\tstruct test_pipeline *t = evt_test_priv(test);\n-\n-\tif (t->mt_unsafe) {\n-\t\trte_service_component_runstate_set(t->tx_service.service_id, 0);\n-\t\trte_service_runstate_set(t->tx_service.service_id, 0);\n-\t\trte_service_component_unregister(t->tx_service.service_id);\n-\t}\n \n \tRTE_ETH_FOREACH_DEV(i) {\n \t\trte_event_eth_rx_adapter_stop(i);\n+\t\trte_event_eth_tx_adapter_stop(i);\n \t\trte_eth_dev_stop(i);\n \t}\n }\n@@ -483,7 +396,6 @@ pipeline_eventdev_destroy(struct evt_test *test, struct evt_options *opt)\n {\n \tRTE_SET_USED(test);\n \n-\trte_event_dev_stop(opt->dev_id);\n \trte_event_dev_close(opt->dev_id);\n }\n \ndiff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h\nindex 9cd6b905b..0440b9e29 100644\n--- a/app/test-eventdev/test_pipeline_common.h\n+++ b/app/test-eventdev/test_pipeline_common.h\n@@ -14,6 +14,7 @@\n #include <rte_ethdev.h>\n #include <rte_eventdev.h>\n #include <rte_event_eth_rx_adapter.h>\n+#include <rte_event_eth_tx_adapter.h>\n #include <rte_lcore.h>\n #include <rte_malloc.h>\n #include <rte_mempool.h>\n@@ -35,30 +36,19 @@ struct worker_data {\n \tstruct test_pipeline *t;\n } __rte_cache_aligned;\n \n-struct tx_service_data {\n-\tuint8_t dev_id;\n-\tuint8_t queue_id;\n-\tuint8_t port_id;\n-\tuint32_t service_id;\n-\tuint64_t processed_pkts;\n-\tuint16_t nb_ethports;\n-\tstruct rte_eth_dev_tx_buffer *tx_buf[RTE_MAX_ETHPORTS];\n-\tstruct test_pipeline *t;\n-} __rte_cache_aligned;\n-\n struct test_pipeline {\n \t/* Don't change the offset of \"done\". Signal handler use this memory\n \t * to terminate all lcores work.\n \t */\n \tint done;\n \tuint8_t nb_workers;\n-\tuint8_t mt_unsafe;\n+\tuint8_t internal_port;\n+\tuint8_t tx_evqueue_id[RTE_MAX_ETHPORTS];\n \tenum evt_test_result result;\n \tuint32_t nb_flows;\n \tuint64_t outstand_pkts;\n \tstruct rte_mempool *pool;\n \tstruct worker_data worker[EVT_MAX_PORTS];\n-\tstruct tx_service_data tx_service;\n \tstruct evt_options *opt;\n \tuint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned;\n } __rte_cache_aligned;\n@@ -70,7 +60,7 @@ struct test_pipeline {\n \tstruct test_pipeline *t = w->t;   \\\n \tconst uint8_t dev = w->dev_id;    \\\n \tconst uint8_t port = w->port_id;  \\\n-\tstruct rte_event ev\n+\tstruct rte_event ev __rte_cache_aligned\n \n #define PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT \\\n \tint i;                                  \\\n@@ -78,7 +68,7 @@ struct test_pipeline {\n \tstruct test_pipeline *t = w->t;         \\\n \tconst uint8_t dev = w->dev_id;          \\\n \tconst uint8_t port = w->port_id;        \\\n-\tstruct rte_event ev[BURST_SIZE + 1]\n+\tstruct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned\n \n #define PIPELINE_WORKER_MULTI_STAGE_INIT                         \\\n \tstruct worker_data *w  = arg;                            \\\n@@ -88,10 +78,11 @@ struct test_pipeline {\n \tconst uint8_t port = w->port_id;                         \\\n \tconst uint8_t last_queue = t->opt->nb_stages - 1;        \\\n \tuint8_t *const sched_type_list = &t->sched_type_list[0]; \\\n-\tstruct rte_event ev\n+\tconst uint8_t nb_stages = t->opt->nb_stages + 1;\t \\\n+\tstruct rte_event ev __rte_cache_aligned\n \n #define PIPELINE_WORKER_MULTI_STAGE_BURST_INIT                   \\\n-\tint i;                                  \\\n+\tint i;                                                   \\\n \tstruct worker_data *w  = arg;                            \\\n \tstruct test_pipeline *t = w->t;                          \\\n \tuint8_t cq_id;                                           \\\n@@ -99,7 +90,8 @@ struct test_pipeline {\n \tconst uint8_t port = w->port_id;                         \\\n \tconst uint8_t last_queue = t->opt->nb_stages - 1;        \\\n \tuint8_t *const sched_type_list = &t->sched_type_list[0]; \\\n-\tstruct rte_event ev[BURST_SIZE + 1]\n+\tconst uint8_t nb_stages = t->opt->nb_stages + 1;\t \\\n+\tstruct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned\n \n static __rte_always_inline void\n pipeline_fwd_event(struct rte_event *ev, uint8_t sched)\n@@ -109,6 +101,28 @@ pipeline_fwd_event(struct rte_event *ev, uint8_t sched)\n \tev->sched_type = sched;\n }\n \n+static __rte_always_inline void\n+pipeline_event_tx(const uint8_t dev, const uint8_t port,\n+\t\tstruct rte_event * const ev)\n+{\n+\trte_event_eth_tx_adapter_txq_set(ev->mbuf, 0);\n+\twhile (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1))\n+\t\trte_pause();\n+}\n+\n+static __rte_always_inline void\n+pipeline_event_tx_burst(const uint8_t dev, const uint8_t port,\n+\t\tstruct rte_event *ev, const uint16_t nb_rx)\n+{\n+\tuint16_t enq;\n+\n+\tenq = rte_event_eth_tx_adapter_enqueue(dev, port, ev, nb_rx);\n+\twhile (enq < nb_rx) {\n+\t\tenq += rte_event_eth_tx_adapter_enqueue(dev, port,\n+\t\t\t\tev + enq, nb_rx - enq);\n+\t}\n+}\n+\n static __rte_always_inline void\n pipeline_event_enqueue(const uint8_t dev, const uint8_t port,\n \t\tstruct rte_event *ev)\n@@ -130,13 +144,6 @@ pipeline_event_enqueue_burst(const uint8_t dev, const uint8_t port,\n \t}\n }\n \n-static __rte_always_inline void\n-pipeline_tx_pkt(struct rte_mbuf *mbuf)\n-{\n-\twhile (rte_eth_tx_burst(mbuf->port, 0, &mbuf, 1) != 1)\n-\t\trte_pause();\n-}\n-\n static inline int\n pipeline_nb_event_ports(struct evt_options *opt)\n {\n@@ -149,9 +156,8 @@ int pipeline_test_setup(struct evt_test *test, struct evt_options *opt);\n int pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt);\n int pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride,\n \t\tstruct rte_event_port_conf prod_conf);\n-int pipeline_event_tx_service_setup(struct evt_test *test,\n-\t\tstruct evt_options *opt, uint8_t tx_queue_id,\n-\t\tuint8_t tx_port_id, const struct rte_event_port_conf p_conf);\n+int pipeline_event_tx_adapter_setup(struct evt_options *opt,\n+\t\tstruct rte_event_port_conf prod_conf);\n int pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt);\n int pipeline_event_port_setup(struct evt_test *test, struct evt_options *opt,\n \t\tuint8_t *queue_arr, uint8_t nb_queues,\ndiff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c\nindex 2e0d93d99..1156c2555 100644\n--- a/app/test-eventdev/test_pipeline_queue.c\n+++ b/app/test-eventdev/test_pipeline_queue.c\n@@ -15,7 +15,7 @@ pipeline_queue_nb_event_queues(struct evt_options *opt)\n \treturn (eth_count * opt->nb_stages) + eth_count;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_single_stage_tx(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_INIT;\n@@ -29,7 +29,7 @@ pipeline_queue_worker_single_stage_tx(void *arg)\n \t\t}\n \n \t\tif (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\t\t\tpipeline_tx_pkt(ev.mbuf);\n+\t\t\tpipeline_event_tx(dev, port, &ev);\n \t\t\tw->processed_pkts++;\n \t\t} else {\n \t\t\tev.queue_id++;\n@@ -41,11 +41,11 @@ pipeline_queue_worker_single_stage_tx(void *arg)\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_single_stage_fwd(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_INIT;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n@@ -55,7 +55,8 @@ pipeline_queue_worker_single_stage_fwd(void *arg)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tev.queue_id = tx_queue;\n+\t\tev.queue_id = tx_queue[ev.mbuf->port];\n+\t\trte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);\n \t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n \t\tpipeline_event_enqueue(dev, port, &ev);\n \t\tw->processed_pkts++;\n@@ -64,7 +65,7 @@ pipeline_queue_worker_single_stage_fwd(void *arg)\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_single_stage_burst_tx(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_BURST_INIT;\n@@ -81,8 +82,7 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg)\n \t\tfor (i = 0; i < nb_rx; i++) {\n \t\t\trte_prefetch0(ev[i + 1].mbuf);\n \t\t\tif (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\n-\t\t\t\tpipeline_tx_pkt(ev[i].mbuf);\n+\t\t\t\tpipeline_event_tx(dev, port, &ev[i]);\n \t\t\t\tev[i].op = RTE_EVENT_OP_RELEASE;\n \t\t\t\tw->processed_pkts++;\n \t\t\t} else {\n@@ -98,11 +98,11 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg)\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_single_stage_burst_fwd(void *arg)\n {\n \tPIPELINE_WORKER_SINGLE_STAGE_BURST_INIT;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,\n@@ -115,23 +115,24 @@ pipeline_queue_worker_single_stage_burst_fwd(void *arg)\n \n \t\tfor (i = 0; i < nb_rx; i++) {\n \t\t\trte_prefetch0(ev[i + 1].mbuf);\n-\t\t\tev[i].queue_id = tx_queue;\n+\t\t\tev[i].queue_id = tx_queue[ev[i].mbuf->port];\n+\t\t\trte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);\n \t\t\tpipeline_fwd_event(&ev[i], RTE_SCHED_TYPE_ATOMIC);\n-\t\t\tw->processed_pkts++;\n \t\t}\n \n \t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n+\t\tw->processed_pkts += nb_rx;\n \t}\n \n \treturn 0;\n }\n \n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_multi_stage_tx(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages + 1;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n@@ -143,31 +144,27 @@ pipeline_queue_worker_multi_stage_tx(void *arg)\n \n \t\tcq_id = ev.queue_id % nb_stages;\n \n-\t\tif (cq_id >= last_queue) {\n-\t\t\tif (ev.sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\n-\t\t\t\tpipeline_tx_pkt(ev.mbuf);\n-\t\t\t\tw->processed_pkts++;\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t\tev.queue_id += (cq_id == last_queue) ? 1 : 0;\n-\t\t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n-\t\t} else {\n-\t\t\tev.queue_id++;\n-\t\t\tpipeline_fwd_event(&ev, sched_type_list[cq_id]);\n+\t\tif (ev.queue_id == tx_queue[ev.mbuf->port]) {\n+\t\t\tpipeline_event_tx(dev, port, &ev);\n+\t\t\tw->processed_pkts++;\n+\t\t\tcontinue;\n \t\t}\n \n+\t\tev.queue_id++;\n+\t\tpipeline_fwd_event(&ev, cq_id != last_queue ?\n+\t\t\t\tsched_type_list[cq_id] :\n+\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n \t\tpipeline_event_enqueue(dev, port, &ev);\n \t}\n+\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_multi_stage_fwd(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages + 1;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t event = rte_event_dequeue_burst(dev, port, &ev, 1, 0);\n@@ -180,7 +177,8 @@ pipeline_queue_worker_multi_stage_fwd(void *arg)\n \t\tcq_id = ev.queue_id % nb_stages;\n \n \t\tif (cq_id == last_queue) {\n-\t\t\tev.queue_id = tx_queue;\n+\t\t\tev.queue_id = tx_queue[ev.mbuf->port];\n+\t\t\trte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);\n \t\t\tpipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);\n \t\t\tw->processed_pkts++;\n \t\t} else {\n@@ -190,14 +188,15 @@ pipeline_queue_worker_multi_stage_fwd(void *arg)\n \n \t\tpipeline_event_enqueue(dev, port, &ev);\n \t}\n+\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_multi_stage_burst_tx(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_BURST_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages + 1;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,\n@@ -212,37 +211,30 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)\n \t\t\trte_prefetch0(ev[i + 1].mbuf);\n \t\t\tcq_id = ev[i].queue_id % nb_stages;\n \n-\t\t\tif (cq_id >= last_queue) {\n-\t\t\t\tif (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {\n-\n-\t\t\t\t\tpipeline_tx_pkt(ev[i].mbuf);\n-\t\t\t\t\tev[i].op = RTE_EVENT_OP_RELEASE;\n-\t\t\t\t\tw->processed_pkts++;\n-\t\t\t\t\tcontinue;\n-\t\t\t\t}\n-\n-\t\t\t\tev[i].queue_id += (cq_id == last_queue) ? 1 : 0;\n-\t\t\t\tpipeline_fwd_event(&ev[i],\n-\t\t\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n-\t\t\t} else {\n-\t\t\t\tev[i].queue_id++;\n-\t\t\t\tpipeline_fwd_event(&ev[i],\n-\t\t\t\t\t\tsched_type_list[cq_id]);\n+\t\t\tif (ev[i].queue_id == tx_queue[ev[i].mbuf->port]) {\n+\t\t\t\tpipeline_event_tx(dev, port, &ev[i]);\n+\t\t\t\tev[i].op = RTE_EVENT_OP_RELEASE;\n+\t\t\t\tw->processed_pkts++;\n+\t\t\t\tcontinue;\n \t\t\t}\n \n+\t\t\tev[i].queue_id++;\n+\t\t\tpipeline_fwd_event(&ev[i], cq_id != last_queue ?\n+\t\t\t\t\tsched_type_list[cq_id] :\n+\t\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n \t\t}\n \n \t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n \t}\n+\n \treturn 0;\n }\n \n-static int\n+static __rte_noinline int\n pipeline_queue_worker_multi_stage_burst_fwd(void *arg)\n {\n \tPIPELINE_WORKER_MULTI_STAGE_BURST_INIT;\n-\tconst uint8_t nb_stages = t->opt->nb_stages + 1;\n-\tconst uint8_t tx_queue = t->tx_service.queue_id;\n+\tconst uint8_t *tx_queue = t->tx_evqueue_id;\n \n \twhile (t->done == false) {\n \t\tuint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,\n@@ -258,7 +250,8 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)\n \t\t\tcq_id = ev[i].queue_id % nb_stages;\n \n \t\t\tif (cq_id == last_queue) {\n-\t\t\t\tev[i].queue_id = tx_queue;\n+\t\t\t\tev[i].queue_id = tx_queue[ev[i].mbuf->port];\n+\t\t\t\trte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);\n \t\t\t\tpipeline_fwd_event(&ev[i],\n \t\t\t\t\t\tRTE_SCHED_TYPE_ATOMIC);\n \t\t\t\tw->processed_pkts++;\n@@ -271,6 +264,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)\n \n \t\tpipeline_event_enqueue_burst(dev, port, ev, nb_rx);\n \t}\n+\n \treturn 0;\n }\n \n@@ -280,28 +274,28 @@ worker_wrapper(void *arg)\n \tstruct worker_data *w  = arg;\n \tstruct evt_options *opt = w->t->opt;\n \tconst bool burst = evt_has_burst_mode(w->dev_id);\n-\tconst bool mt_safe = !w->t->mt_unsafe;\n+\tconst bool internal_port = w->t->internal_port;\n \tconst uint8_t nb_stages = opt->nb_stages;\n \tRTE_SET_USED(opt);\n \n \tif (nb_stages == 1) {\n-\t\tif (!burst && mt_safe)\n+\t\tif (!burst && internal_port)\n \t\t\treturn pipeline_queue_worker_single_stage_tx(arg);\n-\t\telse if (!burst && !mt_safe)\n+\t\telse if (!burst && !internal_port)\n \t\t\treturn pipeline_queue_worker_single_stage_fwd(arg);\n-\t\telse if (burst && mt_safe)\n+\t\telse if (burst && internal_port)\n \t\t\treturn pipeline_queue_worker_single_stage_burst_tx(arg);\n-\t\telse if (burst && !mt_safe)\n+\t\telse if (burst && !internal_port)\n \t\t\treturn pipeline_queue_worker_single_stage_burst_fwd(\n \t\t\t\t\targ);\n \t} else {\n-\t\tif (!burst && mt_safe)\n+\t\tif (!burst && internal_port)\n \t\t\treturn pipeline_queue_worker_multi_stage_tx(arg);\n-\t\telse if (!burst && !mt_safe)\n+\t\telse if (!burst && !internal_port)\n \t\t\treturn pipeline_queue_worker_multi_stage_fwd(arg);\n-\t\telse if (burst && mt_safe)\n+\t\telse if (burst && internal_port)\n \t\t\treturn pipeline_queue_worker_multi_stage_burst_tx(arg);\n-\t\telse if (burst && !mt_safe)\n+\t\telse if (burst && !internal_port)\n \t\t\treturn pipeline_queue_worker_multi_stage_burst_fwd(arg);\n \n \t}\n@@ -311,10 +305,6 @@ worker_wrapper(void *arg)\n static int\n pipeline_queue_launch_lcores(struct evt_test *test, struct evt_options *opt)\n {\n-\tstruct test_pipeline *t = evt_test_priv(test);\n-\n-\tif (t->mt_unsafe)\n-\t\trte_service_component_runstate_set(t->tx_service.service_id, 1);\n \treturn pipeline_launch_lcores(test, opt, worker_wrapper);\n }\n \n@@ -326,25 +316,21 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \tint nb_queues;\n \tint nb_stages = opt->nb_stages;\n \tuint8_t queue;\n-\tstruct rte_event_dev_info info;\n-\tstruct test_pipeline *t = evt_test_priv(test);\n-\tuint8_t tx_evqueue_id = 0;\n+\tuint8_t tx_evport_id = 0;\n+\tuint8_t tx_evqueue_id[RTE_MAX_ETHPORTS] = {0};\n \tuint8_t queue_arr[RTE_EVENT_MAX_QUEUES_PER_DEV];\n \tuint8_t nb_worker_queues = 0;\n+\tuint16_t prod = 0;\n+\tstruct rte_event_dev_info info;\n+\tstruct test_pipeline *t = evt_test_priv(test);\n \n \tnb_ports = evt_nr_active_lcores(opt->wlcores);\n \tnb_queues = rte_eth_dev_count_avail() * (nb_stages);\n \n-\t/* Extra port for Tx service. */\n-\tif (t->mt_unsafe) {\n-\t\ttx_evqueue_id = nb_queues;\n-\t\tnb_ports++;\n-\t\tnb_queues++;\n-\t} else\n-\t\tnb_queues += rte_eth_dev_count_avail();\n+\t/* One queue for Tx adapter per port */\n+\tnb_queues += rte_eth_dev_count_avail();\n \n \trte_event_dev_info_get(opt->dev_id, &info);\n-\n \tconst struct rte_event_dev_config config = {\n \t\t\t.nb_event_queues = nb_queues,\n \t\t\t.nb_event_ports = nb_ports,\n@@ -370,24 +356,19 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \tfor (queue = 0; queue < nb_queues; queue++) {\n \t\tuint8_t slot;\n \n-\t\tif (!t->mt_unsafe) {\n-\t\t\tslot = queue % (nb_stages + 1);\n-\t\t\tq_conf.schedule_type = slot == nb_stages ?\n-\t\t\t\tRTE_SCHED_TYPE_ATOMIC :\n-\t\t\t\topt->sched_type_list[slot];\n-\t\t} else {\n-\t\t\tslot = queue % nb_stages;\n-\n-\t\t\tif (queue == tx_evqueue_id) {\n-\t\t\t\tq_conf.schedule_type = RTE_SCHED_TYPE_ATOMIC;\n+\t\tq_conf.event_queue_cfg = 0;\n+\t\tslot = queue % (nb_stages + 1);\n+\t\tif (slot == nb_stages) {\n+\t\t\tq_conf.schedule_type = RTE_SCHED_TYPE_ATOMIC;\n+\t\t\tif (!t->internal_port) {\n \t\t\t\tq_conf.event_queue_cfg =\n \t\t\t\t\tRTE_EVENT_QUEUE_CFG_SINGLE_LINK;\n-\t\t\t} else {\n-\t\t\t\tq_conf.schedule_type =\n-\t\t\t\t\topt->sched_type_list[slot];\n-\t\t\t\tqueue_arr[nb_worker_queues] = queue;\n-\t\t\t\tnb_worker_queues++;\n \t\t\t}\n+\t\t\ttx_evqueue_id[prod++] = queue;\n+\t\t} else {\n+\t\t\tq_conf.schedule_type = opt->sched_type_list[slot];\n+\t\t\tqueue_arr[nb_worker_queues] = queue;\n+\t\t\tnb_worker_queues++;\n \t\t}\n \n \t\tret = rte_event_queue_setup(opt->dev_id, queue, &q_conf);\n@@ -407,19 +388,11 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t\t\t.new_event_threshold = info.max_num_events,\n \t};\n \n-\t/*\n-\t * If tx is multi thread safe then allow workers to do Tx else use Tx\n-\t * service to Tx packets.\n-\t */\n-\tif (t->mt_unsafe) {\n+\tif (!t->internal_port) {\n \t\tret = pipeline_event_port_setup(test, opt, queue_arr,\n \t\t\t\tnb_worker_queues, p_conf);\n \t\tif (ret)\n \t\t\treturn ret;\n-\n-\t\tret = pipeline_event_tx_service_setup(test, opt, tx_evqueue_id,\n-\t\t\t\tnb_ports - 1, p_conf);\n-\n \t} else\n \t\tret = pipeline_event_port_setup(test, opt, NULL, nb_queues,\n \t\t\t\tp_conf);\n@@ -431,7 +404,6 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t *\n \t * eth_dev_count = 2, nb_stages = 2.\n \t *\n-\t * Multi thread safe :\n \t *\tqueues = 6\n \t *\tstride = 3\n \t *\n@@ -439,21 +411,14 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t *\teth0 -> q0 -> q1 -> (q2->tx)\n \t *\teth1 -> q3 -> q4 -> (q5->tx)\n \t *\n-\t *\tq2, q5 configured as ATOMIC\n-\t *\n-\t * Multi thread unsafe :\n-\t *\tqueues = 5\n-\t *\tstride = 2\n+\t *\tq2, q5 configured as ATOMIC | SINGLE_LINK\n \t *\n-\t *\tevent queue pipelines:\n-\t *\teth0 -> q0 -> q1\n-\t *\t\t\t} (q4->tx) Tx service\n-\t *\teth1 -> q2 -> q3\n-\t *\n-\t *\tq4 configured as SINGLE_LINK|ATOMIC\n \t */\n-\tret = pipeline_event_rx_adapter_setup(opt,\n-\t\t\tt->mt_unsafe ? nb_stages : nb_stages + 1, p_conf);\n+\tret = pipeline_event_rx_adapter_setup(opt, nb_stages + 1, p_conf);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = pipeline_event_tx_adapter_setup(opt, p_conf);\n \tif (ret)\n \t\treturn ret;\n \n@@ -467,12 +432,60 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)\n \t\t}\n \t}\n \n+\t/* Connect the tx_evqueue_id to the Tx adapter port */\n+\tif (!t->internal_port) {\n+\t\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\t\tret = rte_event_eth_tx_adapter_event_port_get(prod,\n+\t\t\t\t\t&tx_evport_id);\n+\t\t\tif (ret) {\n+\t\t\t\tevt_err(\"Unable to get Tx adptr[%d] evprt[%d]\",\n+\t\t\t\t\t\tprod, tx_evport_id);\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\n+\t\t\tif (rte_event_port_link(opt->dev_id, tx_evport_id,\n+\t\t\t\t\t\t&tx_evqueue_id[prod],\n+\t\t\t\t\t\tNULL, 1) != 1) {\n+\t\t\t\tevt_err(\"Unable to link Tx adptr[%d] evprt[%d]\",\n+\t\t\t\t\t\tprod, tx_evport_id);\n+\t\t\t\treturn ret;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\tret = rte_eth_dev_start(prod);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"Ethernet dev [%d] failed to start.\"\n+\t\t\t\t\t\" Using synthetic producer\", prod);\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t}\n+\n \tret = rte_event_dev_start(opt->dev_id);\n \tif (ret) {\n \t\tevt_err(\"failed to start eventdev %d\", opt->dev_id);\n \t\treturn ret;\n \t}\n \n+\tRTE_ETH_FOREACH_DEV(prod) {\n+\t\tret = rte_event_eth_rx_adapter_start(prod);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"Rx adapter[%d] start failed\", prod);\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t\tret = rte_event_eth_tx_adapter_start(prod);\n+\t\tif (ret) {\n+\t\t\tevt_err(\"Tx adapter[%d] start failed\", prod);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\tmemcpy(t->tx_evqueue_id, tx_evqueue_id, sizeof(uint8_t) *\n+\t\t\tRTE_MAX_ETHPORTS);\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v3",
        "3/4"
    ]
}