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 AA716A052B; Tue, 28 Jul 2020 09:53:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 78DD61BFFD; Tue, 28 Jul 2020 09:53:38 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 00EF01150 for ; Tue, 28 Jul 2020 09:53:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595922816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hLPRm+IwxsKUBgsOtAzJwdt0PAlOpKY9AsU8+3oQQWk=; b=g4aG/bd6bhYguNR9s1IaPEmkMNtilAh+V+QrLESCSpl0UfaixGyJdibysEDjtvtenpBMQY Dy88q/umjUmG1GfMcnYUBre7XQMzv3owCnLZBFef/UPHKsd7b/twE4ihbfKW6NIpilZ4Pq wR7Hp7zZapeCmcyJwhs+57yHg4T2XbE= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-355-7YqplHzQOw-WwKBRuWucBQ-1; Tue, 28 Jul 2020 03:53:34 -0400 X-MC-Unique: 7YqplHzQOw-WwKBRuWucBQ-1 Received: by mail-vs1-f71.google.com with SMTP id x20so981234vsp.7 for ; Tue, 28 Jul 2020 00:53:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hLPRm+IwxsKUBgsOtAzJwdt0PAlOpKY9AsU8+3oQQWk=; b=Y7oVpdckcnSV3z1zhPE2ZAfKo+l49CRwZ0gpJrHmrazHqGflrw81uzEhblzbUN+QEU SMAOb/q8aVg+ZBoXHzHSZ+6fEKdawkHEwoS39+VB2Z4H21b4sfP3R04C95RYI4Nq/Iq7 OejHewCR4E7fS2dAmdsUwYzdhtxhcfLZKV3mmAweGkpt4q+HkR0h5vVeUDJYecq1QJqK PLcdNZJP8IHt5RrQ0tl8ze68RwKfRckjD8QbXP7qrg2pim3nLwqrW2yqJln1TUoDG45Q BVqbGoNoOnw7/S+QEi8rT6SbveaHsY5IWNUwWAyJpUpNggt/e1aEf6K9yagvdvTlma5e nxhA== X-Gm-Message-State: AOAM5300Is7j/R8N1nfOw99U7E2jRsZFSimqDXu78aDbtiM+/VhhG7c4 xqGflZtY/TzjqB4hqQsyGCNajrgyNr1Dzll+/6QyyfS+WLOvRjJJu/YC+c/r2m7Id+9boGobc2r 7098PAmJKG5Gn1CI24b8= X-Received: by 2002:a67:c58c:: with SMTP id h12mr19453475vsk.141.1595922814041; Tue, 28 Jul 2020 00:53:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyzcd76PJuVDsPYPu6lHz7bAQbs0vfs/GTbNV/BeR1fzgczij0m2HukDQ1QM8DFJvQYdfUQdem4ojaPpdhG6M= X-Received: by 2002:a67:c58c:: with SMTP id h12mr19453463vsk.141.1595922813831; Tue, 28 Jul 2020 00:53:33 -0700 (PDT) MIME-Version: 1.0 References: <1595916684-30135-1-git-send-email-xuemingl@mellanox.com> In-Reply-To: From: David Marchand Date: Tue, 28 Jul 2020 09:53:23 +0200 Message-ID: To: Matan Azrad Cc: "Xueming(Steven) Li" , dev , Asaf Penso X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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" On Tue, Jul 28, 2020 at 9:30 AM Matan Azrad wrote: > > > > rte_lcore_to_cpu_id(-1) is supposed to return the current lcore id. > > > > As explained in the commitlog of 67ae5936c4fc36, for a non-EAL > > > > thread (which has no associated lcore by default) calling this > > > > function means lcore_config[-1].core_id. > > > > > > Deosn't lcore mean core? > > > > No. > > So, it may be that we have more than one lcore working on a specific cpu_id? > Can you extend here? A control thread is a non-EAL thread. A non-EAL thread has no lcore associated (unless you call the newly added rte_thread_register API). Not sure why you need the physical core identifier in the driver. It is possible that non-EAL threads run on one physical core if you start your application with the right cpuset. But without checking, you can't make such an assumption. > > > > > > So, if the private thread run on a core that opened by EAL, Shouldn't > > > the API return the lcore of the private thread core? > > > > vhost-events is a control thread. > > Was it working just by chance and returning 0 before? > > Probably yes. (gdb) info symbol &lcore_config[-1].core_id vfio_cfgs + 444820 in section .bss of /home/dmarchan/git/pub/dpdk.org/build/app/../lib/librte_eal.so.20.0 Please, update the commitlog. Thanks. -- David Marchand