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 1A693A0521; Tue, 28 Jul 2020 09:25:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 939DB1C0D6; Tue, 28 Jul 2020 09:25:32 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 98F5D1C0D5 for ; Tue, 28 Jul 2020 09:25:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595921130; 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=iMkcIotDh+t9+QPBNcFD3Hy83k8Z3NSoFvcWRWmOnZg=; b=gnYTlZm9LNhDJLxKN7xP7/86IQZ70Vz/7E3Bh247h+pwKxeJMKxxT3KK3lBFtaP7Odo51w 09wr/bNE51bcZAj4xf+lATsF5QaW33lIw9PhGw4d+qr18JIi2hd+/IdEZ4bdYDDS4nAqwW WaSw7iNvH6uI6LZ6LQOhVQ4KQxcnzkk= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-ME9VWy6RO66uK_h-AH7AIQ-1; Tue, 28 Jul 2020 03:25:28 -0400 X-MC-Unique: ME9VWy6RO66uK_h-AH7AIQ-1 Received: by mail-vs1-f69.google.com with SMTP id w8so1080479vsl.21 for ; Tue, 28 Jul 2020 00:25:28 -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=iMkcIotDh+t9+QPBNcFD3Hy83k8Z3NSoFvcWRWmOnZg=; b=fKBwbWu4YGYtL212g+g/wPweKnPyPkfbKYwDO8qCpsQZMesnu4FpsMUquJS9AZ0vti WUf9jDT62DoOQaYuWwgUn9KXgfwMxzaz0gKXSEuWTGl/zjwMPU1rXpQXg1o0LIaV/Sdx kzgQniWET1pOHp046dN3sVKKz5+GRPhqtWiZrlAMrzz6tYWUoVSZP8sSBp3ld8U7tOaN ExbEGQOzFgSXR/zOByLxoCjVp/seR05RYUth/LzIW2XX0LkGoDKV1RvAhQUyu1WVa8RM JXxGHloGGTQagsCn8fS8iScpiTpgMgEDR5u/FWzH1nyAY/RuQw1UNrm64fkEiV8jE6kc XogQ== X-Gm-Message-State: AOAM533V6XRWPZgUVDufkUhOiH+Y9P0sUt48NXlMAqRtDtwIF8w1ehMk Sx2UrnGJX1jTvtHqcJv7zF219PJvY59A956IiONWqbrrbB2J0Ppaqixyxm2BM6m0LkUZ3drsMXi 83x77v+Xz4ENP/V8K/XE= X-Received: by 2002:a1f:acc2:: with SMTP id v185mr18280607vke.18.1595921128014; Tue, 28 Jul 2020 00:25:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMjz4ni+pI1zrP0s7gOflez/bDegVhGFzEKR580tS0WP7p6kqqZLv9CEDgc3mo2uSn/A6p8mxno5NUS48IN7U= X-Received: by 2002:a1f:acc2:: with SMTP id v185mr18280600vke.18.1595921127774; Tue, 28 Jul 2020 00:25:27 -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:25:16 +0200 Message-ID: To: Matan Azrad Cc: "Xueming(Steven) Li" , dev , Asaf Penso Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com 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:20 AM Matan Azrad wrote: > > > > From: David Marchand > > On Tue, Jul 28, 2020 at 8:11 AM Xueming Li > > wrote: > > > > > > With latest rte api, vdpa example failed on vq setup, the api to get > > > event queue of specified core failed. > > > > > > 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. > > > > > > As vhost thread created on same core of eal master core, this patch > > > uses master core ID as a workaround. > > > > 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, 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? -- David Marchand