From patchwork Mon May 6 09:49:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Alnubani X-Patchwork-Id: 53292 X-Patchwork-Delegate: thomas@monjalon.net 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 790C0325F; Mon, 6 May 2019 11:49:14 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130070.outbound.protection.outlook.com [40.107.13.70]) by dpdk.org (Postfix) with ESMTP id B6886A49; Mon, 6 May 2019 11:49:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NLzAFl8VPvGH8KRgd3bCzmPA0SzWdazoWkXGeJFzZ+g=; b=gNxcRsGvDeKFtSqHXM+tuu8XAcbcsA00lsuOAka9+fgBMoZeTN1sQJcZtWUAGirU6airMLT9S5mDTJGOJnDbTYsoirlryjOCt0IipkW2Eo+03AwJ3y02pjkO2ucMq9cEuFzjvzpehE/UnzyMmfe3S0WlsjEk5ZWbWzkt44Dhp8k= Received: from DB6PR0501MB2167.eurprd05.prod.outlook.com (10.168.58.144) by DB6PR0501MB2328.eurprd05.prod.outlook.com (10.168.56.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.15; Mon, 6 May 2019 09:49:10 +0000 Received: from DB6PR0501MB2167.eurprd05.prod.outlook.com ([fe80::d827:c945:ca7e:a04b]) by DB6PR0501MB2167.eurprd05.prod.outlook.com ([fe80::d827:c945:ca7e:a04b%2]) with mapi id 15.20.1856.012; Mon, 6 May 2019 09:49:10 +0000 From: Ali Alnubani To: "konstantin.ananyev@intel.com" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] examples/ip_fragmentation: fix Tx queues init Thread-Index: AQHVA/D0CEUoQxme/EqnYsSWSJM1tw== Date: Mon, 6 May 2019 09:49:10 +0000 Message-ID: <20190506094857.14248-1-alialnu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.19.2 x-clientproxiedby: LO2P265CA0263.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::35) To DB6PR0501MB2167.eurprd05.prod.outlook.com (2603:10a6:4:51::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=alialnu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 422f5c73-09c8-4af8-0675-08d6d20816ba x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:DB6PR0501MB2328; x-ms-traffictypediagnostic: DB6PR0501MB2328: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1148; x-forefront-prvs: 0029F17A3F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39860400002)(396003)(376002)(136003)(189003)(199004)(86362001)(478600001)(53936002)(66066001)(4326008)(256004)(66556008)(66946007)(14454004)(66446008)(2501003)(6512007)(2351001)(64756008)(36756003)(71200400001)(71190400001)(73956011)(66476007)(186003)(25786009)(2616005)(476003)(6436002)(99286004)(26005)(7736002)(6486002)(1076003)(305945005)(52116002)(54906003)(316002)(5640700003)(6916009)(6506007)(386003)(68736007)(8936002)(50226002)(102836004)(2906002)(5660300002)(486006)(8676002)(81156014)(6116002)(3846002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2328; H:DB6PR0501MB2167.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: vdCdm5GJL1vVeuCkb7t/SRy15Q7Ni7LNa7VHDEfP9KLuq9VY8kGdb5tl1oQljk/s8b2XeBLLLfMf+bLXT2Rlyo3TZ7Mqp2jxdeYaEDaDok+chp9LxARrRo0FiNt5o+uC32ymoS8anxvr4MQaICg3buSaAJLG/wxojx8s3dbARSRhLReDKf0qhDen6fChR18f88n/YVHIWg2vb9YcvcY/6TbfNQcGZGm8KV3ypfbKw/RNzPOXkEDbKKBoEwu5O0L8wf3w1YVyZn6NwzfW8N8bvHVAbxRbMu8WuHijGa+OzjZLq6Bgqi1BwHQ514oh0z7D/e/YFPDQFYFKBiRzY0obreIqILv2B9z8rXVTY4zh7zEvvcaQ3V4ftjnTzgEgrKH46MOdbnbVaeH8xy9BrJ+bYzEIwvj/HXfNinjsnbBmQg0= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 422f5c73-09c8-4af8-0675-08d6d20816ba X-MS-Exchange-CrossTenant-originalarrivaltime: 06 May 2019 09:49:10.6368 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2328 Subject: [dpdk-dev] [PATCH] examples/ip_fragmentation: fix Tx queues init 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" The application tries to configure queue ids larger than the maximum allowed by MAX_TX_QUEUE_PER_PORT. This causes the startup error: " ... Initializing port 0 on lcore 0... Address:7C:FE:90:12:23:0D txq=0,0 txq=1,1 txq=2,2 txq=3,3 txq=4,4 txq=5,5 txq=6,6 txq=7,7 txq=8,8 txq=9,9 txq=10,10 txq=11,11 txq=12,12 txq=13,13 txq=14,14 txq=15,15 txq=16,16 Invalid TX queue_id=16 EAL: Error - exiting with code: 1 Cause: rte_eth_tx_queue_setup: err=-22, port=0 " The error reproduces when lcores aren't set, and when the machine has more than 16 cores. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Ali Alnubani --- examples/ip_fragmentation/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index e90a61e35..953115aba 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -984,6 +984,9 @@ main(int argc, char **argv) if (rte_lcore_is_enabled(lcore_id) == 0) continue; + if (queueid >= rte_eth_devices[portid].data->nb_tx_queues) + break; + socket = (int) rte_lcore_to_socket_id(lcore_id); printf("txq=%u,%d ", lcore_id, queueid); fflush(stdout);