From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0042.outbound.protection.outlook.com [104.47.42.42]) by dpdk.org (Postfix) with ESMTP id C38371D03B for ; Fri, 8 Jun 2018 19:25:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mQ7kfX07O+BHShBwE3Eh4beH7NC5VtgKZMIDRyiXE/8=; b=MwDljYepr9NBXi4M/GxpFBAYzDtCc4dinParm1ufxddJD22q9Ti4n0ckowmXsiaYJ50hTmQ8LP2RJSB3dd7o8/Mf/pK63sJLjL79bkYERZ3r97MQlvxjswXOzQT+tO5tjdumMtHSg+aaScAWdRcAZG/ENQG3AJc7koDSvwfyuxE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.caveonetworks.com (115.113.156.2) by DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.17; Fri, 8 Jun 2018 17:25:27 +0000 From: Anoob Joseph To: Bruce Richardson , Jerin Jacob , Pablo de Lara Cc: Anoob Joseph , Hemant Agrawal , Narayana Prasad , Nikhil Rao , Pavan Nikhilesh , Sunil Kumar Kori , dev@dpdk.org Date: Fri, 8 Jun 2018 22:54:08 +0530 Message-Id: <1528478659-15859-10-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BM1PR0101CA0050.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::12) To DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4906; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 3:8MF7Dg7iM/tHF4PceRSFzvmQWJVOsG+PvvbB3O/gpECLMxEGsj64kZAggFyorRW0J2z9ABRndNIHSK11buoJoQYh78wzhZWAasjWmSlXHv0XOI8TwcpvsLaryn+bOr/BteQo5Klm1rtn0XL/ulgKFX6V0s5OxiWhI9q19uqDvycHjknHUYx3YY5QzV1ReAqtb3n5IRE5m8GqrpaCUPYaM63niqZzlaV2fZtJOvznLlSqfO42bjSnOvJmCEzdPA8W; 25:gDqNXtwXbtrReU8iTeyUnMQAboAJJJhvWJXR6i9SLBYJHLMgsC8gVz56QgunkWBcMNZ5mR6rH9NVNk/C9yndmZsgNql3kE9vQXKMywBPN/HKUeOyX07Ai41d+XK2il+mZpjaz1B6C/lXkeeI8CfRHbplPuL58s2zaD/e8qX/F3BcShNVq5BQKAhWWDLgzT08SMnZQ0nPdzb7lN2vl+emNpnq2aP+yO5+ztke9mlJDhVJAJvoIqd7IK2K2eLD736Yxk4E6ZI5fQULifE6ey7eFJnawN9qWGbaksa/EFF/MpL82gqMjirW67xWwqlN2Q0lpKFZj8mOnIXKlRRzTkqwcw==; 31:tvHO4UJLD7M63K3JuZd/JliMLHhX75aFQ137ZBpGeuFNIIfg30H8u2Yyw8d9WnPN1I7E5GVdvohnwtARzNntT/pvQ7ZNMrkCDYF7rRXfGICykWxm+NzqaG0NeyL62huW+idS3fRsZhoNJVjPvgZHHBJO0hpJUfprrlsOxArGmvCQehvZNmvYUzt793JkoN3a0cA0Ahz6v9Cm8Z673GH07a8102M7r3L+2ht6KhJMynA= X-MS-TrafficTypeDiagnostic: DM6PR07MB4906: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 20:Lk4UA0rMK+dDXsIj/FS7oGBJgMdMWqNBGOtZwJuz0tgkgmz+FN3ZPpNOF1kljy0FLrvJZGyGrXrCI9uI/eyd4SEJdoCVAF3FjFEcu2Ab9LlIH+RwAzkdy9YD4TcuW74vxg2CQsoQdshx4nFzAN3DhNjmhVYSPknPosKuO/jbUTIZpoofJnL/DDOC4xBFqjdqylqEaGuzYKtBXjzNwIueNyxSE1tfbf1Tew1Sl5vxxvI4zwC6bZLZQMCXHkFdqXY4qGoY6SQtTy0cyKbI92KAkGOPvjU4J4IA94jf/+4noq9ptrJriCFgWNhhRQnOeTSQXJt5Rp9PrcRogIuXubbpP7Ut/48XD46eYvhlr9cEbSkipfDm0blvHdnowEmjSkAvY7korpABEoY0VXq/CbXIY38eFvURC3HCpdeMY9pQUV3pTyvDRAAUeWdA+4YXyINT6jqvPi2MjvqRs77XV4ZxjfxYlw7BlxBLuAuionF+BQJPzu1HF3DL03KsuBBtBbttG4apKs/oPKPoSgwtJF5iq80UDfWGkdbqTS0kRIftmA70FLNtzuBrkCzO+y2CoOBCntg12WorH3BkS1wEXtZDE3UIk1sLRQxxonHKL6iM5tM=; 4:db4CZHRmSSdkelUOZsQ/8DJf7hTcQ6ztbt8T4sAKdxjr+ptRKudor2x3GnMlSLy69Kxq9AQqQenHY7cWKZVEsLV39FIj1YoHC+N0W9Y0XYNlB3Lugg2CLsp5/JBDCUqnndtUSJCmKKQqNxNI77+Bv1TyviE5JlMh+O5kUezsKy26IMO9qCbVnaLza9J0aNRHkk8jh3EkIhctlM9QQT4CIzAxpiw7NlqTBD63Cu9x8psQa2M9z27IQ9mPYdxRlwc3UysMHFMm0DeN91cqv87LsQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231254)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4906; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4906; X-Forefront-PRVS: 06973FFAD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(39380400002)(189003)(199004)(186003)(16526019)(5660300001)(26005)(42882007)(55236004)(66066001)(47776003)(68736007)(6666003)(305945005)(2906002)(8676002)(7736002)(8936002)(36756003)(52116002)(2616005)(956004)(476003)(446003)(50226002)(81166006)(11346002)(44832011)(6506007)(386003)(486006)(59450400001)(76176011)(51416003)(48376002)(50466002)(97736004)(316002)(6512007)(25786009)(53936002)(6486002)(81156014)(4326008)(3846002)(6116002)(16586007)(54906003)(110136005)(105586002)(106356001)(72206003)(478600001)(8656006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4906; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4906; 23:iwDlvRoUtCozPlU8WRk5Q3Mpm9liXfhAyLgMmcGZn?= =?us-ascii?Q?oycHmNjwGSI9RmO1t7NvgK42u/KvY5lQ10z5m+EkoBP9A1znF3IBMyCsBiXZ?= =?us-ascii?Q?Y0EkbzMdRvp/+bF/4O+ki3qqDF/t3WoXG5BbnehpVnpS3KnhSy/YSxrrj0gy?= =?us-ascii?Q?F49gVSpXRr1rIgccRuDgnyybxAyO0SqCfq83cOB89KTM2dLZ2xj+hHK9Lx1q?= =?us-ascii?Q?pBJ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x1TYk0ZCvOXzmi4R7xMSrZzOBn7Ie5ykcXUUEpBQe6ME8T5/uzqt4Z366n0tTf4qJ8hvC7uwh58r47eegfSiyb5vqRUyRNzqEQZ88xKVStk=; 24:IKLlzLgpl8TJcREwunnC0mxBssJKUi2cdUMJPVDNCYOe899i2lrFOmCsF4yK9v2Tfi6yk+wKMzQYDvNbNKDWxz8/ZX9va3kL9XS+b44mUTE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 7:1tIWTBkiCWRQhM3egkFkVNSn6aBYU0ZcyvvIOXv46Kpwx0+fnbEnd9rqTcrgNYVvR8BD1glrqpaaaOnbCMXA9Qhwx/pogsQLHyWgabfOeYyHAkp8nJdkGi+RHXRZL8V8AFsAmKzieS1QoU98U35RwSWjO5WBs8mz0k8I90FkcH6nrr3+i56/q0nC1HHuMrDk5g5JJJ4wpb346jh1IGbw0TcdP4XGqbmmcaCLBev2bCVJKhURvyGXKPyg/rtLwFti X-MS-Office365-Filtering-Correlation-Id: 583c76ea-04f3-42b2-fd3f-08d5cd64d57a X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 17:25:27.3417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 583c76ea-04f3-42b2-fd3f-08d5cd64d57a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4906 Subject: [dpdk-dev] [PATCH 09/20] eventdev: add option to specify schedule mode for app stage X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 17:25:32 -0000 Scheduling mode for each event queue is dependent on the same of app stage. Configure event queue taking this also into account. Signed-off-by: Anoob Joseph --- lib/librte_eventdev/rte_eventmode_helper.c | 23 ++++++++++++++++++++-- .../rte_eventmode_helper_internal.h | 10 ++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c index b3469f9..1c4d88d 100644 --- a/lib/librte_eventdev/rte_eventmode_helper.c +++ b/lib/librte_eventdev/rte_eventmode_helper.c @@ -103,6 +103,8 @@ em_parse_transfer_mode(struct rte_eventmode_helper_conf *conf, static void em_initialize_helper_conf(struct rte_eventmode_helper_conf *conf) { + struct eventmode_conf *em_conf = NULL; + /* Set default conf */ /* Packet transfer mode: poll */ @@ -110,6 +112,12 @@ em_initialize_helper_conf(struct rte_eventmode_helper_conf *conf) /* Keep all ethernet ports enabled by default */ conf->eth_portmask = -1; + + /* Get eventmode conf */ + em_conf = (struct eventmode_conf *)(conf->mode_params); + + /* Stage 1 schedule type: atomic */ + em_conf->ext_params.s1_sched_type = RTE_SCHED_TYPE_ATOMIC; } struct rte_eventmode_helper_conf * @@ -249,8 +257,19 @@ rte_eventmode_helper_initialize_eventdev(struct eventmode_conf *em_conf) eventq_conf.event_queue_cfg = eventdev_config->ev_queue_mode; - /* Set schedule type as ATOMIC */ - eventq_conf.schedule_type = RTE_SCHED_TYPE_ATOMIC; + /* + * All queues need to be set with sched_type as + * schedule type for the application stage. One queue + * would be reserved for the final eth tx stage. This + * will be an atomic queue. + */ + if (j == nb_eventqueue-1) { + eventq_conf.schedule_type = + RTE_SCHED_TYPE_ATOMIC; + } else { + eventq_conf.schedule_type = + em_conf->ext_params.s1_sched_type; + } /* Set max atomic flows to 1024 */ eventq_conf.nb_atomic_flows = 1024; diff --git a/lib/librte_eventdev/rte_eventmode_helper_internal.h b/lib/librte_eventdev/rte_eventmode_helper_internal.h index 36e2a5f..e9c1b4f 100644 --- a/lib/librte_eventdev/rte_eventmode_helper_internal.h +++ b/lib/librte_eventdev/rte_eventmode_helper_internal.h @@ -56,6 +56,16 @@ struct eventmode_conf { struct rte_eventmode_helper_event_link_info link[EVENT_MODE_MAX_LCORE_LINKS]; /**< Per link conf */ + union { + struct { + uint64_t s1_sched_type : 2; + /**< Stage 1 schedule type */ + uint64_t s2_sched_type : 2; + /**< Stage 2 schedule type */ + }; + uint64_t u64; + } ext_params; + /**< 64 bit field to specify extended params */ }; #endif /* _RTE_EVENTMODE_HELPER_INTERNAL_H_ */ -- 2.7.4