From patchwork Fri Mar 1 07:16:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 50693 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E2882BB5; Fri, 1 Mar 2019 08:16:51 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id BB3BEA3 for ; Fri, 1 Mar 2019 08:16:49 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x217AOra001113; Thu, 28 Feb 2019 23:16:48 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=7jwEsDH8X8QiJ5Tlv76lbgr/41ffFOn47o0u9R2J0MI=; b=awqQIKXUFgora8fJDeNWK8IZm35GPxiC/RLuzjlheYoPmRMdgDzNHspdo1hVmyvtIesc ffmGb9a0vCHuKZA4KyYrY4jFLron4r4xgiv/knvdRpu0BlIiYQVz1Y1CiX7ThErOH7Ji 8tJMERkvb4njAshEpdzrw7dnv1VjVsCodirLdQRrUnG48X28x6vwL+w6Vui/c6X+CHmh FC6DLQjAqtqqe2oqDuK3V2HKof8lujhGytEN/7Q2d3dY8WZtjEy/p5ikz7ZuXR7y7Ngr HqFRer955cF0YWE8ywH8NO9LVgQ3QXMxZ1Ci28nr9j9D8ZBOikm9M7SDFRBvQhOPxWjg vQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2qxprq179d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Feb 2019 23:16:48 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Feb 2019 23:16:47 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.56) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 28 Feb 2019 23:16:47 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7jwEsDH8X8QiJ5Tlv76lbgr/41ffFOn47o0u9R2J0MI=; b=IBd+qnLDLTrhj5QKRfhsJUm1a6r3+lCPK1DoVoiuhgfABG7n5B2cBHA8iUvQeq63agpxgjSv4Iu1Dy33ikHHOAFIgQwCFX9/yJ1HdTD1+kt+HxPanDe6+N6BEre13Ne1usiK4cOPGgvtbe1+WS4eA4mqLsrycf/eIkQr+K8wYiM= Received: from BN6PR1801MB1859.namprd18.prod.outlook.com (10.161.154.35) by BN6PR1801MB1843.namprd18.prod.outlook.com (10.161.154.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.16; Fri, 1 Mar 2019 07:16:43 +0000 Received: from BN6PR1801MB1859.namprd18.prod.outlook.com ([10.161.154.35]) by BN6PR1801MB1859.namprd18.prod.outlook.com ([10.161.154.35]) with mapi id 15.20.1665.015; Fri, 1 Mar 2019 07:16:43 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran , "harry.van.haaren@intel.com" CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Thread-Topic: [dpdk-dev] [PATCH 1/3] examples/eventdev_pipeline: configure max events based on dev info Thread-Index: AQHUz/64gF4Nxk4FB0mg1R/I6FRmvQ== Date: Fri, 1 Mar 2019 07:16:42 +0000 Message-ID: <20190301071617.6570-1-pbhagavatula@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MAXPR0101CA0005.INDPRD01.PROD.OUTLOOK.COM (10.174.62.15) To BN6PR1801MB1859.namprd18.prod.outlook.com (10.161.154.35) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-originating-ip: [223.226.78.85] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 88d76851-c2d8-4bf6-25c6-08d69e15db19 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:BN6PR1801MB1843; x-ms-traffictypediagnostic: BN6PR1801MB1843: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; BN6PR1801MB1843; 23:4jcK9DCTmawQ3Wum8FE17JD3FEET901kaN1hl?= =?iso-8859-1?q?e8ldOgPI2K8u3YAGpA5kDt7YR?= =?iso-8859-1?q?OEJjfWQA4Cra1stTg1sZ5p54HMubQVyMUqzqbND8Wh+vgwQI8C8?= =?iso-8859-1?q?6EmH7JFZniltJpeN2UmP+LmxusNOBXtom3MgdGD/X/MofwyUneQ?= =?iso-8859-1?q?LPk6kCuqNfpS6MZZ/iWvQHrQ8LL7Zux8nGQ8HPz5m9yPEiXmmJ4?= =?iso-8859-1?q?CfMMXosSfxqHPxpB20X8ytv3IjMHWr8JcOy5xMC2rutHdA62Vd7?= =?iso-8859-1?q?6AdVJRkuILEEIgsPzmvEc88EwrpUU99H1VuJdUnbxkT61PC0Q0I?= =?iso-8859-1?q?MSGCYVbHwCYp86DOTxmAye1oOYW7R5zQtO/m3EV5KayPJF14Olz?= =?iso-8859-1?q?Hay5pOHv5vCB+w4tTC/S3IOywxeqCiP+EXQnM/0G46amlXVC+Du?= =?iso-8859-1?q?ikXgz7gR+SayvsiNLlxshqsaoiUyWslvXB5DcUe5rAdA85ctjRy?= =?iso-8859-1?q?njZyBgdTIgVc2dKnSSLJFVLTzq+AechNUA4QXEnzNYkZwprbiT+?= =?iso-8859-1?q?4GjGbEAA9AlyZR7qqoldZtpl9KE8z4GhIBxBscHn6NoM5IdnfWY?= =?iso-8859-1?q?Fbs6TBiCXAAOwq0b9w54TMpoPzRsL6n5cXptFteLRB380qaNDaq?= =?iso-8859-1?q?hctR4kVCCzuSaII5tLA2FFmKHXzZjMr0t/brr5qFcqwI4s6maCs?= =?iso-8859-1?q?NGvhu0qlHpJiBq/AdSv+OuRxbBExqT1DH9O7X1CovMqN9LMldwN?= =?iso-8859-1?q?jREs3hVuoKvVvy51IYgLuAHjL8mei8IBUyj3mC2ddpxUwcNk3ac?= =?iso-8859-1?q?0nXm35+asR6ttInWnkHS6IMZz+pJvdpTj5hoQ9l24o3B3NhLM1V?= =?iso-8859-1?q?A7EEButJWIZs/Lp6okCeHU0Vm6bIO6uvwBDcaXJjzIYSI0SsRy+?= =?iso-8859-1?q?w53+2YS/lQMHTf6cGkd5Q0kFasz2WTF8OoKggFyCJq6iFdz7tT0?= =?iso-8859-1?q?2UFvNrE4Xuo6kQ6o0zu9pBCh5LW+hpEm0HHhiyxIzHNx6jwkqAR?= =?iso-8859-1?q?iOsbf6JMQdHDZniMA1IrP44edf2xuEWKhB1CA4dGV7hYjn8dsfk?= =?iso-8859-1?q?giokP0dw0iY+D20qyWzNj+KZRH3RAVgTr/W8ftYRsMPFH+qjHki?= =?iso-8859-1?q?lwNcLLaImoEuvvslCcWYcUOGRcftr4QDiraGRG9RH3mQCvatMMg?= =?iso-8859-1?q?Ac7MsKca8SW5AjUUa7RbPTwg+2DUOluqLa+0XXSX1lOHsI1roc4?= =?iso-8859-1?q?JFo2ZkFtW1ZJi1AVaM4NLNRB55D/y9dixmD/BaJZbrvrcvoFFzE?= =?iso-8859-1?q?zUdrOGIjN5fT8OAY+yJyWaRs=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09634B1196 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(366004)(396003)(376002)(189003)(199004)(105586002)(316002)(110136005)(6436002)(106356001)(86362001)(4326008)(6486002)(66066001)(36756003)(8936002)(97736004)(54906003)(6506007)(99286004)(6512007)(476003)(8676002)(81156014)(53936002)(386003)(71200400001)(2616005)(71190400001)(305945005)(1076003)(81166006)(52116002)(7736002)(77096007)(6116002)(486006)(14444005)(55236004)(107886003)(186003)(14454004)(2906002)(50226002)(26005)(102836004)(68736007)(478600001)(25786009)(256004)(2501003)(5660300002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1801MB1843; H:BN6PR1801MB1859.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ZAP37DmCMXE8nlQ3+ka15plfwkxyHlnnJnB65WkbHo3krnJBFeQezMPnwm9kLBEW0m06y4/ByVBEdydZOHuYv1U8uugJvlW5NrTzgzemHBJszFRVOIMVG50RD55I86V5f/jNmBwGjIXNSDaO2YFB07Q/5hBWJcJCKsQ5A+2jJPL/IX2GMYzheY3xOfJ4eYWCGNq8CP66Ak3bfdd0hG2J4kIn02fSpUgZwVFSYp5XHXJYhx/kmiS1sn3jFFbJX0ZgHGZ2HixqzfNTf9rMVr92XFvBm1NhuuZywN0C2U90RugZ2Dq6KWHY1d9abvxiJC09unkB7DT3oH57d18gom8/F0ijqRVGso0r8d3ik0CQbFlffaKyqsGMHfg0SKoMTWRnCqUopXB0jF3h+Ws1d980CVSzYh20SQJz/zVJT6npXU0= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 88d76851-c2d8-4bf6-25c6-08d69e15db19 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2019 07:16:42.9305 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1801MB1843 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-01_06:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903010050 Subject: [dpdk-dev] [PATCH 1/3] examples/eventdev_pipeline: configure max events based on dev info 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Some eventdevs support configuring max events to be -1 (open system). Check eventdev and event port configuration with eventdev info before configuring them. Signed-off-by: Pavan Nikhilesh Acked-by: Harry van Haaren --- examples/eventdev_pipeline/pipeline_worker_generic.c | 6 ++++++ examples/eventdev_pipeline/pipeline_worker_tx.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c index 169064949..766c8e958 100644 --- a/examples/eventdev_pipeline/pipeline_worker_generic.c +++ b/examples/eventdev_pipeline/pipeline_worker_generic.c @@ -169,6 +169,8 @@ setup_eventdev_generic(struct worker_data *worker_data) wkr_p_conf.disable_implicit_release = disable_implicit_release; + if (dev_info.max_num_events < config.nb_events_limit) + config.nb_events_limit = dev_info.max_num_events; if (dev_info.max_event_port_dequeue_depth < config.nb_event_port_dequeue_depth) config.nb_event_port_dequeue_depth = @@ -227,6 +229,8 @@ setup_eventdev_generic(struct worker_data *worker_data) } cdata.tx_queue_id = i; + if (wkr_p_conf.new_event_threshold > config.nb_events_limit) + wkr_p_conf.new_event_threshold = config.nb_events_limit; if (wkr_p_conf.dequeue_depth > config.nb_event_port_dequeue_depth) wkr_p_conf.dequeue_depth = config.nb_event_port_dequeue_depth; if (wkr_p_conf.enqueue_depth > config.nb_event_port_enqueue_depth) @@ -284,6 +288,8 @@ init_adapters(uint16_t nb_ports) .new_event_threshold = 4096, }; + if (adptr_p_conf.new_event_threshold > dev_info.max_num_events) + adptr_p_conf.new_event_threshold = dev_info.max_num_events; if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth) adptr_p_conf.dequeue_depth = dev_info.max_event_port_dequeue_depth; diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c index 85eb075fc..8961cd656 100644 --- a/examples/eventdev_pipeline/pipeline_worker_tx.c +++ b/examples/eventdev_pipeline/pipeline_worker_tx.c @@ -465,6 +465,8 @@ setup_eventdev_worker_tx_enq(struct worker_data *worker_data) ret = rte_event_dev_info_get(dev_id, &dev_info); printf("\tEventdev %d: %s\n", dev_id, dev_info.driver_name); + if (dev_info.max_num_events < config.nb_events_limit) + config.nb_events_limit = dev_info.max_num_events; if (dev_info.max_event_port_dequeue_depth < config.nb_event_port_dequeue_depth) config.nb_event_port_dequeue_depth = @@ -528,6 +530,8 @@ setup_eventdev_worker_tx_enq(struct worker_data *worker_data) } printf("\n"); + if (wkr_p_conf.new_event_threshold > config.nb_events_limit) + wkr_p_conf.new_event_threshold = config.nb_events_limit; if (wkr_p_conf.dequeue_depth > config.nb_event_port_dequeue_depth) wkr_p_conf.dequeue_depth = config.nb_event_port_dequeue_depth; if (wkr_p_conf.enqueue_depth > config.nb_event_port_enqueue_depth) @@ -617,6 +621,8 @@ init_adapters(uint16_t nb_ports) .new_event_threshold = 4096, }; + if (adptr_p_conf.new_event_threshold > dev_info.max_num_events) + adptr_p_conf.new_event_threshold = dev_info.max_num_events; if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth) adptr_p_conf.dequeue_depth = dev_info.max_event_port_dequeue_depth;