From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 59F79A05D3 for ; Wed, 24 Apr 2019 01:45:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C0EDB1B486; Wed, 24 Apr 2019 01:45:57 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150045.outbound.protection.outlook.com [40.107.15.45]) by dpdk.org (Postfix) with ESMTP id 868321B434 for ; Wed, 24 Apr 2019 01:45:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jblp7KX9js7p2rmVl/gjxS26tviwhVJNQtBjlQlbuYo=; b=sIrg2ORtuByOTTCjetSk5pqq5XtGV3fuSqHdxRyBOY9XuRIg4FJACu0+bZ5laQX1trxqPDnfJ9etAfBdW1Y15OUsbhqVNypXwksiIeZmtBuSHMaWYz8x10vSOWWVOVt+0iXaTjPNYV6aEKiAN6dsmjWcvOgmJ2NRuhd87wU7e3Q= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4057.eurprd05.prod.outlook.com (52.134.67.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Tue, 23 Apr 2019 23:45:55 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::e8d5:4aff:902d:6e98]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::e8d5:4aff:902d:6e98%5]) with mapi id 15.20.1835.010; Tue, 23 Apr 2019 23:45:55 +0000 From: Yongseok Koh To: Arvind Narayanan CC: users Thread-Topic: [dpdk-users] Issue with mlx5_rxtx.c while calling rte_eth_tx_burst() in DPDK 18.11 Thread-Index: AQHU+MhCR1GiO7wf4EqIbgOE7RgN2KZKa9AA Date: Tue, 23 Apr 2019 23:45:55 +0000 Message-ID: <1B492CED-5816-4A43-B7DD-4EFA4F58631D@mellanox.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0162d7b0-d47d-40ac-4aca-08d6c845d427 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:DB3PR0502MB4057; x-ms-traffictypediagnostic: DB3PR0502MB4057: x-microsoft-antispam-prvs: x-forefront-prvs: 0016DEFF96 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(136003)(396003)(366004)(199004)(189003)(316002)(4326008)(476003)(305945005)(7736002)(486006)(5660300002)(2616005)(102836004)(53936002)(33656002)(256004)(2906002)(76176011)(53546011)(6506007)(6116002)(36756003)(3846002)(82746002)(91956017)(76116006)(73956011)(14454004)(66476007)(64756008)(66946007)(11346002)(478600001)(26005)(446003)(86362001)(99286004)(1411001)(97736004)(186003)(6246003)(6916009)(66066001)(6486002)(229853002)(71200400001)(71190400001)(81156014)(81166006)(66446008)(8936002)(83716004)(6512007)(6436002)(25786009)(68736007)(66556008); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4057; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: CneLUnXV5R8WfeSc4kdLD5j+G8QmaGHpt5wT4GYD1e2Qe/k02ycw181I7CyNDMScUs0PgqU8BSpDYNQB0MXTLy5Hm0kX/V3NZQQBjJhqte6gSZI15dOWHMn5kA70PnJ4s50L63HnQ+5oJPXuSBETv+6JqxvNDxEQ1+FRVLTKUP9O/Rz/HEyV7opcwt1qKH6xa9aSP8OVQa9J7gwYW8qz/pMdZG/51YLeG+8HjoukeiMiP+E70o/Ft4+gFBEOvebxFNWyRzLvVJ8UNvRa3n4z3cTRx4HH/b/hzOrZ5ayAaEpYyuQxgYRrx3+RpkIY1gXaQzlOA3JTfSf+azf0kctUHRNVUw26oKGPLaGWXTb8tULrUj5l5au3vipyQLHESlbpsO4H9vKL+FL+W/oVn9WRsNb1gJ9X01a2fR6HrdlnhBs= Content-Type: text/plain; charset="us-ascii" Content-ID: <40D8ACD2BCC4964FA1ECB8CB367A2545@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0162d7b0-d47d-40ac-4aca-08d6c845d427 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2019 23:45:55.4835 (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: DB3PR0502MB4057 Subject: Re: [dpdk-users] Issue with mlx5_rxtx.c while calling rte_eth_tx_burst() in DPDK 18.11 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" > On Apr 21, 2019, at 9:59 PM, Arvind Narayanan wro= te: >=20 > I am running into a weird problem when using rte_eth_tx_burst() using mlx= 5 > in dpdk 18.11, running on Ubuntu 18.04 LTS (using Mellanox Connect X5 100= G > EN). >=20 > Here is a simplified snippet. >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > #define MAX_BATCHES 64 > #define MAX_BURST_SIZE 64 >=20 > struct batch { > struct rte_mbuf *mbufs[MAX_BURST_SIZE]; // array of packets > int num_mbufs; // num of mbufs > int queue; // outgoing tx_queue > int port; // outgoing port > } >=20 > struct batch * batches[MAX_BATCHES]; >=20 > /* dequeue a number of batches */ > int batch_count =3D rte_ring_sc_dequeue_bulk(some_rte_ring, (void **) > &(batches), MAX_BATCHES, NULL); >=20 > /* transmit out all pkts from every batch */ > if (likely(batch_count > 0)) { > for (i =3D 0; i < batch_count; i++) { > ret =3D rte_eth_tx_burst(batches[i]->port, batches[i]->queue, (str= uct > rte_mbuf **) batches[i]->mbufs, > batches[i]->num_mbufs); > } > } >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > At rte_eth_tx_burst(), I keep getting an error saying: > myapp: /home/arvind/dpdk/drivers/net/mlx5/mlx5_rxtx.c:1652: uint16_t > txq_burst_empw(struct mlx5_txq_data *, struct rte_mbuf **, uint16_t): > Assertion `length =3D=3D DATA_LEN(buf)' failed. > OR > myapp: /home/arvind/dpdk/drivers/net/mlx5/mlx5_rxtx.c:1609: uint16_t > txq_burst_empw(struct mlx5_txq_data *, struct rte_mbuf **, uint16_t): > Assertion `length =3D=3D DATA_LEN(buf)' failed. >=20 > I have debugged and ensured all the mbuf counts (at least in my code) are > good. All the memory references to the mbufs also look good. However, I a= m > not sure why Mellanox driver would complain. >=20 > I have also tried to play with mlx5_rxtx.c by changing above lines to > something like > assert(length =3D=3D pkts_n); // pkts_n is an argument passed to the func= . > Didn't help. >=20 > Any thoughts? Hi, Does your mbuf pass rte_mbuf_check()? That complaint is regarding mismatch between m->pkt_len and m->data_len. If the mbuf is single segment packet (m->nb_segs =3D=3D 1, m->next =3D=3D N= ULL), m->pkt_len should be same as m->data_len. That assert() ins't strictly needed in the txq_burst_empw() though. Thanks, Yongseok=