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 90B75A052B; Tue, 28 Jul 2020 10:24:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D718F1BFFE; Tue, 28 Jul 2020 10:24:09 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20047.outbound.protection.outlook.com [40.107.2.47]) by dpdk.org (Postfix) with ESMTP id EC7391BFF2 for ; Tue, 28 Jul 2020 10:24:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R2V59b1dNpUW5HT/OcBYN1iGk4OtVo0tI45tx9m2FpSq1JdDVA7woROw5+n09o9bxm2U7NJonLOLlUiR+MoJSmN75SLD3tgkkm0BteGYBc1Kdh2/1I6neIsEwIiZhZ0kLpoEXQQp8AAQ7/MB/0/nM5ygjlkraYAJojwb7f5hIi/9QeYLrsGwfS7HBG6RjgLWIo/rvJvY8TKGqe18LBzGlI+KyNcJ0Y8VTWZrhNSJn39+m80QNH6MAwlh9PCKcKBwp1IHlK3Kl9+XVnObexUPbwsEck7dYZshFhf4xvX6OCycCytmGhiy+B8zh4qThjg18T0QKjbmK9MTrOHbXFHl8g== 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=bXkqaEu4TPgGRDq0zV/JYLMKBVBkqd80wJ92cyxRQpc=; b=P1GJTWYDihLCzMFpeh9oONdmP6wvbI6J79g4NFD3pG7ZHSBdQUAZrCpSkp6hB8EgMKsJjIK0Hpf3xWD3KnFDKWgNZE42rB9IlZi3QdRo+6SLMLjO3oRRA8rUhafGv8p229xUr1ReCi6mxtaZHIpEF2cO2vUWAaCizyvzTeCkWf8LFela8qWBiXqhvDiOB/ShtWwae6A6KhCZYSBbVeGI1KdiHB9sMw3ltXyrhIIWmbm0/ke1oRXuRCzpL5R7RsFj3oN91xhoTAxNyiigf6nBgVTUURRN2X6U8vk5B12MrLyB5rYBuXBKgCDQBcgbYpFjehgVw9DRjdSz+yud8BLsqg== 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=bXkqaEu4TPgGRDq0zV/JYLMKBVBkqd80wJ92cyxRQpc=; b=Bqv82//Tie2FWtLuVMx4SToay8u16PqtQ0H1zlniKIE3ROOo//bZSG3fmM+UUjygoLZCVY0mhPyjImF5C7BK8nkr/K89lqNFH5aXdW0zVHLnyiVsjg99YNHvqHJ7QI9zPaLmiFLTtOadtwNCUHv/fGdIeH28rWTW3s607XaZGkY= Received: from AM0PR05MB5204.eurprd05.prod.outlook.com (2603:10a6:208:ef::29) by AM4PR0501MB2322.eurprd05.prod.outlook.com (2603:10a6:200:53::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Tue, 28 Jul 2020 08:24:07 +0000 Received: from AM0PR05MB5204.eurprd05.prod.outlook.com ([fe80::602e:c058:6b61:91c8]) by AM0PR05MB5204.eurprd05.prod.outlook.com ([fe80::602e:c058:6b61:91c8%7]) with mapi id 15.20.3216.033; Tue, 28 Jul 2020 08:24:07 +0000 From: "Xueming(Steven) Li" To: "Xueming(Steven) Li" CC: "dev@dpdk.org" , Asaf Penso Thread-Topic: [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost thread Thread-Index: AQHWZKYRs1hCm0hHsUu0VREHpkvcnqkcpx4Q Date: Tue, 28 Jul 2020 08:24:07 +0000 Message-ID: References: <1595916684-30135-1-git-send-email-xuemingl@mellanox.com> In-Reply-To: <1595916684-30135-1-git-send-email-xuemingl@mellanox.com> Accept-Language: zh-CN, en-US 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: [180.162.35.218] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 02376eac-7b83-4876-d985-08d832cf98d1 x-ms-traffictypediagnostic: AM4PR0501MB2322: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: i8zaGYPfQTUwi0PJ9INRmRuMNC8tjCgK+zTVxlZ7qlf67puteD+bycuOVo/IhVR3fi3l++k5F8LLcWvkS1bRg+2JJNVf0fvpykQx3zEsvv4hIWcKjxpyFmfiCblRZtmGyDklDpcinagM+Qng3CW+/UW+4BkvavIVkCugDJHfBVR7mLufPrWKTj8ezb23Hx2TIidw50BxRPPo29NBots/D24o/mRfddrxq66/jRlnYYyD4RrjO7jwae2hbKxwL6sdNN/hbSFVLM/h6dFC7IJXsKuBsltxUWQmpP7Xh9bSjlEd/w5wVcpj+5dnVPp9lric2rtZLxIjfdH+KSlhEe1UDA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB5204.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(478600001)(86362001)(66946007)(83380400001)(107886003)(66446008)(66556008)(66476007)(54906003)(6200100001)(9686003)(64756008)(55016002)(26005)(76116006)(6506007)(2906002)(186003)(71200400001)(52536014)(8676002)(4326008)(316002)(33656002)(6862004)(7696005)(5660300002)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: Q+aEHx8/nBEhKttQDQnLXI3cSwya5qjUWUlNsbVRC9w4M30l+HbP1tnEa1ZNY0+25uAo4aB0XiYUBxcluoIHz02Ri6DJtICaQPqqFCJap0WbsqBOf7XlRq+iok38V8d0vyQUIMOJqctsiPt+Wl2iAlJOC09096xsxE0mr8ADIagbrMkZMh1mJfShuS906+Up+XBGWMe+ZShM/VJHZexnt4aAYa3Yj7+8aFxHPpJibv17jPtgloPYCC4vAn1gFUAO+tUE7sddinGZYk9QbDHFJx/DR31UG1RDmNxBX45eFrlsNDPYi7V8xadpmf5ZlvlA0Ur+HQQU3LvItD7XgyONDG15vvWrGeJlr9PoZdAXi3QrhHK3cNkOrmiBz5bLg2CJtezp3AIp3+DF7rsEecU8QmS5Mxl2HX7eRUI5mYWTu4SBvvm3ldPPjFSAUzwcV8XNhU2Xs1oRJQAEc3gA3pJdKEHCMVo3yikRMa1arfxqGdpiV4cSzuvXM2zcHHJdpUMV Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB5204.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02376eac-7b83-4876-d985-08d832cf98d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2020 08:24:07.5264 (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: kw5fRNnM/lyYU6EaTidgNLpyor+jNXY1uBfgiQ74BEGSXinVeJo3T0Xqo+0HChT7liMfMScNgw3luep1TbQ3zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2322 Subject: Re: [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost thread 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 internal discussion, we found a misuse of the vector parameter in devx= _query_eqn Function, no cpu id is required, I'll come up with another version. > -----Original Message----- > From: dev On Behalf Of Xueming Li > Sent: Tuesday, July 28, 2020 2:11 PM > Cc: dev@dpdk.org; Asaf Penso > Subject: [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost threa= d >=20 > With latest rte api, vdpa example failed on vq setup, the api to get even= t queue > of specified core failed. >=20 > The api to get event queue needs core id as input, but after commit > 67ae5936c4fc36 ("eal: fix lcore accessors for non-EAL threads"), code of = "vhost- > event" thread to get current core returns -1, an invalid core id. >=20 > As vhost thread created on same core of eal master core, this patch uses > master core ID as a workaround. >=20 > Signed-off-by: Xueming Li > Acked-by: Matan Azrad > --- > drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c > b/drivers/vdpa/mlx5/mlx5_vdpa_event.c > index 13ad43611e..ff6db8e345 100644 > --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c > +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c > @@ -55,7 +55,7 @@ mlx5_vdpa_event_qp_global_prepare(struct > mlx5_vdpa_priv *priv) >=20 > if (priv->eventc) > return 0; > - lcore =3D (uint32_t)rte_lcore_to_cpu_id(-1); > + lcore =3D (uint32_t)rte_get_master_lcore(); > if (mlx5_glue->devx_query_eqn(priv->ctx, lcore, &priv->eqn)) { > rte_errno =3D errno; > DRV_LOG(ERR, "Failed to query EQ number %d.", rte_errno); > -- > 2.17.1