From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12C9CA0093; Sun, 17 May 2020 14:03:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F143F1D621; Sun, 17 May 2020 14:03:01 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140045.outbound.protection.outlook.com [40.107.14.45]) by dpdk.org (Postfix) with ESMTP id C1EF91D5CD; Sun, 17 May 2020 14:03:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kvly8ikMxOy2vj1GbEC/wnIGWbQKZlaDfbk/gQHym/of7LO4DNY/t2uv65NoTH6zaGXTtsltt+ukRtplBvgyrXIiA+aJy7wv0oiUNaRc62l5ueEtU4wGwA8wGhQFXIgLe9Go+JWDLASVPhqaYjn2+t1WSrDFryNXBGajVsTbVMpXsZLV/oXEolSfKpWhGyECd6g1UQlj7/rAWizww/YNLycqloPSS89TcbTp4hHBbQ4mfGa7i3dX63NemMAakSCGs0mtRreTtqsqacicC7HS82n4Ig7Vkehqd2AGcWkeO7dVn9l+suU7D3tysib30jQHx2XL0SVii0Vm9DPw/jW6iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S1f0WJBBaWJcx4uMlN8cECpc3AfXUI5Y41irgT7eERg=; b=PCXH0oHV/oWJp8tSkj66/oqDrIC13dBBqBIA+kMax/9il8BFN0OYX0aTM+mUE80mi2IHvVioCP7ZiXbjFINAD62PDXqUORyZROBVsnMBi6qTVTyuggpRQCIhrXavvUnSGs9V6vHi2McdaeUGX0Slw4oRHiO2F6UO2TZH4MwOjT95LfZ2ryflv1zlQtv0nYOq87pUrobp24I9tI6R4kgQroeQau2BAwSX3ZLiW7v+QdflUnlb3Egy3Xkm8PtBxrUoqVo/oqAwn7PcWzBgvPjT8syGqRxSgDVrIzNVQ3Cwb5rOLEdjoucXn0jse0RkMEJ+iwQ7HzVPWern0Lnr9+osKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=S1f0WJBBaWJcx4uMlN8cECpc3AfXUI5Y41irgT7eERg=; b=MTX0jgla/nO2eLEkCeyx4j39+tSIMBAoaR8yVGICp9juiCHzPw6Wn5xNZpusXFVflMB+Sb5QQyuEzbp0IAZtU8VVGlbImdYDGVfLiwwPHNu+VWaiX9k+b/VBO1EmicKmLRkq5j+RT8PkLApqrf6OMuOy8XXenSj3JyszH757w88= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (2603:10a6:208:f::11) by AM0PR0502MB3634.eurprd05.prod.outlook.com (2603:10a6:208:18::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.27; Sun, 17 May 2020 12:02:59 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::b189:d782:4c74:7998]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::b189:d782:4c74:7998%7]) with mapi id 15.20.3000.022; Sun, 17 May 2020 12:02:59 +0000 From: Matan Azrad To: Slava Ovsiienko , "dev@dpdk.org" CC: Raslan Darawsheh , "stephen@networkplumber.org" , Alexander Kozyrev , "stable@dpdk.org" Thread-Topic: [PATCH v2] common/mlx5: fix bogus assert Thread-Index: AQHWKb6mXh9ZjZB+aE6JuffabyK5waisMqQw Date: Sun, 17 May 2020 12:02:59 +0000 Message-ID: References: <20200331060247.10954-1-stephen@networkplumber.org> <1589440142-7197-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1589440142-7197-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [77.126.88.104] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3ad42b3b-341d-43af-e56b-08d7fa5a3e79 x-ms-traffictypediagnostic: AM0PR0502MB3634: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 040655413E x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eQyAa17Fv6t/HZZ99Zpgcbk8dqf73C4e+PfK4liwZib83c/h34ZmMNHPDeC/9TbagsnGScmCfDB5kgD913TKmq6VpUlZzPYAG6javCEqYs6v6DBx9Qr1hOECv2IkNRxTaG681HdV+qxt2VAUh9rbVOtoWIk3LFgaX2MsU2Ka+MIK1jnuP3NbXXOUq2M7HU8wmVyArpxqt4dXLuEJ05DG+3c04fr8xxz2BGLmET5w2AB21rzLeGfyb9kP3PLNZhSXFmUPOaQ12rN5SYAaG5GC1IoXjVFHg6aCbr9/SFXVzuq+NowqGD1C6Ykf9Rttcs2fqCds6f96iy5GdVt+IuF+Imsu2qY1uv58J50BBipCFtp9GB0F4WhRqPWCXuRfm8feXUqrioLogVeH0YlyOflmQ8T2m3rfUaqp2X56MZ56okIEgzxiUu9tgS26UNpN0K9q x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(396003)(39860400002)(366004)(346002)(136003)(7696005)(6506007)(8676002)(478600001)(26005)(186003)(316002)(66556008)(33656002)(66476007)(64756008)(4326008)(66446008)(66946007)(110136005)(5660300002)(54906003)(2906002)(71200400001)(9686003)(55016002)(76116006)(8936002)(52536014)(4744005)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: GLT57FSfQmOWWoUqYuhmvsVNBh1Tdch8jJ0YT2ZvA6H2Rh1L/d6hl5fqgciwd8Yyo1OGm2WPt/ta2LilJlAFdDzvMqWc3vTHL9VwU6P6SspQvVeqBjwZeTg/3Y42WxMWJ0+MEJyNglQpLE3RvH8Usy7+sVZZCYe94simjii8RuCyhdUFA0dpZp+Ua6w2/Opj+/DHVB+EQFDYhtUcwOzPYFqcCBgnmXDWO8SqFalxMnViaQnZNnU/R7J0GpHx+1OSzMBoySaGyTXUCSFWAN2KoDZLULG/osefHwQVbVQ7ok7ZjKI+cSt0tZ+upFG7UecjRnJF89ZpAoMUOaWF4ZqT2iLtj7Vs3Wd6txmZbkusafb/wZiNM5yAv2GZXIOaErg9vH6i7Ebq4ZlJ1nDeIp8DCVn+MQZ6pLu7Yfqht0WKNfNQ0nwoRLaV48d3T1E2DjPblaiAgR0J4ajmGEjjuuW+fPfM0rhJRwd0ZyALPa7THFrdFcxEKdp1+XSqiHYapNxM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ad42b3b-341d-43af-e56b-08d7fa5a3e79 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2020 12:02:59.7861 (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-CrossTenant-userprincipalname: 6oQUnFBXL/+8YcYkX/087TwQYExTNAyYkp6G+VpBE5nQ481IpvrgTCy7GXBzJ3ZxpWvKEYf96gpRVTtF6OVN0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3634 Subject: Re: [dpdk-dev] [PATCH v2] common/mlx5: fix bogus assert 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: Viacheslav Ovsiienko > The MLX5 device supports up to MLX5_MAX_MAC_ADDRESSES (256) MAC > addresses. > The code flushes all MAC devices. >=20 > If DPDK is compiled with MLX5_DEBUG this would an assert. > PANIC in mlx5_nl_mac_addr_flush(): > line 775 assert "(size_t)(i) < sizeof(mac_own) * 8" failed >=20 > The root cause is that mac_own is a pointer and is being used as a bitmap > array. The sizeof(mac_own) would therefore be 64 but the number of > entries to be flushed would be 256. >=20 > There is a whole set of asserts in MLX5 netlink code with the same bug; t= hat > should just be changed into proper error checks. >=20 > Fixes: 8e46d4e18f09 ("common/mlx5: improve assert control") > Cc: akozyrev@mellanox.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Stephen Hemminger > Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad