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 10150A00BE; Tue, 7 Jul 2020 13:46:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 641C01DDFB; Tue, 7 Jul 2020 13:46:29 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id BC3761DDDB for ; Tue, 7 Jul 2020 13:46:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594122388; 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=7L3dFNZynAkPNtcnN6O7mdkP/tPYvTriluknC6V8O0o=; b=VEI509y0NNjjay5R7pyfygNTjgLdGLp+AVXqTHTZRU+Omhv6yHaPAYJqXR6ZQBZ05Vx4Xd PN+y2y6SmuOZ39/3P0DYTmM6lJzR6hZnT5ZJWOYP2rIn1akCoWD5EwVMDdOARbFZclst/u m5cQkx7LaD6iVkIoF5O9pshaBCJZ/nA= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-114-VKXVKm-2NtO3-uyp69YjQw-1; Tue, 07 Jul 2020 07:46:26 -0400 X-MC-Unique: VKXVKm-2NtO3-uyp69YjQw-1 Received: by mail-vk1-f198.google.com with SMTP id l129so1510428vke.7 for ; Tue, 07 Jul 2020 04:46:26 -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=7L3dFNZynAkPNtcnN6O7mdkP/tPYvTriluknC6V8O0o=; b=PipAM+iKA7bxgXm1U3T6M8ow7E94HpbqwSs6ap3pCAroJjgCGQMobM/dWQjfay/5gS lwgU95JyfqP0f1FO9aM6fV404mWcx3C5+VzTbRbY4OBOJ8V/2I1muVm/uw5rZKK4aLQv SfVn+7rqaGR+w09LjQqgWQmL91OyAKiZ+JMb6PsVRWpzfYrja2zxbXMNJQ+/66LAI5ks 7DG5m311attHlYTCYu9mAAcBEOZv6C1KLSGXdlksHaopdAS056P/nCZCnUMxfBmAmpj6 6inFh3K1TxMGvyYnifbESCBBSVB3/SRxjfhSmDQH6UJO3jRe7uXMsgDa8T3F9usNC8JT yCWw== X-Gm-Message-State: AOAM532BU84ujXKhhhE4ite7CSonwQBVJL9uIM3nCVlAzhOtwlNQ9GEa rARUcAwERjs6hMuGvVdCnqzXc5zmN4F+qrWUGqNpMYoa+V316sbt+QVtY4/6qeb78TasywjHVhw oxrFX8YAQrLpRzlJmbIE= X-Received: by 2002:a05:6102:249:: with SMTP id a9mr9773969vsq.198.1594122385566; Tue, 07 Jul 2020 04:46:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5SxW9a1e/B2QINpxdlx9o7FXdO3vpZ2GWrZ11atG6vl9mYFsOf4vhoJhyeU4DAuieaadtWUwsldno/UNkmSY= X-Received: by 2002:a05:6102:249:: with SMTP id a9mr9773957vsq.198.1594122385324; Tue, 07 Jul 2020 04:46:25 -0700 (PDT) MIME-Version: 1.0 References: <20200408202419.16471-1-stephen@networkplumber.org> In-Reply-To: <20200408202419.16471-1-stephen@networkplumber.org> From: David Marchand Date: Tue, 7 Jul 2020 13:46:13 +0200 Message-ID: To: Stephen Hemminger Cc: dev 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] eal: return -1 if rte_lcore_index called from non-DPDK 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 Wed, Apr 8, 2020 at 10:24 PM Stephen Hemminger wrote: > > If rte_lcore_index() is asked to give the index of the > current lcore (argument -1) and is called from a non-DPDK thread > then it would invalid result. The result would come > lcore_config[-1].core_index which is some other data in the > per-thread area. > > The resolution is to return -1 which is what rte_lcore_index() > returns if handed an invalid lcore. > > Same issue existed with rte_lcore_to_cpu_id(). > > Bugzilla ID: 446 > Signed-off-by: Stephen Hemminger Acked-by: David Marchand Applied, thanks. -- David Marchand